Skip to content

Commit

Permalink
Fix integration tests (#1392)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
DiegoTavares authored Jun 20, 2024
1 parent b3e433b commit a9f41d8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 2 additions & 4 deletions ci/run_integration_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 0 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3'

services:
db:
image: postgres:15.1
Expand Down

0 comments on commit a9f41d8

Please sign in to comment.