Fixup the unit tests
This commit is contained in:
@@ -167,8 +167,7 @@ describe('OAuth2', function () {
|
||||
domain: DOMAIN_0.domain,
|
||||
portBindings: {},
|
||||
accessRestriction: null,
|
||||
memoryLimit: 0,
|
||||
altDomain: null
|
||||
memoryLimit: 0
|
||||
};
|
||||
|
||||
var APP_1 = {
|
||||
@@ -179,8 +178,7 @@ describe('OAuth2', function () {
|
||||
domain: DOMAIN_0.domain,
|
||||
portBindings: {},
|
||||
accessRestriction: { users: [ 'foobar' ] },
|
||||
memoryLimit: 0,
|
||||
altDomain: null
|
||||
memoryLimit: 0
|
||||
};
|
||||
|
||||
var APP_2 = {
|
||||
@@ -191,8 +189,7 @@ describe('OAuth2', function () {
|
||||
domain: DOMAIN_0.domain,
|
||||
portBindings: {},
|
||||
accessRestriction: { users: [ USER_0.id ] },
|
||||
memoryLimit: 0,
|
||||
altDomain: null
|
||||
memoryLimit: 0
|
||||
};
|
||||
|
||||
var APP_3 = {
|
||||
@@ -203,8 +200,7 @@ describe('OAuth2', function () {
|
||||
domain: DOMAIN_0.domain,
|
||||
portBindings: {},
|
||||
accessRestriction: { groups: [ 'someothergroup', 'admin', 'anothergroup' ] },
|
||||
memoryLimit: 0,
|
||||
altDomain: null
|
||||
memoryLimit: 0
|
||||
};
|
||||
|
||||
// unknown app
|
||||
|
||||
@@ -210,7 +210,6 @@ describe('database', function () {
|
||||
oldConfig: null,
|
||||
newConfig: null,
|
||||
memoryLimit: 4294967296,
|
||||
altDomain: null,
|
||||
xFrameOptions: 'DENY',
|
||||
sso: true,
|
||||
debugMode: null,
|
||||
@@ -716,7 +715,6 @@ describe('database', function () {
|
||||
oldConfig: null,
|
||||
updateConfig: null,
|
||||
memoryLimit: 4294967296,
|
||||
altDomain: null,
|
||||
xFrameOptions: 'DENY',
|
||||
sso: true,
|
||||
debugMode: null,
|
||||
@@ -743,7 +741,6 @@ describe('database', function () {
|
||||
oldConfig: null,
|
||||
updateConfig: null,
|
||||
memoryLimit: 0,
|
||||
altDomain: null,
|
||||
xFrameOptions: 'SAMEORIGIN',
|
||||
sso: true,
|
||||
debugMode: null,
|
||||
|
||||
@@ -133,24 +133,6 @@ describe('Certificates', function () {
|
||||
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 () {
|
||||
@@ -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) {
|
||||
reverseProxy._getApi({ domain: DOMAIN_0.domain }, function (error, api, options) {
|
||||
expect(error).to.be(null);
|
||||
@@ -222,14 +195,5 @@ describe('Certificates', function () {
|
||||
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