remove nested describe, does not work as I thought
This commit is contained in:
parent
1898fe20fb
commit
c9a6fb1a2a
|
@ -66,64 +66,61 @@ describe('Cloudron backup testing', function () {
|
||||||
cloudron.setCredentials(owner.password, token);
|
cloudron.setCredentials(owner.password, token);
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('mail tests as normal user', function () {
|
// mail tests as normal user
|
||||||
it('can send mail to cloudron user', function (done) {
|
it('can send mail to cloudron user', function (done) {
|
||||||
mailer.sendMailToCloudronUser(owner.username + '@' + cloudron.fqdn(), done);
|
mailer.sendMailToCloudronUser(owner.username + '@' + cloudron.fqdn(), done);
|
||||||
});
|
|
||||||
|
|
||||||
it('did receive mail', function (done) {
|
|
||||||
cloudron.checkMail(owner, done);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('can send mail from cloudron user', function (done) {
|
|
||||||
cloudron.sendMail(owner, 'test+fromcloudron@cloudron.io', done);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('did send mail from cloudron user', function (done) {
|
|
||||||
imap.probe({
|
|
||||||
subject: new RegExp('^Hi from e2e test$'),
|
|
||||||
to: /test+fromcloudron@cloudron.io/,
|
|
||||||
body: /This release depends on you/
|
|
||||||
}, done);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('can save a sieve script', function (done) {
|
|
||||||
cloudron.saveSieveScript(owner, done);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('mail alias tests', function () {
|
it('did receive mail', function (done) {
|
||||||
it('can set aliases', function () {
|
cloudron.checkMail(owner, done);
|
||||||
cloudron.setAliases(owner, ['admin', 'mail']);
|
|
||||||
});
|
|
||||||
|
|
||||||
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('did receive mail to alias (using alias creds)', function (done) {
|
|
||||||
cloudron.checkMail({ username: 'admin', password: owner.password, to: 'admin' }, done);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('app pre-restore', function () {
|
it('can send mail from cloudron user', function (done) {
|
||||||
var location = 'test' + (Math.random() * 10000).toFixed();
|
cloudron.sendMail(owner, 'test+fromcloudron@cloudron.io', done);
|
||||||
it('can install app', function () {
|
});
|
||||||
var manifest = appStore.getManifest(common.TESTAPP_ID, common.TESTAPP_VERSION);
|
|
||||||
appId = cloudron.installApp(location, manifest);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('can populate the addons', function () {
|
it('did send mail from cloudron user', function (done) {
|
||||||
cloudron.populateAddons(cloudron.appFqdn(location));
|
imap.probe({
|
||||||
});
|
subject: new RegExp('^Hi from e2e test$'),
|
||||||
|
to: /test+fromcloudron@cloudron.io/,
|
||||||
|
body: /This release depends on you/
|
||||||
|
}, done);
|
||||||
|
});
|
||||||
|
|
||||||
it('can check the addons', function () {
|
it('can save a sieve script', function (done) {
|
||||||
cloudron.checkAddons(cloudron.appFqdn(location), owner);
|
cloudron.saveSieveScript(owner, done);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// mail alias tests
|
||||||
|
it('can set aliases', function () {
|
||||||
|
cloudron.setAliases(owner, ['admin', 'mail']);
|
||||||
|
});
|
||||||
|
|
||||||
|
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('did receive mail to alias (using alias creds)', function (done) {
|
||||||
|
cloudron.checkMail({ username: 'admin', password: owner.password, to: 'admin' }, done);
|
||||||
|
});
|
||||||
|
|
||||||
|
////////////////////////// restore
|
||||||
|
var location = 'test' + (Math.random() * 10000).toFixed();
|
||||||
|
it('can install app', function () {
|
||||||
|
var manifest = appStore.getManifest(common.TESTAPP_ID, common.TESTAPP_VERSION);
|
||||||
|
appId = cloudron.installApp(location, manifest);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('can populate the addons', function () {
|
||||||
|
cloudron.populateAddons(cloudron.appFqdn(location));
|
||||||
|
});
|
||||||
|
|
||||||
|
it('can check the addons', function () {
|
||||||
|
cloudron.checkAddons(cloudron.appFqdn(location), owner);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('can backup the box', function () {
|
it('can backup the box', function () {
|
||||||
|
@ -151,28 +148,25 @@ describe('Cloudron backup testing', function () {
|
||||||
cloudron.setCredentials(owner.password, token);
|
cloudron.setCredentials(owner.password, token);
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('mail tests as normal user', function() {
|
// mail tests as normal user
|
||||||
it('retains old mail', function (done) {
|
it('retains old mail', function (done) {
|
||||||
cloudron.checkMail(owner, owner.username, done);
|
cloudron.checkMail(owner, owner.username, done);
|
||||||
});
|
|
||||||
|
|
||||||
it('can check sieve script', function (done) {
|
|
||||||
cloudron.checkSieveScript(owner, done);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('app tests', function () {
|
it('can check sieve script', function (done) {
|
||||||
it('wait for app', function () {
|
cloudron.checkSieveScript(owner, done);
|
||||||
cloudron.waitForApp(appId);
|
});
|
||||||
});
|
|
||||||
|
|
||||||
it('can check the addons', function () {
|
it('wait for app', function () {
|
||||||
cloudron.checkAddons(cloudron.appFqdn(location), owner);
|
cloudron.waitForApp(appId);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('can uninstall app', function () {
|
it('can check the addons', function () {
|
||||||
cloudron.uninstallApp(appId);
|
cloudron.checkAddons(cloudron.appFqdn(location), owner);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('can uninstall app', function () {
|
||||||
|
cloudron.uninstallApp(appId);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('can delete the cloudron', function () {
|
it('can delete the cloudron', function () {
|
||||||
|
|
Loading…
Reference in New Issue