admin -> dashboard
This commit is contained in:
@@ -521,8 +521,8 @@ describe('App API', function () {
|
||||
docker.getContainer(appEntry.containerId).inspect(function (error, data) {
|
||||
expect(error).to.not.be.ok();
|
||||
expect(data.Config.ExposedPorts['7777/tcp']).to.eql({ });
|
||||
expect(data.Config.Env).to.contain('CLOUDRON_WEBADMIN_ORIGIN=' + settings.adminOrigin());
|
||||
expect(data.Config.Env).to.contain('CLOUDRON_API_ORIGIN=' + settings.adminOrigin());
|
||||
expect(data.Config.Env).to.contain('CLOUDRON_WEBADMIN_ORIGIN=' + settings.dashboardOrigin());
|
||||
expect(data.Config.Env).to.contain('CLOUDRON_API_ORIGIN=' + settings.dashboardOrigin());
|
||||
expect(data.Config.Env).to.contain('CLOUDRON=1');
|
||||
expect(data.Config.Env).to.contain('CLOUDRON_APP_ORIGIN=https://' + APP_LOCATION + '.' + DOMAIN_0.domain);
|
||||
expect(data.Config.Env).to.contain('CLOUDRON_APP_DOMAIN=' + APP_LOCATION + '.' + DOMAIN_0.domain);
|
||||
|
||||
@@ -28,7 +28,7 @@ function setup(done) {
|
||||
database._clear,
|
||||
|
||||
settings._setApiServerOrigin.bind(null, 'http://localhost:6060'),
|
||||
settings.setAdminLocation.bind(null, 'appstore-test.example.com', 'my.appstore-test.example.com'),
|
||||
settings.setDashboardLocation.bind(null, 'appstore-test.example.com', 'my.appstore-test.example.com'),
|
||||
|
||||
function createAdmin(callback) {
|
||||
superagent.post(SERVER_URL + '/api/v1/cloudron/activate')
|
||||
|
||||
@@ -185,7 +185,7 @@ describe('Cloudron API', function () {
|
||||
expect(result.statusCode).to.equal(200);
|
||||
expect(result.body.apiServerOrigin).to.eql('http://localhost:6060');
|
||||
expect(result.body.webServerOrigin).to.eql('https://cloudron.io');
|
||||
expect(result.body.adminFqdn).to.eql(settings.adminFqdn());
|
||||
expect(result.body.adminFqdn).to.eql(settings.dashboardFqdn());
|
||||
expect(result.body.version).to.eql(constants.VERSION);
|
||||
expect(result.body.cloudronName).to.be.a('string');
|
||||
|
||||
@@ -200,7 +200,7 @@ describe('Cloudron API', function () {
|
||||
expect(result.statusCode).to.equal(200);
|
||||
expect(result.body.apiServerOrigin).to.eql('http://localhost:6060');
|
||||
expect(result.body.webServerOrigin).to.eql('https://cloudron.io');
|
||||
expect(result.body.adminFqdn).to.eql(settings.adminFqdn());
|
||||
expect(result.body.adminFqdn).to.eql(settings.dashboardFqdn());
|
||||
expect(result.body.version).to.eql(constants.VERSION);
|
||||
expect(result.body.cloudronName).to.be.a('string');
|
||||
done();
|
||||
|
||||
@@ -20,7 +20,7 @@ var async = require('async'),
|
||||
|
||||
var SERVER_URL = 'http://localhost:' + constants.PORT;
|
||||
|
||||
const ADMIN_DOMAIN = {
|
||||
const DASHBOARD_DOMAIN = {
|
||||
domain: 'admin.com',
|
||||
zoneName: 'admin.com',
|
||||
config: {},
|
||||
@@ -49,7 +49,7 @@ function setup(done) {
|
||||
|
||||
function dnsSetup(callback) {
|
||||
superagent.post(SERVER_URL + '/api/v1/cloudron/setup')
|
||||
.send({ dnsConfig: { provider: ADMIN_DOMAIN.provider, domain: ADMIN_DOMAIN.domain, config: ADMIN_DOMAIN.config, tlsConfig: { provider: 'fallback' } } })
|
||||
.send({ dnsConfig: { provider: DASHBOARD_DOMAIN.provider, domain: DASHBOARD_DOMAIN.domain, config: DASHBOARD_DOMAIN.config, tlsConfig: { provider: 'fallback' } } })
|
||||
.end(function (error, result) {
|
||||
expect(result).to.be.ok();
|
||||
expect(result.statusCode).to.eql(200);
|
||||
@@ -170,7 +170,7 @@ describe('Mail API', function () {
|
||||
callback(null, dnsAnswerQueue[hostname][type]);
|
||||
};
|
||||
|
||||
const suffix = crypto.createHash('sha256').update(settings.adminDomain()).digest('hex').substr(0, 6);
|
||||
const suffix = crypto.createHash('sha256').update(settings.dashboardDomain()).digest('hex').substr(0, 6);
|
||||
dkimDomain = `cloudron-${suffix}._domainkey.${DOMAIN_0.domain}`;
|
||||
spfDomain = DOMAIN_0.domain;
|
||||
mxDomain = DOMAIN_0.domain;
|
||||
@@ -230,7 +230,7 @@ describe('Mail API', function () {
|
||||
expect(res.body.dns.spf.domain).to.eql(spfDomain);
|
||||
expect(res.body.dns.spf.type).to.eql('TXT');
|
||||
expect(res.body.dns.spf.value).to.eql(null);
|
||||
expect(res.body.dns.spf.expected).to.eql('v=spf1 a:' + settings.adminFqdn() + ' ~all');
|
||||
expect(res.body.dns.spf.expected).to.eql('v=spf1 a:' + settings.dashboardFqdn() + ' ~all');
|
||||
expect(res.body.dns.spf.status).to.eql(false);
|
||||
|
||||
expect(res.body.dns.dmarc).to.be.an('object');
|
||||
@@ -269,7 +269,7 @@ describe('Mail API', function () {
|
||||
expect(res.statusCode).to.equal(200);
|
||||
|
||||
expect(res.body.dns.spf).to.be.an('object');
|
||||
expect(res.body.dns.spf.expected).to.eql('v=spf1 a:' + settings.adminFqdn() + ' ~all');
|
||||
expect(res.body.dns.spf.expected).to.eql('v=spf1 a:' + settings.dashboardFqdn() + ' ~all');
|
||||
expect(res.body.dns.spf.status).to.eql(false);
|
||||
expect(res.body.dns.spf.value).to.eql(null);
|
||||
|
||||
@@ -311,7 +311,7 @@ describe('Mail API', function () {
|
||||
expect(res.statusCode).to.equal(200);
|
||||
|
||||
expect(res.body.dns.spf).to.be.an('object');
|
||||
expect(res.body.dns.spf.expected).to.eql('v=spf1 a:' + settings.adminFqdn() + ' a:random.com ~all');
|
||||
expect(res.body.dns.spf.expected).to.eql('v=spf1 a:' + settings.dashboardFqdn() + ' a:random.com ~all');
|
||||
expect(res.body.dns.spf.status).to.eql(false);
|
||||
expect(res.body.dns.spf.value).to.eql('v=spf1 a:random.com ~all');
|
||||
|
||||
@@ -387,7 +387,7 @@ describe('Mail API', function () {
|
||||
dnsAnswerQueue[mxDomain].MX = [ { priority: '10', exchange: settings.mailFqdn() } ];
|
||||
dnsAnswerQueue[dmarcDomain].TXT = [['v=DMARC1; p=reject; pct=100']];
|
||||
dnsAnswerQueue[dkimDomain].TXT = [['v=DKIM1; t=s; p=', mail._readDkimPublicKeySync(DOMAIN_0.domain) ]];
|
||||
dnsAnswerQueue[spfDomain].TXT = [['v=spf1 a:' + settings.adminFqdn() + ' ~all']];
|
||||
dnsAnswerQueue[spfDomain].TXT = [['v=spf1 a:' + settings.dashboardFqdn() + ' ~all']];
|
||||
|
||||
superagent.get(SERVER_URL + '/api/v1/mail/' + DOMAIN_0.domain + '/status')
|
||||
.query({ access_token: token })
|
||||
@@ -404,8 +404,8 @@ describe('Mail API', function () {
|
||||
expect(res.body.dns.spf).to.be.an('object');
|
||||
expect(res.body.dns.spf.domain).to.eql(spfDomain);
|
||||
expect(res.body.dns.spf.type).to.eql('TXT');
|
||||
expect(res.body.dns.spf.value).to.eql('v=spf1 a:' + settings.adminFqdn() + ' ~all');
|
||||
expect(res.body.dns.spf.expected).to.eql('v=spf1 a:' + settings.adminFqdn() + ' ~all');
|
||||
expect(res.body.dns.spf.value).to.eql('v=spf1 a:' + settings.dashboardFqdn() + ' ~all');
|
||||
expect(res.body.dns.spf.expected).to.eql('v=spf1 a:' + settings.dashboardFqdn() + ' ~all');
|
||||
expect(res.body.dns.spf.status).to.eql(true);
|
||||
|
||||
expect(res.body.dns.dmarc).to.be.an('object');
|
||||
|
||||
Reference in New Issue
Block a user