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

[full-ci] update Reva to latest edge #4522

Merged
merged 3 commits into from
Sep 7, 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
5 changes: 5 additions & 0 deletions changelog/unreleased/update-reva-beta8.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Enhancement: Update Reva

Update reva to latest edge.

https://github.com/owncloud/ocis/pull/4522
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ require (
github.com/blevesearch/bleve_index_api v1.0.3
github.com/coreos/go-oidc/v3 v3.3.0
github.com/cs3org/go-cs3apis v0.0.0-20220818202316-e92afdddac6d
github.com/cs3org/reva/v2 v2.8.1-0.20220831103032-f4dd66379b55
github.com/cs3org/reva/v2 v2.8.1-0.20220907105120-bb524f7a0ea1
github.com/disintegration/imaging v1.6.2
github.com/ggwhite/go-masker v1.0.9
github.com/go-chi/chi/v5 v5.0.7
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,10 @@ github.com/cs3org/go-cs3apis v0.0.0-20220818202316-e92afdddac6d h1:toyZ7IsXlUdEP
github.com/cs3org/go-cs3apis v0.0.0-20220818202316-e92afdddac6d/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY=
github.com/cs3org/reva/v2 v2.8.1-0.20220831103032-f4dd66379b55 h1:1hR0P5aZEp/lQepOli1yYdWWwNClgBoCyLK3RARj4B8=
github.com/cs3org/reva/v2 v2.8.1-0.20220831103032-f4dd66379b55/go.mod h1:+BYVpRV8g1hL8wF3+3BunL9BKPsXVyJYmH8COxq/V7Y=
github.com/cs3org/reva/v2 v2.8.1-0.20220906091658-53b778d9a468 h1:KlyfeKSkYpgY4+c2KrJj+TYXLEhcpJnH6VCHsyIdifk=
github.com/cs3org/reva/v2 v2.8.1-0.20220906091658-53b778d9a468/go.mod h1:+BYVpRV8g1hL8wF3+3BunL9BKPsXVyJYmH8COxq/V7Y=
github.com/cs3org/reva/v2 v2.8.1-0.20220907105120-bb524f7a0ea1 h1:ar7HXIBnHU5obKLkLmzYjyLEfaIKLEKglQDllKAIVxY=
github.com/cs3org/reva/v2 v2.8.1-0.20220907105120-bb524f7a0ea1/go.mod h1:+BYVpRV8g1hL8wF3+3BunL9BKPsXVyJYmH8COxq/V7Y=
github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8 h1:Z9lwXumT5ACSmJ7WGnFl+OMLLjpz5uR2fyz7dC255FI=
github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8/go.mod h1:4abs/jPXcmJzYoYGF91JF9Uq9s/KL5n1jvFDix8KcqY=
github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4=
Expand Down
41 changes: 21 additions & 20 deletions tests/acceptance/features/bootstrap/SpacesContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ public function cleanDataAfterTests(): void {
}

/**
* manager of the project space first disables and then deletes spaces
* the admin user first disables and then deletes spaces
*
* @return void
*
Expand All @@ -495,26 +495,26 @@ public function deleteAllProjectSpaces(): void {
$query
);
$drives = $this->getAvailableSpaces();
$createdUsers = $this->featureContext->getCreatedUsers();

foreach ($drives as $value) {
foreach ($value["root"]["permissions"] as $permissions) {
// find an user who is a manager
if ($permissions["roles"][0] === "manager") {
$userId = $permissions["grantedTo"][0]["user"]["id"];

foreach ($createdUsers as $user) {
if ($user["id"] === $userId) {
$userName = $user["actualUsername"];

if (!\array_key_exists("deleted", $value["root"])) {
$this->sendDisableSpaceRequest($userName, $value["name"]);
}
$this->sendDeleteSpaceRequest($userName, $value["name"]);
}
}
}
if (!\array_key_exists("deleted", $value["root"])) {
$this->featureContext->setResponse(
GraphHelper::disableSpace(
$this->featureContext->getBaseUrl(),
$userAdmin,
$this->featureContext->getPasswordForUser($userAdmin),
$value["id"]
)
);
}
$this->featureContext->setResponse(
GraphHelper::deleteSpace(
$this->featureContext->getBaseUrl(),
$userAdmin,
$this->featureContext->getPasswordForUser($userAdmin),
$value["id"]
)
);
}
}

Expand All @@ -528,6 +528,7 @@ public function deleteAllProjectSpaces(): void {
public function deleteAllPersonalSpaces(): void {
$query = "\$filter=driveType eq personal";
$createdUsers = $this->featureContext->getCreatedUsers();
$userAdmin = $this->featureContext->getAdminUsername();

foreach ($createdUsers as $user) {
$this->theUserListsAllHisAvailableSpacesUsingTheGraphApi(
Expand All @@ -537,9 +538,9 @@ public function deleteAllPersonalSpaces(): void {
$drives = $this->getAvailableSpaces();
foreach ($drives as $value) {
if (!\array_key_exists("deleted", $value["root"])) {
$this->sendDisableSpaceRequest($user["actualUsername"], $value["name"]);
$this->sendDisableSpaceRequest($userAdmin, $value["name"]);
}
$this->sendDeleteSpaceRequest($user["actualUsername"], $value["name"]);
$this->sendDeleteSpaceRequest($userAdmin, $value["name"]);
}
}
}
Expand Down