@@ -92,3 +92,47 @@ Feature: trashbin
92
92
| resource | type |
93
93
| /testfile .txt | file |
94
94
| /folder -to -delete | folder |
95
+
96
+
97
+ Scenario : purge expired trashed resources of Personal space
98
+ Given the following configs have been set:
99
+ | config | value |
100
+ | STORAGE_USERS_PURGE_TRASH_BIN_PERSONAL_DELETE_BEFORE | 1s |
101
+ And using spaces DAV path
102
+ And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
103
+ And user "Alice" has created the following folders
104
+ | path |
105
+ | folder -to -delete |
106
+ And user "Alice" has deleted folder "/folder-to-delete"
107
+ And user "Alice" has created a space "Newspace" with the default quota using the Graph API
108
+ And user "Alice" has created a folder "uploadFolder" in space "Newspace"
109
+ And user "Alice" has uploaded a file inside space "Newspace" with content "hello world" to "text.txt"
110
+ And user "Alice" has removed the file "text.txt" from space "Newspace"
111
+ And the system waits for "1" seconds
112
+ When the administrator purges the expired trash resources
113
+ Then there should be no trashed resources of space "Personal" owned by user "Alice"
114
+ And there should be "1" trashed resources of space "Newspace" owned by user "Alice" :
115
+ | resource | type |
116
+ | /text .txt | file |
117
+
118
+
119
+ Scenario : purge expired trashed resources of project space
120
+ Given the following configs have been set:
121
+ | config | value |
122
+ | STORAGE_USERS_PURGE_TRASH_BIN_PROJECT_DELETE_BEFORE | 1s |
123
+ And using spaces DAV path
124
+ And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
125
+ And user "Alice" has created the following folders
126
+ | path |
127
+ | folder -to -delete |
128
+ And user "Alice" has deleted folder "/folder-to-delete"
129
+ And user "Alice" has created a space "Newspace" with the default quota using the Graph API
130
+ And user "Alice" has created a folder "uploadFolder" in space "Newspace"
131
+ And user "Alice" has uploaded a file inside space "Newspace" with content "hello world" to "text.txt"
132
+ And user "Alice" has removed the file "text.txt" from space "Newspace"
133
+ And the system waits for "1" seconds
134
+ When the administrator purges the expired trash resources
135
+ Then there should be no trashed resources of space "Newspace" owned by user "Alice"
136
+ And there should be "1" trashed resources of space "Personal" owned by user "Alice" :
137
+ | resource | type |
138
+ | /folder -to -delete | folder |
0 commit comments