From a9f41d85036f7e5e75975bc60c5cdec01c73bb12 Mon Sep 17 00:00:00 2001 From: Diego Tavares Date: Thu, 20 Jun 2024 12:57:50 -0700 Subject: [PATCH] Fix integration tests (#1392) Acquiring the container name using jq is not working as expected. Given that the name the container is going to be given by docker-compose is predictable, It's okay to have it hardcoded. --- ci/run_integration_test.sh | 6 ++---- docker-compose.yml | 2 -- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/ci/run_integration_test.sh b/ci/run_integration_test.sh index 479f53b96..bd7b3f906 100755 --- a/ci/run_integration_test.sh +++ b/ci/run_integration_test.sh @@ -143,8 +143,7 @@ test_pycue() { exit 1 fi - rqd_name=$(docker compose ps --format json | jq -r '.[] | select(.Service=="rqd") | .Name') - rqd_ip=$(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' "${rqd_name}") + rqd_ip=$(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' opencue-rqd-1) want_hosts="['${rqd_ip}']" got_hosts=$(python -c 'import opencue; print([host.name() for host in opencue.api.getHosts()])') if [[ "${got_hosts}" = "${want_hosts}" ]]; then @@ -169,8 +168,7 @@ test_cueadmin() { exit 1 fi - rqd_name=$(docker compose ps --format json | jq -r '.[] | select(.Service=="rqd") | .Name') - want_host=$(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' "${rqd_name}") + want_host=$(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' opencue-rqd-1) lh_response=$(cueadmin -lh) got_host=$(echo "${lh_response}" | tail -n 1 | cut -d ' ' -f 1) if [[ "${got_host}" = "${want_host}" ]]; then diff --git a/docker-compose.yml b/docker-compose.yml index 656dec4bc..2052c57bb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,3 @@ -version: '3' - services: db: image: postgres:15.1