From c6af1469167cc7895f6566399466c1ed461fac51 Mon Sep 17 00:00:00 2001 From: Julius Knorr Date: Fri, 29 Nov 2024 14:45:40 +0100 Subject: [PATCH] fixup! fixup! fixup! fixup! fixup! fixup! ci: Add ci job to run wopi-validator-core --- .github/workflows/wopi.yml | 6 +++--- tests/wopi-test.sh | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/wopi.yml b/.github/workflows/wopi.yml index e7b398f2fd..377b752aa7 100644 --- a/.github/workflows/wopi.yml +++ b/.github/workflows/wopi.yml @@ -87,11 +87,11 @@ jobs: run: | mkdir data echo '"\OC\Memcache\APCu","hashing_default_password"=>true];' > config/config.php - ./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password + ./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin ./occ app:enable --force ${{ env.APP_NAME }} - name: Run WOPI validator tests working-directory: apps/${{ env.APP_NAME }} run: | - PHP_CLI_SERVER_WORKERS=10 php -S localhost:8080 -t ../../ & - NEXTCLOUD_URL=http://localhost:8080 ./tests/wopi-test.sh + PHP_CLI_SERVER_WORKERS=10 php -S 172.17.0.1:8080 -t ../../ & + NEXTCLOUD_URL=http://172.17.0.1 ./tests/wopi-test.sh diff --git a/tests/wopi-test.sh b/tests/wopi-test.sh index d15bb5b63c..9ad9dc7197 100755 --- a/tests/wopi-test.sh +++ b/tests/wopi-test.sh @@ -3,12 +3,14 @@ set -e set -x + # current timestamp as filename FILENAME=$(date +%s) -NEXTCLOUD_URL=${NEXTCLOUD_URL:-http://localhost} +NEXTCLOUD_URL=${NEXTCLOUD_URL:-http://nextcloud.local} USERNAME=${USERNAME:-admin} PASSWORD=${PASSWORD:-admin} +HOST_IP=${HOST_IP:-172.17.0.1} curl $NEXTCLOUD_URL/status.php --max-time 5 --retry 5 --retry-delay 0 --retry-max-time 30 --retry-connrefused @@ -35,4 +37,4 @@ WOPI_URL="$NEXTCLOUD_URL/index.php/apps/richdocuments/wopi/files/$FILE_ID" echo "WOPI URL: $WOPI_URL" echo "WOPI token generated: $WOPI_TOKEN" -docker run --network nextcloud_default --add-host nextcloud.local:192.168.21.1 --rm tylerbutler/wopi-validator -- -w $WOPI_URL -t $WOPI_TOKEN -l 0 "$@" \ No newline at end of file +docker run --add-host nextcloud.local:${HOST_IP} --rm tylerbutler/wopi-validator -- -w $WOPI_URL -t $WOPI_TOKEN -l 0 "$@" \ No newline at end of file