Test IP based access

This commit is contained in:
Girish Ramakrishnan 2017-01-30 16:23:08 -08:00
parent 8419e92df9
commit 9cc23e899c

View File

@ -12,7 +12,8 @@ var AppStore = require('../appstore.js'),
Cloudron = require('../cloudron.js'),
common = require('../common.js'),
dns = require('dns'),
ImapProbe = require('../imap-probe.js');
ImapProbe = require('../imap-probe.js'),
request = require('superagent-sync');
require('colors');
@ -113,6 +114,12 @@ describe('Appstore new user flow', function () {
cloudron.checkTimeZone('America/New_York'); // this is the timezone of the ec2 ci machine
});
it('gets redirected for IP based access', function () {
var res = request.get('https://' + box.ip + '/api/v1/cloudron/status').end();
assert.strictEqual(res.statusCode, 200);
assert.strictEqual(res.body.version, box.version);
});
// check this after activation
it('has setup DNS records correctly', function (done) {
async.series([