Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tests-only] use graph api to create/delete users for the acceptance tests #39927

Merged
merged 16 commits into from
Apr 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions tests/TestHelpers/HttpRequestHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,12 @@
use Exception;
use GuzzleHttp\Client;
use GuzzleHttp\Cookie\CookieJar;
use GuzzleHttp\Exception\BadResponseException;
use GuzzleHttp\Exception\GuzzleException;
use GuzzleHttp\Exception\RequestException;
use GuzzleHttp\Psr7\Request;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\StreamInterface;
use Sabre\VObject\Cli;
use SimpleXMLElement;
use Sabre\Xml\LibXMLException;
use Sabre\Xml\Reader;
Expand Down Expand Up @@ -326,7 +324,6 @@ public static function createRequest(
if (strpos($url, "/apps/testing") !== false) {
$oCISServerUrl = \getenv('TEST_SERVER_URL');
$oC10ServerUrl = \getenv('TEST_OC10_URL');

$url = str_replace($oCISServerUrl, $oC10ServerUrl, $url);
} else {
// set 'owncloud-server' selector cookie for oCIS requests
Expand Down
7 changes: 7 additions & 0 deletions tests/TestHelpers/OcisHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@ public static function isTestingParallelDeployment(): bool {
return (\getenv("TEST_PARALLEL_DEPLOYMENT") === "true");
}

/**
* @return bool
*/
public static function isTestingWithGraphApi(): bool {
return \getenv('TEST_WITH_GRAPH_API') === 'true';
}

/**
* @return bool|string false if no command given or the command as string
*/
Expand Down
2 changes: 1 addition & 1 deletion tests/acceptance/features/apiMain/quota.feature
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @issue-ocis-reva-101
@api @issue-ocis-reva-101 @skipOnGraph
Feature: quota

Background:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @skipOnLDAP
@api @provisioning_api-app-required @skipOnLDAP @skipOnGraph
Feature: add user
As an admin
I want to be able to add users
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @skipOnLDAP
@api @provisioning_api-app-required @skipOnLDAP @skipOnGraph
Feature: access user provisioning API using app password
As an ownCloud user
I want to be able to use the provisioning API with an app password
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @skipOnLDAP @notToImplementOnOCIS
@api @provisioning_api-app-required @skipOnLDAP @notToImplementOnOCIS @skipOnGraph
Feature: create a subadmin
As an admin
I want to be able to make a user the subadmin of a group
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @skipOnLDAP
@api @provisioning_api-app-required @skipOnLDAP @skipOnGraph
Feature: delete users
As an admin
I want to be able to delete users
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @comments-app-required @skipOnLDAP @notToImplementOnOCIS
@api @provisioning_api-app-required @comments-app-required @skipOnLDAP @notToImplementOnOCIS @skipOnGraph
Feature: disable an app
As an admin
I want to be able to disable an enabled app
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @skipOnLDAP
@api @provisioning_api-app-required @skipOnLDAP @skipOnGraph
Feature: disable user
As an admin
I want to be able to disable a user
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @skipOnLDAP
@api @provisioning_api-app-required @skipOnLDAP @skipOnGraph
Feature: edit users
As an admin, subadmin or as myself
I want to be able to edit user information
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @comments-app-required @skipOnLDAP @notToImplementOnOCIS
@api @provisioning_api-app-required @comments-app-required @skipOnLDAP @notToImplementOnOCIS @skipOnGraph
Feature: enable an app
As an admin
I want to be able to enable a disabled app
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @skipOnLDAP
@api @provisioning_api-app-required @skipOnLDAP @skipOnGraph
Feature: enable user
As an admin
I want to be able to enable a user
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @skipOnLDAP @notToImplementOnOCIS
@api @provisioning_api-app-required @skipOnLDAP @notToImplementOnOCIS @skipOnGraph
Feature: get app info
As an admin
I want to be able to get app info
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @files_sharing-app-required @skipOnLDAP @notToImplementOnOCIS
@api @provisioning_api-app-required @files_sharing-app-required @skipOnLDAP @notToImplementOnOCIS @skipOnGraph
Feature: get apps
As an admin
I want to be able to get the list of apps on my ownCloud
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @skipOnLDAP @notToImplementOnOCIS
@api @provisioning_api-app-required @skipOnLDAP @notToImplementOnOCIS @skipOnGraph
Feature: get subadmins
As an admin
I want to be able to get the list of subadmins of a group
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @skipOnLDAP
@api @provisioning_api-app-required @skipOnLDAP @skipOnGraph
Feature: get user
As an admin, subadmin or as myself
I want to be able to retrieve user information
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @skipOnLDAP
@api @provisioning_api-app-required @skipOnLDAP @skipOnGraph
Feature: get users
As an admin
I want to be able to list the users that exist
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @skipOnLDAP @notToImplementOnOCIS
@api @provisioning_api-app-required @skipOnLDAP @notToImplementOnOCIS @skipOnGraph
Feature: remove subadmin
As an admin
I want to be able to remove subadmin rights to a user from a group
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @skipOnLDAP
@api @provisioning_api-app-required @skipOnLDAP @skipOnGraph
Feature: reset user password
As an admin
I want to be able to reset a user's password
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @skipOnLDAP
@api @provisioning_api-app-required @skipOnLDAP @skipOnGraph
Feature: add user
As an admin
I want to be able to add users
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @skipOnLDAP
@api @provisioning_api-app-required @skipOnLDAP @skipOnGraph
Feature: access user provisioning API using app password
As an ownCloud user
I want to be able to use the provisioning API with an app password
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @skipOnLDAP @notToImplementOnOCIS
@api @provisioning_api-app-required @skipOnLDAP @notToImplementOnOCIS @skipOnGraph
Feature: create a subadmin
As an admin
I want to be able to make a user the subadmin of a group
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @skipOnLDAP @notToImplementOnOCIS
@api @provisioning_api-app-required @skipOnLDAP @notToImplementOnOCIS @skipOnGraph
Feature: current oC10 behavior for issue-31276
As an admin
I want to be able to make a user the subadmin of a group
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @skipOnLDAP
@api @provisioning_api-app-required @skipOnLDAP @skipOnGraph
Feature: delete users
As an admin
I want to be able to delete users
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @skipOnLDAP @notToImplementOnOCIS
@api @provisioning_api-app-required @skipOnLDAP @notToImplementOnOCIS @skipOnGraph
Feature: current oC10 behavior for issue-31276
As an admin
I want to be able to delete users
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @comments-app-required @skipOnLDAP @notToImplementOnOCIS
@api @provisioning_api-app-required @comments-app-required @skipOnLDAP @notToImplementOnOCIS @skipOnGraph
Feature: disable an app
As an admin
I want to be able to disable an enabled app
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @comments-app-required @skipOnLDAP @notToImplementOnOCIS
@api @provisioning_api-app-required @comments-app-required @skipOnLDAP @notToImplementOnOCIS @skipOnGraph
Feature: current oC10 behavior for issue-31276
As an admin
I want to be able to disable an enabled app
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @skipOnLDAP
@api @provisioning_api-app-required @skipOnLDAP @skipOnGraph
Feature: disable user
As an admin
I want to be able to disable a user
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @skipOnLDAP @notToImplementOnOCIS
@api @provisioning_api-app-required @skipOnLDAP @notToImplementOnOCIS @skipOnGraph
Feature: current oC10 behavior for issue-31276
As an admin
I want to be able to disable a user
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @skipOnLDAP
@api @provisioning_api-app-required @skipOnLDAP @skipOnGraph
Feature: edit users
As an admin, subadmin or as myself
I want to be able to edit user information
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @comments-app-required @skipOnLDAP @notToImplementOnOCIS
@api @provisioning_api-app-required @comments-app-required @skipOnLDAP @notToImplementOnOCIS @skipOnGraph
Feature: enable an app
As an admin
I want to be able to enable a disabled app
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @comments-app-required @skipOnLDAP @notToImplementOnOCIS
@api @provisioning_api-app-required @comments-app-required @skipOnLDAP @notToImplementOnOCIS @skipOnGraph
Feature: enable an app - current oC10 behavior for issue-31276
As an admin
I want to be able to enable a disabled app
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @skipOnLDAP
@api @provisioning_api-app-required @skipOnLDAP @skipOnGraph
Feature: enable user
As an admin
I want to be able to enable a user
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @skipOnLDAP @notToImplementOnOCIS
@api @provisioning_api-app-required @skipOnLDAP @notToImplementOnOCIS @skipOnGraph
Feature: enable user - current oC10 behavior for issue-31276
As an admin
I want to be able to enable a user
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @skipOnLDAP @notToImplementOnOCIS
@api @provisioning_api-app-required @skipOnLDAP @notToImplementOnOCIS @skipOnGraph
Feature: get app info
As an admin
I want to be able to get app info
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @files_sharing-app-required @skipOnLDAP @notToImplementOnOCIS
@api @provisioning_api-app-required @files_sharing-app-required @skipOnLDAP @notToImplementOnOCIS @skipOnGraph
Feature: get apps
As an admin
I want to be able to get the list of apps on my ownCloud
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @skipOnLDAP @notToImplementOnOCIS
@api @provisioning_api-app-required @skipOnLDAP @notToImplementOnOCIS @skipOnGraph
Feature: get subadmins
As an admin
I want to be able to get the list of subadmins of a group
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @skipOnLDAP @notToImplementOnOCIS
@api @provisioning_api-app-required @skipOnLDAP @notToImplementOnOCIS @skipOnGraph
Feature: get subadmins - current oC10 behavior for issue-31276
As an admin
I want to be able to get the list of subadmins of a group
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @skipOnLDAP
@api @provisioning_api-app-required @skipOnLDAP @skipOnGraph
Feature: get user
As an admin, subadmin or as myself
I want to be able to retrieve user information
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @skipOnLDAP @notToImplementOnOCIS
@api @provisioning_api-app-required @skipOnLDAP @notToImplementOnOCIS @skipOnGraph
Feature: get user - current oC10 behavior for issue-31276
As an admin, subadmin or as myself
I want to be able to retrieve user information
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @skipOnLDAP
@api @provisioning_api-app-required @skipOnLDAP @skipOnGraph
Feature: get users
As an admin
I want to be able to list the users that exist
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @skipOnLDAP @notToImplementOnOCIS
@api @provisioning_api-app-required @skipOnLDAP @notToImplementOnOCIS @skipOnGraph
Feature: get users - current oC10 behavior for issue-31276
As an admin, subadmin or as myself
I want to be able to retrieve user information
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @skipOnLDAP @notToImplementOnOCIS
@api @provisioning_api-app-required @skipOnLDAP @notToImplementOnOCIS @skipOnGraph
Feature: remove subadmin
As an admin
I want to be able to remove subadmin rights to a user from a group
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @skipOnLDAP @notToImplementOnOCIS
@api @provisioning_api-app-required @skipOnLDAP @notToImplementOnOCIS @skipOnGraph
Feature: remove subadmin - current oC10 behavior for issue-31276
As an admin
I want to be able to remove subadmin rights to a user from a group
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @skipOnLDAP
@api @provisioning_api-app-required @skipOnLDAP @skipOnGraph
Feature: reset user password
As an admin
I want to be able to reset a user's password
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @skipOnLDAP
@api @provisioning_api-app-required @skipOnLDAP @skipOnGraph
Feature: add groups
As an admin
I want to be able to add groups
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @skipOnLDAP @notToImplementOnOCIS
@api @provisioning_api-app-required @skipOnLDAP @notToImplementOnOCIS @skipOnGraph
Feature: add groups
As an admin
I want to be able to add groups
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @skipOnLDAP
@api @provisioning_api-app-required @skipOnLDAP @skipOnGraph
Feature: add users to group
As a admin
I want to be able to add users to a group
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @skipOnLDAP
@api @provisioning_api-app-required @skipOnLDAP @skipOnGraph
Feature: delete groups
As an admin
I want to be able to delete groups
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @skipOnLDAP @notToImplementOnOCIS
@api @provisioning_api-app-required @skipOnLDAP @notToImplementOnOCIS @skipOnGraph
Feature: delete groups
As an admin
I want to be able to delete groups
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @skipOnLDAP
@api @provisioning_api-app-required @skipOnLDAP @skipOnGraph
Feature: get group
As an admin
I want to be able to get group details
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @rememberGroupsThatExist @skipOnLDAP
@api @provisioning_api-app-required @rememberGroupsThatExist @skipOnLDAP @skipOnGraph
Feature: get groups
As an admin
I want to be able to get groups
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @skipOnLDAP @notToImplementOnOCIS
@api @provisioning_api-app-required @skipOnLDAP @notToImplementOnOCIS @skipOnGraph
Feature: get subadmin groups
As an admin
I want to be able to get the groups in which the user is subadmin
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @skipOnLDAP
@api @provisioning_api-app-required @skipOnLDAP @skipOnGraph
Feature: get user groups
As an admin
I want to be able to get groups
Expand Down Expand Up @@ -159,4 +159,4 @@ Feature: get user groups
And the groups returned by the API should be
| group1 |
| group2 |
| users |
| users |
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @skipOnLDAP @notToImplementOnOCIS
@api @provisioning_api-app-required @skipOnLDAP @notToImplementOnOCIS @skipOnGraph
Feature: get user groups
As an admin
I want to be able to get groups
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @skipOnLDAP
@api @provisioning_api-app-required @skipOnLDAP @skipOnGraph
Feature: remove a user from a group
As an admin
I want to be able to remove a user from a group
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @skipOnLDAP @notToImplementOnOCIS
@api @provisioning_api-app-required @skipOnLDAP @notToImplementOnOCIS @skipOnGraph
Feature: remove a user from a group
As an admin
I want to be able to remove a user from a group
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @skipOnLDAP
@api @provisioning_api-app-required @skipOnLDAP @skipOnGraph
Feature: add groups
As an admin
I want to be able to add groups
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @skipOnLDAP @notToImplementOnOCIS
@api @provisioning_api-app-required @skipOnLDAP @notToImplementOnOCIS @skipOnGraph
Feature: add groups
As an admin
I want to be able to add groups
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @skipOnLDAP @notToImplementOnOCIS
@api @provisioning_api-app-required @skipOnLDAP @notToImplementOnOCIS @skipOnGraph
Feature: add groups
As an admin
I want to be able to add groups
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @provisioning_api-app-required @skipOnLDAP
@api @provisioning_api-app-required @skipOnLDAP @skipOnGraph
Feature: add users to group
As a admin
I want to be able to add users to a group
Expand Down
Loading