From bb89c0d6ce596e7e533f66ebed8b7d989fd6d876 Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Tue, 20 Sep 2016 11:09:14 +0200 Subject: [PATCH] No more static ips --- appstore.js | 5 +---- cloudron.js | 2 +- test/cloudron-backup-test.js | 4 ++-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/appstore.js b/appstore.js index d13871a..9f9bf89 100644 --- a/appstore.js +++ b/appstore.js @@ -99,13 +99,10 @@ AppStore.prototype.waitForCloudron = function (boxId) { if (!boxInfo) throw new Error('waitForCloudron: could not get cloudron information'); - // check for static ip - if (boxInfo.isCustomDomain && !boxInfo.staticIp) throw new Error('waitForCloudron: could not get cloudron static ip'); - // check for ready state if (boxInfo.status !== 'ready') throw new Error('waitForCloudron: could not get cloudron status'); - debug('Box created in %s minutes with IP:%s (static: %s)'.green, (new Date() - creationTime) / 60000, res.body.box.ip, res.body.box.staticIp); + debug('Box created in %s minutes with IP:%s'.green, (new Date() - creationTime) / 60000, res.body.box.ip); // 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.'); diff --git a/cloudron.js b/cloudron.js index 3ba069d..85b152d 100644 --- a/cloudron.js +++ b/cloudron.js @@ -444,7 +444,7 @@ Cloudron.prototype.setAutoupdatePattern = function (pattern) { }; Cloudron.prototype.checkA = function (callback) { - var expectedIp = this._isCustomDomain ? this._box.staticIp : this._box.ip; + var expectedIp = this._box.ip; dns.resolve4(this._box.domain, function (error, records) { if (error) return callback(error); diff --git a/test/cloudron-backup-test.js b/test/cloudron-backup-test.js index a9cdf3f..6c94c75 100644 --- a/test/cloudron-backup-test.js +++ b/test/cloudron-backup-test.js @@ -153,13 +153,13 @@ describe('Cloudron backup testing', function () { }); it('wait for local dns', function () { - var expectedIp = box.isCustomDomain ? box.staticIp : box.ip; + var expectedIp = box.ip; for (var i = 0; i < 50; i++) { var ip = dnsSync.resolve(box.domain); if (ip === expectedIp) return; - console.log('waiting for local dns to change from %s to %s', ip, box.staticIp); + console.log('waiting for local dns to change from %s to %s', ip, expectedIp); sleep(30); } });