From f3ec9f19c8618507e84bee25fbf0e13dad677e73 Mon Sep 17 00:00:00 2001 From: Donal McBreen Date: Thu, 11 May 2023 10:48:11 +0100 Subject: [PATCH] Add debug for failed version checks --- test/integration/integration_test.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/integration/integration_test.rb b/test/integration/integration_test.rb index 628b9da8..fb08af7c 100644 --- a/test/integration/integration_test.rb +++ b/test/integration/integration_test.rb @@ -90,6 +90,18 @@ class IntegrationTest < ActiveSupport::TestCase end end + def assert_200(response) + code = response.code + if code != "200" + puts "Got response code #{code}, here are the traefik logs:" + mrsk :traefik, :logs + puts "And here are the load balancer logs" + docker_compose :logs, :load_balancer + puts "Tried to get the response code again and got #{app_response.code}" + end + assert_equal "200", code + end + def wait_for_healthy(timeout: 20) timeout_at = Time.now + timeout while docker_compose("ps -a | tail -n +2 | grep -v '(healthy)' | wc -l", capture: true) != "0"