From 55302d5f92b1aea4b453716c55a2522667f55dfe Mon Sep 17 00:00:00 2001 From: ThanKarab Date: Sun, 22 Sep 2024 15:59:31 +0300 Subject: [PATCH] chore: Minor fixes to update dev deployment setup --- .github/workflows/portalbackend-integration-tests.yml | 4 ++++ dev/start.sh | 7 ++----- dev/test.sh | 5 ----- dev/tests/test_federation_info.py | 2 +- 4 files changed, 7 insertions(+), 11 deletions(-) delete mode 100755 dev/test.sh diff --git a/.github/workflows/portalbackend-integration-tests.yml b/.github/workflows/portalbackend-integration-tests.yml index b82a05a0..ca80be02 100644 --- a/.github/workflows/portalbackend-integration-tests.yml +++ b/.github/workflows/portalbackend-integration-tests.yml @@ -31,6 +31,10 @@ jobs: - name: Get deployment status run: docker ps + - name: Install python dependencies + working-directory: ./dev/ + run: pip install -r requirements.txt + - name: Run the dev tests working-directory: ./dev/ run: pytest -k "not test_federation_info.py" diff --git a/dev/start.sh b/dev/start.sh index 2e6bb42a..c5dafec1 100755 --- a/dev/start.sh +++ b/dev/start.sh @@ -3,17 +3,14 @@ docker-compose --env-file ../.versions_env down docker-compose --env-file ../.versions_env up -d -echo -n "Installing pip requirements ..." -pip install -r requirements.txt - echo -n "Waiting for containers to start ..." sleep 10 echo -n "Loading data into exareme2 db ..." docker exec dev-exareme2_global_mipdb-1 mipdb init -docker exec dev-exareme2_local_mipdb-1 /bin/bash -c "mipdb init && mipdb load-folder /opt/data" +docker exec dev_exareme2_local_mipdb_1 /bin/bash -c "mipdb init && mipdb load-folder /opt/data" -sleep 10 +sleep 20 echo -n "Triggering engine to see the added pathologies ..." curl -X POST 172.17.0.1:5000/wla diff --git a/dev/test.sh b/dev/test.sh deleted file mode 100755 index 5dccf476..00000000 --- a/dev/test.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/env bash - -pytest -k "not test_federation_info.py" tests -pytest tests/test_federation_info.py - diff --git a/dev/tests/test_federation_info.py b/dev/tests/test_federation_info.py index 16bfeefd..25aab4e2 100644 --- a/dev/tests/test_federation_info.py +++ b/dev/tests/test_federation_info.py @@ -6,7 +6,7 @@ def test_federation_info(): - cmd = f"docker logs dev-portalbackend-1 | python3 ../federation_info.py show-portal-backend-audit-entries" + cmd = f"docker logs dev_portalbackend_1 | python3 ../federation_info.py show-portal-backend-audit-entries" res = subprocess.run( cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE )