Skip to content

Commit f062482

Browse files
authored
Merge pull request #11668 from owncloud/test/include-apiSpaces-suite-in-k8s
[tests-only][full-ci] Test: make tests inside `apiSpaces` suite run over k8s
2 parents b3b0d10 + 9ebedfb commit f062482

File tree

4 files changed

+21
-2
lines changed

4 files changed

+21
-2
lines changed

.drone.star

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ config = {
135135
"apiSpaces",
136136
],
137137
"skip": False,
138+
"k8s": True,
138139
},
139140
"spacesShares": {
140141
"suites": [

tests/acceptance/bootstrap/OcisConfigContext.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,7 @@ public function theAdministratorHasStartedServiceSeparatelyWithTheFollowingConfi
318318
*/
319319
public function rollback(): void {
320320
if (\getenv('K8S') === "true") {
321+
$this->rollbackK8sServices();
321322
return;
322323
}
323324
$this->rollbackServices();
@@ -349,4 +350,18 @@ public function rollbackServices(): void {
349350
"Failed to rollback services.",
350351
);
351352
}
353+
354+
/**
355+
* @return void
356+
* @throws GuzzleException
357+
*/
358+
public function rollbackK8sServices(): void {
359+
$url = OcisConfigHelper::getWrapperUrl() . "/k8s/rollback";
360+
$response = OcisConfigHelper::sendRequest($url, "DELETE");
361+
Assert::assertEquals(
362+
200,
363+
$response->getStatusCode(),
364+
"Failed to rollback services.",
365+
);
366+
}
352367
}

tests/acceptance/features/apiSpaces/quota.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,14 +122,14 @@ Feature: State of the quota
122122

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

130130
@env-config
131131
Scenario: try to create a space with quota greater than OCIS spaces max quota
132-
Given the config "OCIS_SPACES_MAX_QUOTA" has been set to "50" for "storageusers" service
132+
Given the config "STORAGE_USERS_OCIS_MAX_QUOTA" has been set to "50" for "storageusers" service
133133
And user "Brian" has been created with default attributes
134134
And the administrator has assigned the role "Space Admin" to user "Brian" using the Graph API
135135
When user "Brian" tries to create a space "new space" of type "project" with quota "51" using the Graph API

tests/config/drone/k3s/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ features:
3030
- "12345678"
3131
- "ownCloud"
3232
- "owncloud-1"
33+
quotas:
34+
default: "1000000000"
35+
max: "0"
3336

3437
http:
3538
cors:

0 commit comments

Comments
 (0)