|
| 1 | +@env-config |
| 2 | +Feature: delete space using cli |
| 3 | + As an administrator |
| 4 | + I want to delete spaces of users using cli |
| 5 | + So that I can manage them |
| 6 | + |
| 7 | + Background: |
| 8 | + Given user "Alice" has been created with default attributes |
| 9 | + |
| 10 | + |
| 11 | + Scenario: administrator deletes personal space of users |
| 12 | + Given user "Admin" has disabled personal space of user "Alice" |
| 13 | + When administrator deletes "Personal" space using the CLI |
| 14 | + Then the command should be successful |
| 15 | + And the command output should contain "Purge completed. Purged 1 spaces" |
| 16 | + |
| 17 | + |
| 18 | + Scenario: administrator deletes project spaces of users |
| 19 | + Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API |
| 20 | + And user "Alice" has created a space "project1" with the default quota using the Graph API |
| 21 | + And user "Alice" has created a space "project2" with the default quota using the Graph API |
| 22 | + And user "Alice" has disabled a space "project1" |
| 23 | + And user "Alice" has disabled a space "project2" |
| 24 | + When administrator deletes "Project" space using the CLI |
| 25 | + Then the command should be successful |
| 26 | + And the command output should contain "Purge completed. Purged 2 spaces" |
| 27 | + |
| 28 | + |
| 29 | + Scenario: administrator deletes personal space of users using space-id (Personal) |
| 30 | + Given user "Admin" has disabled personal space of user "Alice" |
| 31 | + When administrator deletes "Personal" space of user "Alice" with space-id using the CLI |
| 32 | + Then the command should be successful |
| 33 | + And the command output should contain "Purge completed. Purged 1 spaces" |
| 34 | + |
| 35 | + |
| 36 | + Scenario: administrator deletes project space of users using space-id (Project) |
| 37 | + Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API |
| 38 | + And user "Alice" has created a space "project" with the default quota using the Graph API |
| 39 | + And user "Alice" has disabled a space "project" |
| 40 | + When administrator deletes "project" space of user "Alice" with space-id using the CLI |
| 41 | + Then the command should be successful |
| 42 | + And the command output should contain "Purge completed. Purged 1 spaces" |
| 43 | + |
| 44 | + |
| 45 | + Scenario: administrator deletes spaces beyond the retention-period |
| 46 | + Given using spaces DAV path |
| 47 | + And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API |
| 48 | + And user "Alice" has created a space "project" with the default quota using the Graph API |
| 49 | + And user "Alice" has disabled a space "project" |
| 50 | + And the administrator has waited for "5s" seconds |
| 51 | + And user "Alice" has created a space "project1" with the default quota using the Graph API |
| 52 | + And user "Alice" has disabled a space "project1" |
| 53 | + When administrator deletes "Project" space with "2s" retention period using the CLI |
| 54 | + Then the command should be successful |
| 55 | + And the command output should contain "Purge completed. Purged 1 spaces" |
| 56 | + |
| 57 | + |
| 58 | + Scenario: administrator tries to delete enabled spaces |
| 59 | + Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API |
| 60 | + And user "Alice" has created a space "project" with the default quota using the Graph API |
| 61 | + When administrator deletes "project" space of user "Alice" with space-id using the CLI |
| 62 | + Then the command should be successful |
| 63 | + And the command output should contain "Purge completed. Purged 0 spaces" |
| 64 | + |
0 commit comments