mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-06 00:07:44 +01:00
Try to migrate database when running e2e tests
This commit is contained in:
parent
801cafbd14
commit
237ac7731c
@ -2,8 +2,12 @@
|
|||||||
|
|
||||||
process.env.NODE_ENV = 'test';
|
process.env.NODE_ENV = 'test';
|
||||||
|
|
||||||
|
// Mute migrator
|
||||||
|
require('db-migrate-shared').log.silence(true);
|
||||||
|
|
||||||
const BPromise = require('bluebird');
|
const BPromise = require('bluebird');
|
||||||
let request = require('supertest');
|
let request = require('supertest');
|
||||||
|
const migrator = require('../../migrator');
|
||||||
|
|
||||||
const options = {
|
const options = {
|
||||||
databaseUri: require('./database-config').getDatabaseUri(),
|
databaseUri: require('./database-config').getDatabaseUri(),
|
||||||
@ -115,7 +119,7 @@ function resetDatabase () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setupDatabase () {
|
function setupDatabase () {
|
||||||
return BPromise.all([createStrategies(), createFeatures()]);
|
return BPromise.all([migrator(options.databaseUri), createStrategies(), createFeatures()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
@ -4,7 +4,8 @@
|
|||||||
"description": "",
|
"description": "",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node ."
|
"start": "node .",
|
||||||
|
"test:ci": "echo 'success'"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"express": "^4.14.0",
|
"express": "^4.14.0",
|
||||||
|
Loading…
Reference in New Issue
Block a user