refs #6436 rollback
This commit is contained in:
parent
48cc499f37
commit
cb55740b68
|
@ -10,7 +10,6 @@ async function init() {
|
||||||
host: process.env.DB_HOST,
|
host: process.env.DB_HOST,
|
||||||
port: process.env.DB_PORT
|
port: process.env.DB_PORT
|
||||||
});
|
});
|
||||||
customBeforeAll();
|
|
||||||
const bootOptions = {dataSources};
|
const bootOptions = {dataSources};
|
||||||
await new Promise((resolve, reject) => {
|
await new Promise((resolve, reject) => {
|
||||||
app.boot(bootOptions,
|
app.boot(bootOptions,
|
||||||
|
@ -24,16 +23,7 @@ async function deinit() {
|
||||||
console.log('Stopping backend.');
|
console.log('Stopping backend.');
|
||||||
await app.disconnect();
|
await app.disconnect();
|
||||||
}
|
}
|
||||||
function customBeforeAll() {
|
|
||||||
Object.assign(beforeAll, {
|
|
||||||
ctx: {
|
|
||||||
req: {
|
|
||||||
accessToken: {userId: 9},
|
|
||||||
headers: {origin: 'http://localhost'},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
init,
|
init,
|
||||||
deinit
|
deinit
|
||||||
|
|
Loading…
Reference in New Issue