[full-ci] test: use single command to run the containers and the API tests (#2169)

* test: setup for running wopi API tests locally

Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com>

* chore: remove unnecessary target

Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com>

* test: merge test run commands

Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com>

* test: merge local and core expected failures

Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com>

* test: remove unnecessary commands and files

Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com>

* test: add help command

Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com>

* docs(test): update testing docs as per the new changes

Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com>

* test: remove duplicate expected failure list

Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com>

* tset: fix term colors in run script

Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com>

* docs(test): update readme docs

Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com>

* test: beautify logs

Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com>

* change run-test.sh

* test: expose more test envs

Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com>

* docs(test): update docs

Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com>

---------

Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com>
Co-authored-by: Viktor Scharf <v.scharf@opencloud.eu>
This commit is contained in:
Sawjan Gurung
2026-01-20 16:44:04 +05:45
committed by GitHub
co-authored by Viktor Scharf
parent 87ef2d97fa
commit 601ebc0f0f
17 changed files with 705 additions and 965 deletions
+9 -5
View File
@@ -1,7 +1,7 @@
#!/bin/bash
# Set required environment variables
export LOCAL_TEST=true
export START_TIKA=true
export START_EMAIL=true
export WITH_WRAPPER=true
export STORAGE_DRIVER=${STORAGE_DRIVER:-posix}
@@ -10,11 +10,15 @@ export TEST_ROOT_PATH="/drone/src/tests"
# LOCAL TEST WITHOUT EXTRA ENVS
TEST_SERVER_URL="https://opencloud-server:9200"
OC_WRAPPER_URL="http://opencloud-server:5200"
EXPECTED_FAILURES_FILE="tests/acceptance/expected-failures-localAPI-on-decomposed-storage.md"
EXPECTED_FAILURES_FILE_FROM_CORE="tests/acceptance/expected-failures-API-on-decomposed-storage.md"
if [ "$STORAGE_DRIVER" = "posix" ]; then
EXPECTED_FAILURES_FILE="tests/acceptance/expected-failures-posix-storage.md"
else
EXPECTED_FAILURES_FILE="tests/acceptance/expected-failures-decomposed-storage.md"
fi
# Start server
make -C tests/acceptance/docker start-server
make -C tests/acceptance/docker start-services
# Wait until the server responds with HTTP 200
echo "Waiting for server to start..."
@@ -139,7 +143,7 @@ for SUITE in "${CORE_SUITES[@]}"; do
LOG_FILE="$LOG_DIR/${SUITE}.log"
# Run suite
make test-acceptance-api TEST_SERVER_URL=$TEST_SERVER_URL EXPECTED_FAILURES_FILE=$EXPECTED_FAILURES_FILE_FROM_CORE BEHAT_SUITE=$SUITE SEND_SCENARIO_LINE_REFERENCES=true > "$LOG_FILE" 2>&1
make test-acceptance-api TEST_SERVER_URL=$TEST_SERVER_URL EXPECTED_FAILURES_FILE=$EXPECTED_FAILURES_FILE BEHAT_SUITE=$SUITE SEND_SCENARIO_LINE_REFERENCES=true > "$LOG_FILE" 2>&1
# Check if suite was successful
if [ $? -eq 0 ]; then