From 95d6ee50316a6a0507efcca7e555ef4a0f631fd4 Mon Sep 17 00:00:00 2001 From: Donal McBreen Date: Thu, 15 Jun 2023 12:02:56 +0100 Subject: [PATCH 1/2] Remove /root/.ssh before symlinking Ensure the symlinks are created correctly whether or not /root/.ssh already exists. --- test/integration/docker/deployer/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/test/integration/docker/deployer/Dockerfile b/test/integration/docker/deployer/Dockerfile index 9e564678..11900139 100644 --- a/test/integration/docker/deployer/Dockerfile +++ b/test/integration/docker/deployer/Dockerfile @@ -17,6 +17,7 @@ RUN apt-get update --fix-missing && apt-get install -y docker-ce docker-ce-cli c COPY *.sh . COPY app/ . +RUN rm -rf /root/.ssh RUN ln -s /shared/ssh /root/.ssh RUN mkdir -p /etc/docker/certs.d/registry:4443 && ln -s /shared/certs/domain.crt /etc/docker/certs.d/registry:4443/ca.crt From a14c6141e5f4206075f4bd0a0ee7faba0253eaab Mon Sep 17 00:00:00 2001 From: Donal McBreen Date: Thu, 15 Jun 2023 12:05:50 +0100 Subject: [PATCH 2/2] Dump container logs on failure --- test/integration/integration_test.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/integration/integration_test.rb b/test/integration/integration_test.rb index cd91241e..821497f5 100644 --- a/test/integration/integration_test.rb +++ b/test/integration/integration_test.rb @@ -10,6 +10,13 @@ class IntegrationTest < ActiveSupport::TestCase end teardown do + unless passed? + [:deployer, :vm1, :vm2, :shared, :load_balancer].each do |container| + puts + puts "Logs for #{container}:" + docker_compose :logs, container + end + end docker_compose "down -t 1" end