Skip to content
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
1 change: 1 addition & 0 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ config = {
"apiSpaces",
],
"skip": False,
"k8s": True,
},
"spacesShares": {
"suites": [
Expand Down
15 changes: 15 additions & 0 deletions tests/acceptance/bootstrap/OcisConfigContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@ public function theAdministratorHasStartedServiceSeparatelyWithTheFollowingConfi
*/
public function rollback(): void {
if (\getenv('K8S') === "true") {
$this->rollbackK8sServices();
return;
}
$this->rollbackServices();
Expand Down Expand Up @@ -349,4 +350,18 @@ public function rollbackServices(): void {
"Failed to rollback services.",
);
}

/**
* @return void
* @throws GuzzleException
*/
public function rollbackK8sServices(): void {
$url = OcisConfigHelper::getWrapperUrl() . "/k8s/rollback";
$response = OcisConfigHelper::sendRequest($url, "DELETE");
Assert::assertEquals(
200,
$response->getStatusCode(),
"Failed to rollback services.",
);
}
}
4 changes: 2 additions & 2 deletions tests/acceptance/features/apiSpaces/quota.feature
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,14 @@ Feature: State of the quota

@env-config
Scenario: upload a file by setting OCIS spaces max quota
Given the config "OCIS_SPACES_MAX_QUOTA" has been set to "10" for "storageusers" service
Given the config "STORAGE_USERS_OCIS_MAX_QUOTA" has been set to "10" for "storageusers" service
And user "Brian" has been created with default attributes
When user "Brian" uploads file with content "more than 10 bytes content" to "lorem.txt" using the WebDAV API
Then the HTTP status code should be "507"

@env-config
Scenario: try to create a space with quota greater than OCIS spaces max quota
Given the config "OCIS_SPACES_MAX_QUOTA" has been set to "50" for "storageusers" service
Given the config "STORAGE_USERS_OCIS_MAX_QUOTA" has been set to "50" for "storageusers" service
And user "Brian" has been created with default attributes
And the administrator has assigned the role "Space Admin" to user "Brian" using the Graph API
When user "Brian" tries to create a space "new space" of type "project" with quota "51" using the Graph API
Expand Down
3 changes: 3 additions & 0 deletions tests/config/drone/k3s/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ features:
- "12345678"
- "ownCloud"
- "owncloud-1"
quotas:
default: "1000000000"
max: "0"

http:
cors:
Expand Down