From 63a358bcfa0e2dbfc8e828494775c17070a3d3d0 Mon Sep 17 00:00:00 2001 From: Robert Hafner Date: Sun, 1 Dec 2013 23:04:55 -0800 Subject: [PATCH] Added "ResetMail.sh" to handle refreshing the test inboxes before and between tests --- tests/vagrant/ResetMail.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 tests/vagrant/ResetMail.sh diff --git a/tests/vagrant/ResetMail.sh b/tests/vagrant/ResetMail.sh new file mode 100644 index 0000000..2f94d5c --- /dev/null +++ b/tests/vagrant/ResetMail.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +echo 'Refreshing the test mailbox- this could take a minute.' + +sudo stop dovecot +[ -d "/home/testuser/Maildir" ] && sudo rm -R /home/testuser/Maildir +sudo cp -Rp /resources/Maildir /home/testuser/ +sudo chown -R testuser:testuser /home/testuser/Maildir +sudo start dovecot + +echo 'Test mailbox restored'. \ No newline at end of file