domain: split the config and wellknown routes
we want to add more stuff to the UI like the jitsi URL
This commit is contained in:
@@ -52,12 +52,12 @@ describe('Domains', function () {
|
||||
expect(result).to.be(null);
|
||||
});
|
||||
|
||||
it('can update domain', async function () {
|
||||
it('can set domain config', async function () {
|
||||
const newConfig = {};
|
||||
const newTlsConfig = { provider: 'letsencrypt-staging' };
|
||||
const newDomain = Object.assign({}, DOMAIN_0, { config: newConfig, tlsConfig: newTlsConfig });
|
||||
|
||||
await domains.update(DOMAIN_0.domain, newDomain, auditSource);
|
||||
await domains.setConfig(DOMAIN_0.domain, newDomain, auditSource);
|
||||
|
||||
const result = await domains.get(DOMAIN_0.domain);
|
||||
expect(result.domain).to.equal(DOMAIN_0.domain);
|
||||
@@ -70,6 +70,16 @@ describe('Domains', function () {
|
||||
DOMAIN_0.tlsConfig = newTlsConfig;
|
||||
});
|
||||
|
||||
it('can set domain wellknown', async function () {
|
||||
await domains.setWellKnown(DOMAIN_0.domain, { service: 'some.service' }, auditSource);
|
||||
let result = await domains.get(DOMAIN_0.domain);
|
||||
expect(result.wellKnown).to.eql({ service: 'some.service' });
|
||||
|
||||
await domains.setWellKnown(DOMAIN_0.domain, null, auditSource);
|
||||
result = await domains.get(DOMAIN_0.domain);
|
||||
expect(result.wellKnown).to.eql(null);
|
||||
});
|
||||
|
||||
it('can get all domains', async function () {
|
||||
const result = await domains.list();
|
||||
expect(result.length).to.equal(2);
|
||||
|
||||
Reference in New Issue
Block a user