From e01df7b9dd131933cf63279b85a9384f4ed6de10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sara=20Aim=C3=A9e=20Smiseth?= <51710585+SaraSmiseth@users.noreply.github.com> Date: Fri, 24 May 2024 12:54:33 +0200 Subject: [PATCH] Fix environment variables replacement tests. The newest rspamd version has a template that caused a false positive. Now only check our files in /etc/rspamd/local.d instead of all in /etc/rspamd --- test/default.bats | 2 +- test/ldap.bats | 2 +- test/ldap2.bats | 2 +- test/reverse.bats | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/default.bats b/test/default.bats index 809acae..10d4c92 100644 --- a/test/default.bats +++ b/test/default.bats @@ -41,7 +41,7 @@ load 'test_helper/bats-assert/load' } @test "checking system: all environment variables have been replaced (default configuration)" { - run docker exec mailserver_default /bin/bash -c "egrep -R -I "{{.*}}" /etc/postfix /etc/postfixadmin/fetchmail.conf /etc/dovecot /etc/rspamd /etc/cron.d /etc/mailname /usr/local/bin" + run docker exec mailserver_default /bin/bash -c "egrep -R -I "{{.*}}" /etc/postfix /etc/postfixadmin/fetchmail.conf /etc/dovecot /etc/rspamd/local.d /etc/cron.d /etc/mailname /usr/local/bin" assert_failure } diff --git a/test/ldap.bats b/test/ldap.bats index a053682..262904b 100644 --- a/test/ldap.bats +++ b/test/ldap.bats @@ -12,7 +12,7 @@ load 'test_helper/bats-assert/load' } @test "checking system: all environment variables have been replaced (ldap configuration)" { - run docker exec mailserver_ldap /bin/bash -c "egrep -R -I "{{.*}}" /etc/postfix /etc/postfixadmin/fetchmail.conf /etc/dovecot /etc/rspamd /etc/cron.d /etc/mailname /usr/local/bin" + run docker exec mailserver_ldap /bin/bash -c "egrep -R -I "{{.*}}" /etc/postfix /etc/postfixadmin/fetchmail.conf /etc/dovecot /etc/rspamd/local.d /etc/cron.d /etc/mailname /usr/local/bin" assert_failure } diff --git a/test/ldap2.bats b/test/ldap2.bats index a9b289f..eb26d38 100644 --- a/test/ldap2.bats +++ b/test/ldap2.bats @@ -6,7 +6,7 @@ load 'test_helper/bats-assert/load' # @test "checking system: all environment variables have been replaced (ldap2 configuration)" { - run docker exec mailserver_ldap2 /bin/bash -c "egrep -R -I "{{.*}}" /etc/postfix /etc/postfixadmin/fetchmail.conf /etc/dovecot /etc/rspamd /etc/cron.d /etc/mailname /usr/local/bin" + run docker exec mailserver_ldap2 /bin/bash -c "egrep -R -I "{{.*}}" /etc/postfix /etc/postfixadmin/fetchmail.conf /etc/dovecot /etc/rspamd/local.d /etc/cron.d /etc/mailname /usr/local/bin" assert_failure } diff --git a/test/reverse.bats b/test/reverse.bats index 968ef12..e70b5b3 100644 --- a/test/reverse.bats +++ b/test/reverse.bats @@ -12,7 +12,7 @@ load 'test_helper/bats-assert/load' } @test "checking system: all environment variables have been replaced (reverse configuration)" { - run docker exec mailserver_reverse /bin/bash -c "egrep -R -I "{{.*}}" /etc/postfix /etc/postfixadmin/fetchmail.conf /etc/dovecot /etc/rspamd /etc/cron.d /etc/mailname /usr/local/bin" + run docker exec mailserver_reverse /bin/bash -c "egrep -R -I "{{.*}}" /etc/postfix /etc/postfixadmin/fetchmail.conf /etc/dovecot /etc/rspamd/local.d /etc/cron.d /etc/mailname /usr/local/bin" assert_failure }