Fixup the unit tests
This commit is contained in:
@@ -167,8 +167,7 @@ describe('OAuth2', function () {
|
|||||||
domain: DOMAIN_0.domain,
|
domain: DOMAIN_0.domain,
|
||||||
portBindings: {},
|
portBindings: {},
|
||||||
accessRestriction: null,
|
accessRestriction: null,
|
||||||
memoryLimit: 0,
|
memoryLimit: 0
|
||||||
altDomain: null
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var APP_1 = {
|
var APP_1 = {
|
||||||
@@ -179,8 +178,7 @@ describe('OAuth2', function () {
|
|||||||
domain: DOMAIN_0.domain,
|
domain: DOMAIN_0.domain,
|
||||||
portBindings: {},
|
portBindings: {},
|
||||||
accessRestriction: { users: [ 'foobar' ] },
|
accessRestriction: { users: [ 'foobar' ] },
|
||||||
memoryLimit: 0,
|
memoryLimit: 0
|
||||||
altDomain: null
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var APP_2 = {
|
var APP_2 = {
|
||||||
@@ -191,8 +189,7 @@ describe('OAuth2', function () {
|
|||||||
domain: DOMAIN_0.domain,
|
domain: DOMAIN_0.domain,
|
||||||
portBindings: {},
|
portBindings: {},
|
||||||
accessRestriction: { users: [ USER_0.id ] },
|
accessRestriction: { users: [ USER_0.id ] },
|
||||||
memoryLimit: 0,
|
memoryLimit: 0
|
||||||
altDomain: null
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var APP_3 = {
|
var APP_3 = {
|
||||||
@@ -203,8 +200,7 @@ describe('OAuth2', function () {
|
|||||||
domain: DOMAIN_0.domain,
|
domain: DOMAIN_0.domain,
|
||||||
portBindings: {},
|
portBindings: {},
|
||||||
accessRestriction: { groups: [ 'someothergroup', 'admin', 'anothergroup' ] },
|
accessRestriction: { groups: [ 'someothergroup', 'admin', 'anothergroup' ] },
|
||||||
memoryLimit: 0,
|
memoryLimit: 0
|
||||||
altDomain: null
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// unknown app
|
// unknown app
|
||||||
|
|||||||
@@ -210,7 +210,6 @@ describe('database', function () {
|
|||||||
oldConfig: null,
|
oldConfig: null,
|
||||||
newConfig: null,
|
newConfig: null,
|
||||||
memoryLimit: 4294967296,
|
memoryLimit: 4294967296,
|
||||||
altDomain: null,
|
|
||||||
xFrameOptions: 'DENY',
|
xFrameOptions: 'DENY',
|
||||||
sso: true,
|
sso: true,
|
||||||
debugMode: null,
|
debugMode: null,
|
||||||
@@ -716,7 +715,6 @@ describe('database', function () {
|
|||||||
oldConfig: null,
|
oldConfig: null,
|
||||||
updateConfig: null,
|
updateConfig: null,
|
||||||
memoryLimit: 4294967296,
|
memoryLimit: 4294967296,
|
||||||
altDomain: null,
|
|
||||||
xFrameOptions: 'DENY',
|
xFrameOptions: 'DENY',
|
||||||
sso: true,
|
sso: true,
|
||||||
debugMode: null,
|
debugMode: null,
|
||||||
@@ -743,7 +741,6 @@ describe('database', function () {
|
|||||||
oldConfig: null,
|
oldConfig: null,
|
||||||
updateConfig: null,
|
updateConfig: null,
|
||||||
memoryLimit: 0,
|
memoryLimit: 0,
|
||||||
altDomain: null,
|
|
||||||
xFrameOptions: 'SAMEORIGIN',
|
xFrameOptions: 'SAMEORIGIN',
|
||||||
sso: true,
|
sso: true,
|
||||||
debugMode: null,
|
debugMode: null,
|
||||||
|
|||||||
@@ -133,24 +133,6 @@ describe('Certificates', function () {
|
|||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('returns prod-acme with altDomain in prod cloudron', function (done) {
|
|
||||||
reverseProxy._getApi({ domain: DOMAIN_0.domain, altDomain: 'foo.something.com' }, function (error, api, options) {
|
|
||||||
expect(error).to.be(null);
|
|
||||||
expect(api._name).to.be('acme');
|
|
||||||
expect(options.prod).to.be(true);
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it('returns prod acme with altDomain in dev cloudron', function (done) {
|
|
||||||
reverseProxy._getApi({ domain: DOMAIN_0.domain, altDomain: 'foo.something.com' }, function (error, api, options) {
|
|
||||||
expect(error).to.be(null);
|
|
||||||
expect(api._name).to.be('acme');
|
|
||||||
expect(options.prod).to.be(true);
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('getApi - letsencrypt-prod', function () {
|
describe('getApi - letsencrypt-prod', function () {
|
||||||
@@ -174,15 +156,6 @@ describe('Certificates', function () {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('returns prod acme with altDomain in prod cloudron', function (done) {
|
|
||||||
reverseProxy._getApi({ domain: DOMAIN_0.domain, altDomain: 'foo.bar.com' }, function (error, api, options) {
|
|
||||||
expect(error).to.be(null);
|
|
||||||
expect(api._name).to.be('acme');
|
|
||||||
expect(options.prod).to.be(true);
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it('returns prod acme in dev cloudron', function (done) {
|
it('returns prod acme in dev cloudron', function (done) {
|
||||||
reverseProxy._getApi({ domain: DOMAIN_0.domain }, function (error, api, options) {
|
reverseProxy._getApi({ domain: DOMAIN_0.domain }, function (error, api, options) {
|
||||||
expect(error).to.be(null);
|
expect(error).to.be(null);
|
||||||
@@ -222,14 +195,5 @@ describe('Certificates', function () {
|
|||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('returns staging acme with altDomain in prod cloudron', function (done) {
|
|
||||||
reverseProxy._getApi({ domain: DOMAIN_0.domain, altDomain: 'foo.bar.com' }, function (error, api, options) {
|
|
||||||
expect(error).to.be(null);
|
|
||||||
expect(api._name).to.be('acme');
|
|
||||||
expect(options.prod).to.be(false);
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user