From 186eba50b0755127f09a72a5acf5b05baa7bf0ea Mon Sep 17 00:00:00 2001 From: Andrey Borysenko Date: Fri, 17 Jan 2025 18:04:31 +0200 Subject: [PATCH] chore(ci): add mounts test Signed-off-by: Andrey Borysenko --- .github/workflows/tests-deploy.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests-deploy.yml b/.github/workflows/tests-deploy.yml index c9584cc7..87537cb6 100644 --- a/.github/workflows/tests-deploy.yml +++ b/.github/workflows/tests-deploy.yml @@ -797,9 +797,12 @@ jobs: PHP_CLI_SERVER_WORKERS=2 php -S 127.0.0.1:8080 & ./occ app_api:daemon:register docker_local_sock Docker docker-install http /var/run/docker.sock http://127.0.0.1:8080/index.php ./occ app_api:daemon:list + mkdir ./test_mount + $TEST_MOUNT_ABS_PATH=$(realpath ./test_mount) ./occ app_api:app:register app-skeleton-python docker_local_sock \ --info-xml https://raw.githubusercontent.com/nextcloud/app-skeleton-python/main/appinfo/info.xml \ - --env='TEST_ENV_2=2' + --env='TEST_ENV_2=2' \ + --mount "$TEST_MOUNT_ABS_PATH:/test_mount" ./occ app_api:app:enable app-skeleton-python ./occ app_api:app:disable app-skeleton-python @@ -810,15 +813,19 @@ jobs: - name: Check docker inspect TEST_ENV_1 run: | - docker inspect --format '{{ json .Config.Env}}' nc_app_app-skeleton-python | grep -q 'TEST_ENV_1=0' || error + docker inspect --format '{{ json .Config.Env }}' nc_app_app-skeleton-python | grep -q 'TEST_ENV_1=0' || error - name: Check docker inspect TEST_ENV_2 run: | - docker inspect --format '{{ json .Config.Env}}' nc_app_app-skeleton-python | grep -q 'TEST_ENV_2=2' || error + docker inspect --format '{{ json .Config.Env }}' nc_app_app-skeleton-python | grep -q 'TEST_ENV_2=2' || error - name: Check docker inspect TEST_ENV_3 run: | - docker inspect --format '{{ json .Config.Env}}' nc_app_app-skeleton-python | grep -q 'TEST_ENV_3=' && error || true + docker inspect --format '{{ json .Config.Env }}' nc_app_app-skeleton-python | grep -q 'TEST_ENV_3=' && error || true + + - name: Check docker inspect TEST_MOUNT + run: | + docker inspect --format '{{ json .Mounts }}' nc_app_app-skeleton-python | grep -q 'Source":"'"$TEST_MOUNT_ABS_PATH"'"' || error - name: Save container info & logs if: always()