sprinkle dnsbl tests

This commit is contained in:
Girish Ramakrishnan 2017-01-12 19:18:12 -08:00
parent 5f115c24c7
commit 45df699586
6 changed files with 34 additions and 0 deletions

View File

@ -628,6 +628,12 @@ Cloudron.prototype.checkAddons = function (domain, owner) {
throw lastError;
};
Cloudron.prototype.checkDnsbl = function (domain) {
var res = request.post('https://' + domain + '/check_dnsbl').end();
common.verifyResponse2xx(res, 'Could not query dnsbl');
assert.strictEqual(res.body.status, 'OK');
};
Cloudron.prototype.setDnsConfig = function (dnsConfig) {
var res = request.post(this._origin + '/api/v1/settings/dns_config').query({ access_token: this._credentials.accessToken }).send(dnsConfig).end();
common.verifyResponse2xx(res, 'Could not set dns config');

View File

@ -71,6 +71,10 @@ describe('Application flow test', function () {
cloudron.checkAddons(cloudron.appFqdn(location), owner);
});
it('can check dnsbl', function () {
cloudron.checkDnsbl(cloudron.appFqdn(location));
});
function checkExposedPort(port, done) {
var client = new net.Socket();
var data = [ ];
@ -104,6 +108,10 @@ describe('Application flow test', function () {
cloudron.checkAddons(cloudron.appFqdn(location), owner);
});
it('can check dnsbl', function () {
cloudron.checkDnsbl(cloudron.appFqdn(location));
});
it('can access exposed port', function (done) {
checkExposedPort(5151, done);
});

View File

@ -132,6 +132,10 @@ describe('Cloudron update testing', function () {
cloudron.checkAddons(cloudron.appFqdn(location), owner);
});
it('can check dnsbl', function () {
cloudron.checkDnsbl(cloudron.appFqdn(location));
});
it('can uninstall app', function () {
cloudron.uninstallApp(appId);
});

View File

@ -144,6 +144,10 @@ describe('Custom domain test', function () {
cloudron.checkAddons(cloudron.appFqdn(location), owner);
});
it('can check dnsbl', function () {
cloudron.checkDnsbl(cloudron.appFqdn(location));
});
it('can migrate to bigger size', function () {
cloudron.migrate({ size: '2gb' });
});

View File

@ -176,6 +176,10 @@ describe('Selfhost DigitalOcean with filesystem backend', function () {
cloudron.checkAddons(cloudron.appFqdn(location), owner);
});
it('can check dnsbl', function () {
cloudron.checkDnsbl(cloudron.appFqdn(location));
});
it('can reboot the cloudron', function () {
cloudron.reboot();
});
@ -188,6 +192,10 @@ describe('Selfhost DigitalOcean with filesystem backend', function () {
cloudron.checkAddons(cloudron.appFqdn(location), owner);
});
it('can check dnsbl', function () {
cloudron.checkDnsbl(cloudron.appFqdn(location));
});
it('can check mail', function (done) {
cloudron.checkMail(owner, done);
});

View File

@ -184,6 +184,10 @@ describe('Selfhost EC2 Cloudron creation', function () {
cloudron.checkAddons(cloudron.appFqdn(location), owner);
});
it('can check dnsbl', function () {
cloudron.checkDnsbl(cloudron.appFqdn(location));
});
it('can reboot the cloudron', function () {
cloudron.reboot();
});