use staticIp
This commit is contained in:
parent
8c72602c0f
commit
49b78bc3e2
|
@ -103,7 +103,7 @@ AppStore.prototype.waitForCloudron = function (boxId) {
|
||||||
// check for ready state
|
// check for ready state
|
||||||
if (!boxInfo || boxInfo.status !== 'ready') throw new Error('waitForCloudron: could not get cloudron status');
|
if (!boxInfo || boxInfo.status !== 'ready') throw new Error('waitForCloudron: could not get cloudron status');
|
||||||
|
|
||||||
debug('Box created in %s minutes with IP:%s'.green, (new Date() - creationTime) / 60000, res.body.box.ip);
|
debug('Box created in %s minutes with IP:%s (static: %s)'.green, (new Date() - creationTime) / 60000, res.body.box.ip, res.body.box.staticIp);
|
||||||
|
|
||||||
// even if the cloudron sent heartbeat to appstore, doesn't mean we can contact the cloudron thanks to DO networking insanity
|
// even if the cloudron sent heartbeat to appstore, doesn't mean we can contact the cloudron thanks to DO networking insanity
|
||||||
process.stdout.write('Waiting for Cloudron to be reachable.');
|
process.stdout.write('Waiting for Cloudron to be reachable.');
|
||||||
|
|
|
@ -449,7 +449,7 @@ Cloudron.prototype.checkA = function (callback) {
|
||||||
if (error) return callback(error);
|
if (error) return callback(error);
|
||||||
if (records.length !== 1) return callback(new Error('Got ' + JSON.stringify(records) + ' A records. Expecting 1 length array'));
|
if (records.length !== 1) return callback(new Error('Got ' + JSON.stringify(records) + ' A records. Expecting 1 length array'));
|
||||||
|
|
||||||
if (records[0] !== that._box.ip) return callback(new Error('Bad A record. ' + records[0] + '. Expecting ' + that._box.ip));
|
if (records[0] !== that._box.staticIp) return callback(new Error('Bad A record. ' + records[0] + '. Expecting ' + that._box.staticIp));
|
||||||
|
|
||||||
callback(null, records);
|
callback(null, records);
|
||||||
});
|
});
|
||||||
|
|
|
@ -155,9 +155,9 @@ describe('Cloudron backup testing', function () {
|
||||||
it('wait for local dns', function () {
|
it('wait for local dns', function () {
|
||||||
for (var i = 0; i < 50; i++) {
|
for (var i = 0; i < 50; i++) {
|
||||||
var ip = dnsSync.resolve(box.domain);
|
var ip = dnsSync.resolve(box.domain);
|
||||||
if (ip === box.ip) return;
|
if (ip === box.staticIp) return;
|
||||||
|
|
||||||
console.log('waiting for local dns to change from %s to %s', ip, box.ip);
|
console.log('waiting for local dns to change from %s to %s', ip, box.staticIp);
|
||||||
sleep(30);
|
sleep(30);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue