From d8d4b6a18914298b260d32244eb351d565f7a7d5 Mon Sep 17 00:00:00 2001 From: Casper Date: Sun, 20 Mar 2022 13:26:23 +0100 Subject: [PATCH] Improve test, get rid of sleep (#2492) --- test/mail_ssl_manual.bats | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/mail_ssl_manual.bats b/test/mail_ssl_manual.bats index 3da41a7d..24477165 100644 --- a/test/mail_ssl_manual.bats +++ b/test/mail_ssl_manual.bats @@ -101,11 +101,9 @@ function teardown_file() { @test "checking ssl: manual cert changes are picked up by check-for-changes" { printf 'someThingsChangedHere' \ >>"$(pwd)/test/test-files/ssl/${DOMAIN_SSL_MANUAL}/with_ca/ecdsa/key.ecdsa.pem" - sleep 15 - run docker exec mail_manual_ssl /bin/bash -c "supervisorctl tail -3000 changedetector" - assert_output --partial 'Change detected' - assert_output --partial 'Manual certificates have changed' + run timeout 15 docker exec mail_manual_ssl bash -c "tail -F /var/log/supervisor/changedetector.log | sed '/Manual certificates have changed/ q'" + assert_success sed -i '/someThingsChangedHere/d' "$(pwd)/test/test-files/ssl/${DOMAIN_SSL_MANUAL}/with_ca/ecdsa/key.ecdsa.pem" }