run alias tests after restore

This commit is contained in:
Girish Ramakrishnan 2016-06-24 18:14:53 -05:00
parent 11858d3b10
commit 652971e445

View File

@ -96,6 +96,7 @@ describe('Cloudron backup testing', function () {
cloudron.saveSieveScript(owner, done);
});
// alias tests
it('can send email to alias', function (done) {
mailer.sendMailToCloudronUser('admin@' + box.domain, done);
});
@ -164,13 +165,35 @@ describe('Cloudron backup testing', function () {
// mail tests as normal user
it('retains old mail', function (done) {
cloudron.checkMail(owner, owner.username, done);
cloudron.checkMail(owner, done);
});
it('can check sieve script', function (done) {
cloudron.checkSieveScript(owner, done);
});
// alias tests continue to work after restore
it('can send email to alias', function (done) {
mailer.sendMailToCloudronUser('admin@' + box.domain, done);
});
it('did receive mail as alias (using owner name creds)', function (done) {
cloudron.checkMail(_.extend(owner, { to: 'admin' }), done);
});
it('can send mail as alias', function (done) {
cloudron.sendMail(_.extend(owner, { from: 'admin' }), 'test+' + cloudron.fqdn() + '@cloudron.io', done);
});
it('did send mail as cloudron alias', function (done) {
imap.probe({
subject: common.regexp('Hi from e2e test - ' + cloudron.fqdn()),
from: common.regexp('admin@' + cloudron.fqdn()),
to: common.regexp('test+' + cloudron.fqdn() + '@cloudron.io'),
body: /This release depends on you/
}, done);
});
it('wait for app', function () {
cloudron.waitForApp(appId);
});