From 41810fcc74d8aba7cb88bb0832e233dd8f3facff Mon Sep 17 00:00:00 2001 From: JonJagger Date: Sun, 20 Oct 2024 16:29:25 +0100 Subject: [PATCH] Restore makefile so test_server does not depend on build_server --- sh/build_image.sh | 15 ++++++++------- sh/run_tests.sh | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/sh/build_image.sh b/sh/build_image.sh index ec7093b1..b9a331c7 100755 --- a/sh/build_image.sh +++ b/sh/build_image.sh @@ -29,13 +29,7 @@ check_args() show_help exit 0 ;; - 'server') - if [ -n "${CI:-}" ] ; then - stderr "In CI workflow - use docker/build-push-action@v6 GitHub Action" - exit 42 - fi - ;; - 'client') + 'server' | 'client') ;; '') show_help @@ -52,7 +46,14 @@ check_args() build_image() { check_args "$@" + + if [ -n "${CI:-}" ] ; then + stderr "In CI workflow - using previous docker/build-push-action@v6 GitHub Action" + exit 42 + fi + local -r TYPE="${1}" + exit_non_zero_unless_installed docker export $(echo_versioner_env_vars) containers_down diff --git a/sh/run_tests.sh b/sh/run_tests.sh index 77b50fb7..158b8f9a 100755 --- a/sh/run_tests.sh +++ b/sh/run_tests.sh @@ -67,7 +67,7 @@ run_tests() exit_non_zero_unless_installed docker export SERVICE_NAME="${1}" # Don't do a build here, because in CI workflow, server image is built with GitHub Action - docker compose up --no-build --wait "${SERVICE_NAME}" + docker compose up --no-build --wait --wait-timeout=10 "${SERVICE_NAME}" exit_non_zero_unless_started_cleanly copy_in_saver_test_data