make ldap tests pass
This commit is contained in:
@@ -21,7 +21,7 @@ const appdb = require('../appdb.js'),
|
||||
tasks = require('../tasks.js'),
|
||||
users = require('../users.js');
|
||||
|
||||
const MANIFEST = {
|
||||
const manifest = {
|
||||
'id': 'io.cloudron.test',
|
||||
'author': 'The Presidents Of the United States Of America',
|
||||
'title': 'test title',
|
||||
@@ -103,7 +103,7 @@ const app = {
|
||||
location: 'applocation',
|
||||
domain: domain.domain,
|
||||
fqdn: domain.domain + '.' + 'applocation',
|
||||
manifest: MANIFEST,
|
||||
manifest,
|
||||
containerId: 'someid',
|
||||
portBindings: null,
|
||||
accessRestriction: null,
|
||||
@@ -122,21 +122,21 @@ exports = module.exports = {
|
||||
clearMailQueue,
|
||||
|
||||
mockApiServerOrigin: 'http://localhost:6060',
|
||||
DASHBOARD_DOMAIN: 'test.example.com',
|
||||
DASHBOARD_FQDN: 'my.test.example.com',
|
||||
dashboardDomain: 'test.example.com',
|
||||
dashboardFqdn: 'my.test.example.com',
|
||||
|
||||
app,
|
||||
admin,
|
||||
auditSource,
|
||||
domain,
|
||||
MANIFEST,
|
||||
manifest,
|
||||
user,
|
||||
appstoreToken: 'atoken',
|
||||
|
||||
MAILBOX_NAME: 'support',
|
||||
MAILBOX: `support@${domain.domain}`,
|
||||
ALIAS_NAME: 'alsosupport',
|
||||
ALIAS: `alsosupport@${domain.domain}`
|
||||
mailboxName: 'support',
|
||||
mailbox: `support@${domain.domain}`,
|
||||
mailAliasName: 'alsosupport',
|
||||
mailAlias: `alsosupport@${domain.domain}`
|
||||
};
|
||||
|
||||
function createTree(root, obj) {
|
||||
@@ -168,7 +168,7 @@ function domainSetup(done) {
|
||||
database.initialize,
|
||||
database._clear,
|
||||
settings._setApiServerOrigin.bind(null, exports.mockApiServerOrigin),
|
||||
settings.setDashboardLocation.bind(null, exports.DASHBOARD_DOMAIN, exports.DASHBOARD_FQDN),
|
||||
settings.setDashboardLocation.bind(null, exports.dashboardDomain, exports.dashboardFqdn),
|
||||
settings.initCache,
|
||||
blobs.initSecrets,
|
||||
domains.add.bind(null, domain.domain, domain, auditSource),
|
||||
@@ -188,8 +188,8 @@ function setup(done) {
|
||||
const result = await users.add(user.email, user, auditSource);
|
||||
user.id = result;
|
||||
},
|
||||
(done) => mailboxdb.addMailbox(exports.MAILBOX_NAME, domain.domain, { ownerId: user.id, ownerType: mail.OWNERTYPE_USER, active: true }, done),
|
||||
(done) => mailboxdb.setAliasesForName(exports.MAILBOX_NAME, domain.domain, [ { name: exports.ALIAS_NAME, domain: domain.domain} ], done),
|
||||
(done) => mailboxdb.addMailbox(exports.mailboxName, domain.domain, { ownerId: user.id, ownerType: mail.OWNERTYPE_USER, active: true }, done),
|
||||
(done) => mailboxdb.setAliasesForName(exports.mailboxName, domain.domain, [ { name: exports.mailAliasName, domain: domain.domain} ], done),
|
||||
|
||||
tasks.stopAllTasks,
|
||||
], done);
|
||||
|
||||
Reference in New Issue
Block a user