set the dns config

This commit is contained in:
Girish Ramakrishnan 2015-10-30 21:12:41 -07:00
parent 2e49a799a6
commit be29616dde
2 changed files with 9 additions and 0 deletions

View File

@ -333,3 +333,8 @@ Cloudron.prototype.checkAddons = function (location, owner) {
throw lastError;
};
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.verifyResponse2(res, 'Could not set dns config');
};

View File

@ -65,6 +65,10 @@ describe('Appstore new user flow', function () {
cloudron.activate(owner);
});
it('can set dns config', function () {
cloudron.setDnsConfig({ provider: 'caas' });
});
it('can login to the box', function () {
var token = cloudron.getOauthToken(owner);
cloudron.setCredentials(owner.password, token);