Skip to content

Commit 30ed7ba

Browse files
rerun remaining
1 parent 39058dc commit 30ed7ba

File tree

8 files changed

+210
-130
lines changed

8 files changed

+210
-130
lines changed

tests/acceptance/TestHelpers/OcisConfigHelper.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,4 +120,22 @@ public static function startOcis(): ResponseInterface {
120120
$url = self::getWrapperUrl() . "/start";
121121
return self::sendRequest($url, "POST");
122122
}
123+
124+
/**
125+
* this method stops the running oCIS instance,
126+
* restarts it while excluding specific services,
127+
* and then starts the excluded services separately.
128+
*
129+
* @param string $service
130+
*
131+
* @return ResponseInterface
132+
* @throws GuzzleException
133+
*/
134+
public static function startService(string $service): ResponseInterface {
135+
$envs = [
136+
"OCIS_LOG_LEVEL" => "info",
137+
];
138+
$url = self::getWrapperUrl() . "/services/" . $service;
139+
return self::sendRequest($url, "POST", \json_encode($envs));
140+
}
123141
}

tests/acceptance/bootstrap/FeatureContext.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ public static function logStep(BeforeStepScope $scope): void {
613613
* NOTE: This method is called after each scenario having the @env-config tag
614614
* This ensures that the server is running for clean-up purposes
615615
*
616-
* @AfterScenario @env-config
616+
* @AfterScenario @backup-consistency
617617
*
618618
* @return void
619619
*/

tests/acceptance/bootstrap/OcisConfigContext.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,24 @@ public function theConfigHasBeenSetToValue(TableNode $table): void {
191191
);
192192
}
193193

194+
/**
195+
* @Given the ocis server has served service :service separately
196+
*
197+
* @param string $service
198+
*
199+
* @return void
200+
* @throws GuzzleException
201+
*/
202+
public function theOcisServerHasExcludedService(string $service) {
203+
$response = OcisConfigHelper::startService($service);
204+
205+
Assert::assertEquals(
206+
200,
207+
$response->getStatusCode(),
208+
"Failed to set config"
209+
);
210+
}
211+
194212
/**
195213
* @AfterScenario @env-config
196214
*

tests/acceptance/features/apiServiceAvailability/serviceAvailabilityCheck.feature

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ Feature: service health check
113113
Then the HTTP status code of responses on all endpoints should be "200"
114114

115115
@issue-10661
116-
Scenario: check default services readiness
116+
Scenario: check default services readiness (graph, idp, proxy)
117117
When a user requests these URLs with "GET" and no authentication
118118
| endpoint | service |
119119
| http://%base_url_hostname%:9124/readyz | graph |
@@ -122,7 +122,7 @@ Feature: service health check
122122
Then the HTTP status code of responses on all endpoints should be "200"
123123

124124
@env-config @issue-10661
125-
Scenario: check extra services readiness
125+
Scenario: check auth-bearer service readiness
126126
Given the following configs have been set:
127127
| config | value |
128128
| OCIS_ADD_RUN_SERVICES | auth-bearer |
@@ -131,3 +131,11 @@ Feature: service health check
131131
| endpoint | service |
132132
| http://%base_url_hostname%:9149/readyz | auth-bearer |
133133
Then the HTTP status code of responses on all endpoints should be "200"
134+
135+
@env-config
136+
Scenario: check services health while running separately
137+
Given the ocis server has served service "storage-users" separately
138+
When a user requests these URLs with "GET" and no authentication
139+
| endpoint | service |
140+
| http://%base_url_hostname%:9159/healthz | storage-users |
141+
Then the HTTP status code of responses on all endpoints should be "200"

tests/acceptance/features/cliCommands/backupConsistency.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@env-config
1+
@env-config @backup-consistency
22
Feature: backup consistency
33
As a user
44
I want to check my data for inconsistencies
@@ -53,4 +53,4 @@ Feature: backup consistency
5353
And the administrator has started the server
5454
When user "Alice" gets the number of versions of file "/textfile0.txt"
5555
Then the HTTP status code should be "207"
56-
And the number of versions should be "2"
56+
And the number of versions should be "2"

0 commit comments

Comments
 (0)