mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-05 03:40:01 -06:00
Merge pull request #4422 from owncloud/move-graph-test-to-ocis-local
[full-ci] [tests-only] Added test for creating group with case sensitive
This commit is contained in:
@@ -339,6 +339,7 @@ def testPipelines(ctx):
|
||||
localApiTests(ctx, "ocis", "apiAccountsHashDifficulty"),
|
||||
localApiTests(ctx, "ocis", "apiSpaces"),
|
||||
localApiTests(ctx, "ocis", "apiArchiver"),
|
||||
localApiTests(ctx, "ocis", "apiGraph"),
|
||||
]
|
||||
|
||||
if "skip" not in config["apiTests"] or not config["apiTests"]["skip"]:
|
||||
|
||||
@@ -6,7 +6,7 @@ default:
|
||||
apiAccountsHashDifficulty:
|
||||
paths:
|
||||
- '%paths.base%/../features/apiAccountsHashDifficulty'
|
||||
context:
|
||||
context: &common_ldap_suite_context
|
||||
parameters:
|
||||
ldapAdminPassword: admin
|
||||
ldapUsersOU: TestUsers
|
||||
@@ -58,5 +58,13 @@ default:
|
||||
- FilesVersionsContext:
|
||||
- PublicWebDavContext:
|
||||
|
||||
apiGraph:
|
||||
paths:
|
||||
- '%paths.base%/../features/apiGraph'
|
||||
context: *common_ldap_suite_context
|
||||
contexts:
|
||||
- GraphContext:
|
||||
- FeatureContext: *common_feature_context_params
|
||||
|
||||
extensions:
|
||||
Cjm\Behat\StepThroughExtension: ~
|
||||
|
||||
@@ -21,3 +21,11 @@ The expected failures in this file are from features in the owncloud/ocis repo.
|
||||
|
||||
### [Search by shares jail works incorrect](https://github.com/owncloud/ocis/issues/4014)
|
||||
- [apiSpaces/search.feature:43](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/search.feature#L43)
|
||||
|
||||
### [create request for already existing user exits with status code 500 ](https://github.com/owncloud/ocis/issues/3516)
|
||||
- [apiGraph/createGroupCaseSensitive.feature:16](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraph/createGroupCaseSensitive.feature#L16)
|
||||
- [apiGraph/createGroupCaseSensitive.feature:17](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraph/createGroupCaseSensitive.feature#L17)
|
||||
- [apiGraph/createGroupCaseSensitive.feature:18](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraph/createGroupCaseSensitive.feature#L18)
|
||||
- [apiGraph/createGroupCaseSensitive.feature:19](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraph/createGroupCaseSensitive.feature#L19)
|
||||
- [apiGraph/createGroupCaseSensitive.feature:20](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraph/createGroupCaseSensitive.feature#L20)
|
||||
- [apiGraph/createGroupCaseSensitive.feature:21](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraph/createGroupCaseSensitive.feature#L21)
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
@api
|
||||
Feature: create groups, group names are case insensitive
|
||||
|
||||
Scenario Outline: group names are case insensitive, creating groups with different upper and lower case names
|
||||
Given using OCS API version "<ocs_api_version>"
|
||||
And group "<group_id1>" has been created
|
||||
When the administrator creates a group "<group_id2>" using the Graph API
|
||||
And the administrator creates a group "<group_id3>" using the Graph API
|
||||
Then the HTTP status code of responses on all endpoints should be "400"
|
||||
And these groups should not exist:
|
||||
| groupname |
|
||||
| <group_id2> |
|
||||
| <group_id3> |
|
||||
Examples:
|
||||
| ocs_api_version | group_id1 | group_id2 | group_id3 |
|
||||
| 1 | case-sensitive-group | Case-Sensitive-Group | CASE-SENSITIVE-GROUP |
|
||||
| 1 | Case-Sensitive-Group | CASE-SENSITIVE-GROUP | case-sensitive-group |
|
||||
| 1 | CASE-SENSITIVE-GROUP | case-sensitive-group | Case-Sensitive-Group |
|
||||
| 2 | case-sensitive-group | Case-Sensitive-Group | CASE-SENSITIVE-GROUP |
|
||||
| 2 | Case-Sensitive-Group | CASE-SENSITIVE-GROUP | case-sensitive-group |
|
||||
| 2 | CASE-SENSITIVE-GROUP | case-sensitive-group | Case-Sensitive-Group |
|
||||
@@ -428,6 +428,32 @@ class GraphContext implements Context {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^the administrator creates a group "([^"]*)" using the Graph API$/
|
||||
*
|
||||
* @param string $group
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function adminCreatesGroupUsingTheGraphApi(string $group): void {
|
||||
$response = GraphHelper::createGroup(
|
||||
$this->featureContext->getBaseUrl(),
|
||||
$this->featureContext->getStepLineRef(),
|
||||
$this->featureContext->getAdminUsername(),
|
||||
$this->featureContext->getAdminPassword(),
|
||||
$group,
|
||||
);
|
||||
$this->featureContext->setResponse($response);
|
||||
$this->featureContext->pushToLastHttpStatusCodesArray((string) $response->getStatusCode());
|
||||
|
||||
if ($response->getStatusCode() === 200) {
|
||||
$groupId = $this->featureContext->getJsonDecodedResponse($response)["id"];
|
||||
$this->featureContext->addGroupToCreatedGroupsList($group, true, true, $groupId);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* create group with provided data
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user