Skip to content

Commit

Permalink
Fix environment variables replacement tests. The newest rspamd versio…
Browse files Browse the repository at this point in the history
…n has a template that caused a false positive. Now only check our files in /etc/rspamd/local.d instead of all in /etc/rspamd
  • Loading branch information
SaraSmiseth committed May 24, 2024
1 parent 603a408 commit e01df7b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion test/default.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion test/ldap.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion test/ldap2.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion test/reverse.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit e01df7b

Please sign in to comment.