-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests for addGroup and addToGroup
- Loading branch information
1 parent
6bf42d8
commit c71b5d8
Showing
4 changed files
with
100 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
tests/acceptance/features/cliProvisioning/addGroup.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
@cli @skipOnLDAP | ||
Feature: add group | ||
As an admin | ||
I want to be able to add groups | ||
So that I can more easily manage access to resources by groups rather than individual users | ||
|
||
Scenario Outline: admin creates a group | ||
When the administrator sends a group creation request for group "<group_id>" using the occ command | ||
Then the command should have been successful | ||
And the command output should contain the text 'Created group "<group_id>"' | ||
And group "<group_id>" should exist | ||
Examples: | ||
| group_id | comment | | ||
| simplegroup | nothing special here | | ||
| España | special European characters | | ||
| नेपाली | Unicode group name | | ||
|
||
Scenario: admin tries to create a group that already exists | ||
Given group "new-group" has been created | ||
When the administrator sends a group creation request for group "new-group" using the occ command | ||
Then the command should have failed with exit code 1 | ||
And the command output should contain the text 'The group "new-group" already exists' |
35 changes: 35 additions & 0 deletions
35
tests/acceptance/features/cliProvisioning/addToGroup.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
@cli @skipOnLDAP | ||
Feature: add users to group | ||
As a admin | ||
I want to be able to add users to a group | ||
So that I can give a user access to the resources of the group | ||
|
||
@smokeTest | ||
Scenario Outline: adding a user to a group | ||
Given user "brand-new-user" has been created | ||
And group "<group_id>" has been created | ||
When the administrator adds the user "brand-new-user" to the group "<group_id>" using the occ command | ||
Then the command should have been successful | ||
And the command output should contain the text 'User "brand-new-user" added to group "<group_id>"' | ||
And user "brand-new-user" should belong to group "<group_id>" | ||
Examples: | ||
| group_id | comment | | ||
| simplegroup | nothing special here | | ||
| España | special European characters | | ||
| नेपाली | Unicode group name | | ||
|
||
Scenario: admin tries to add user to a group which does not exist | ||
Given user "brand-new-user" has been created | ||
And group "not-group" has been deleted | ||
When the administrator adds the user "brand-new-user" to the group "not-group" using the occ command | ||
Then the command should have failed with exit code 1 | ||
And the command output should contain the text 'Group "not-group" does not exist' | ||
And user "brand-new-user" should not belong to group "not-group" | ||
|
||
Scenario: admin tries to add a user which does not exist to a group | ||
Given user "not-user" has been deleted | ||
And group "new-group" has been created | ||
When the administrator adds the user "not-user" to the group "new-group" using the occ command | ||
Then the command should have failed with exit code 1 | ||
And the command output should contain the text 'User "not-user" could not be found - not added to group "new-group"' | ||
And group "new-group" should not contain user "not-user" |