diff --git a/test/app-flow-test.js b/test/app-flow-test.js index a8e6c40..0123691 100644 --- a/test/app-flow-test.js +++ b/test/app-flow-test.js @@ -46,7 +46,7 @@ describe('Application flow test', function () { size: '512mb', version: latestVersion }); - appStore.waitForCloudron(box.id); + box = appStore.waitForCloudron(box.id); cloudron = new Cloudron(box); }); diff --git a/test/cloudron-backup-test.js b/test/cloudron-backup-test.js index a733803..815ae11 100644 --- a/test/cloudron-backup-test.js +++ b/test/cloudron-backup-test.js @@ -48,7 +48,7 @@ describe('Cloudron backup testing', function () { size: '512mb', version: latestVersion }); - appStore.waitForCloudron(box.id); + box = appStore.waitForCloudron(box.id); cloudron = new Cloudron(box); }); @@ -90,19 +90,17 @@ describe('Cloudron backup testing', function () { assert.strictEqual(backupInfo.dependsOn.length, 1); }); - var boxInfo; - it('can restore the box', function () { appStore.restore(box.id, backupInfo.restoreKey); - boxInfo = appStore.waitForCloudron(box.id); + box = appStore.waitForCloudron(box.id); }); it('wait for local dns', function () { for (var i = 0; i < 50; i++) { var ip = dnsSync.resolve(box.domain); - if (ip === boxInfo.ip) return; + if (ip === box.ip) return; - console.log('waiting for local dns to change from %s to %s', ip, boxInfo.ip); + console.log('waiting for local dns to change from %s to %s', ip, box.ip); sleep(30); } }); diff --git a/test/cloudron-update-test.js b/test/cloudron-update-test.js index 73c0fe5..881df95 100644 --- a/test/cloudron-update-test.js +++ b/test/cloudron-update-test.js @@ -62,7 +62,7 @@ describe('Cloudron update testing', function () { size: '512mb', version: fromVersion }); - appStore.waitForCloudron(box.id); + box = appStore.waitForCloudron(box.id); cloudron = new Cloudron(box); }); diff --git a/test/cloudron-user-test.js b/test/cloudron-user-test.js index c08aa20..b1c65a6 100644 --- a/test/cloudron-user-test.js +++ b/test/cloudron-user-test.js @@ -24,7 +24,7 @@ describe('Cloudron user creation testing', function () { var appStore = new AppStore('https://api.staging.cloudron.io'); var owner = common.getOwner(); - var res, latestVersion, cloudron, appId, box, newUser; + var res, latestVersion, cloudron, box, newUser; it('can query versions', function () { res = request.get('https://s3.amazonaws.com/staging-cloudron-releases/versions.json').end(); @@ -46,7 +46,7 @@ describe('Cloudron user creation testing', function () { size: '512mb', version: latestVersion }); - appStore.waitForCloudron(box.id); + box = appStore.waitForCloudron(box.id); cloudron = new Cloudron(box); }); diff --git a/test/new-user-test.js b/test/new-user-test.js index c7c1164..b9a8d6b 100644 --- a/test/new-user-test.js +++ b/test/new-user-test.js @@ -56,7 +56,7 @@ describe('Appstore new user flow', function () { size: '512mb', version: latestVersion }); - appStore.waitForCloudron(box.id); + box = appStore.waitForCloudron(box.id); cloudron = new Cloudron(box); });