update box object

This commit is contained in:
Girish Ramakrishnan 2015-09-28 21:02:27 -07:00
parent 408ea0a2f8
commit 3a0b4c710f
5 changed files with 9 additions and 11 deletions

View File

@ -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);
});

View File

@ -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);
}
});

View File

@ -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);
});

View File

@ -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);
});

View File

@ -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);
});