Skip to content

Commit

Permalink
fix: order of mail_plugin declaration (jeboehm#188)
Browse files Browse the repository at this point in the history
Disabling and enabling of xapian works again.
Added a test to make sure the index (doesn't) exist(s).

thanks to @agittins for pointing this out.
  • Loading branch information
jeboehm authored Jun 3, 2022
1 parent b304001 commit f5a8be2
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion mda/rootfs/usr/local/bin/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ rm -f /run/dovecot/master.pid
dockerize \
-template /etc/dovecot/conf.d/10-master.conf.templ:/etc/dovecot/conf.d/10-master.conf \
-template /etc/dovecot/conf.d/15-lda.conf.templ:/etc/dovecot/conf.d/15-lda.conf \
-template /etc/dovecot/conf.d/15-fts-xapian.conf.templ:/etc/dovecot/conf.d/15-fts-xapian.conf \
-template /etc/dovecot/conf.d/20-submission.conf.templ:/etc/dovecot/conf.d/20-submission.conf \
-template /etc/dovecot/conf.d/90-sieve.conf.templ:/etc/dovecot/conf.d/90-sieve.conf \
-template /etc/dovecot/conf.d/90-fts-xapian.conf.templ:/etc/dovecot/conf.d/90-fts-xapian.conf \
-template /etc/dovecot/dovecot-sql.conf.ext.templ:/etc/dovecot/dovecot-sql.conf.ext \
-wait tcp://${MYSQL_HOST}:${MYSQL_PORT} \
-wait file://${SSL_CERT} \
Expand Down
20 changes: 20 additions & 0 deletions test/rootfs/usr/share/tests/005_mda.bats
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,23 @@
[ "$status" -eq 0 ]
[ "$output" = "" ]
}

@test "fts-xapian index exists" {
if [ ${ENABLE_FTS} = "false" ]; then
skip
fi

run ls /var/vmail/example.com/admin/Maildir/xapian-indexes/*

[ "$status" -eq 0 ]
}

@test "fts-xapian index does not exist" {
if [ ${ENABLE_FTS} = "true" ]; then
skip
fi

run ls /var/vmail/example.com/admin/Maildir/xapian-indexes/*

[ "$status" -eq 1 ]
}

0 comments on commit f5a8be2

Please sign in to comment.