From 13c7af7f7fe889248e576ef228046ffe30ffb712 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Wed, 13 May 2026 12:05:17 +0200 Subject: [PATCH] tests: set endpoint for index cli MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- .woodpecker.star | 2 ++ tests/acceptance/bootstrap/CliContext.php | 9 ++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.woodpecker.star b/.woodpecker.star index d0d65ceb9b..1299821c7d 100644 --- a/.woodpecker.star +++ b/.woodpecker.star @@ -2300,6 +2300,8 @@ def opencloudServer(storage = "decomposed", depends_on = [], deploy_type = "", e "EVENTHISTORY_STORE": "memory", "OC_TRANSLATION_PATH": "%s/tests/config/translations" % dirs["base"], "ACTIVITYLOG_WRITE_BUFFER_DURATION": "0", # Disable write buffer so that test expectations are met in time + # search grpc port needed for index cli tests + "SEARCH_GRPC_ADDR": "0.0.0.0:9220", # debug addresses required for running services health tests "ACTIVITYLOG_DEBUG_ADDR": "0.0.0.0:9197", "APP_PROVIDER_DEBUG_ADDR": "0.0.0.0:9165", diff --git a/tests/acceptance/bootstrap/CliContext.php b/tests/acceptance/bootstrap/CliContext.php index c87f640cbe..cbc6d9b8f1 100644 --- a/tests/acceptance/bootstrap/CliContext.php +++ b/tests/acceptance/bootstrap/CliContext.php @@ -282,7 +282,8 @@ class CliContext implements Context { * @return void */ public function theAdministratorReindexesAllSpacesUsingTheCli(): void { - $command = "search index --all-spaces"; + $endpoint = $this->featureContext->getBaseUrlHostName(); + $command = "search index --all-spaces --endpoint $endpoint:9220"; $body = [ "command" => $command ]; @@ -298,7 +299,8 @@ class CliContext implements Context { */ public function theAdministratorReindexesASpaceUsingTheCli(string $spaceName): void { $spaceId = $this->spacesContext->getSpaceIdByName($this->featureContext->getAdminUsername(), $spaceName); - $command = "search index --space $spaceId"; + $endpoint = $this->featureContext->getBaseUrlHostName(); + $command = "search index --space $spaceId --endpoint $endpoint:9220"; $body = [ "command" => $command ]; @@ -334,11 +336,12 @@ class CliContext implements Context { $jsonResponse = $this->featureContext->getJsonDecodedResponse($response); - Assert::assertSame("OK", $jsonResponse["status"]); + Assert::assertSame("OK", $jsonResponse["status"], $jsonResponse["message"]); Assert::assertSame( 0, $jsonResponse["exitCode"], "Expected exit code to be 0, but got " . $jsonResponse["exitCode"] + . ". Message: " . $jsonResponse["message"] ); }