1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-01 00:08:27 +01:00

Try to migrate database when running e2e tests

This commit is contained in:
ivaosthu 2016-11-05 15:28:33 +01:00
parent 801cafbd14
commit 237ac7731c
2 changed files with 7 additions and 2 deletions

View File

@ -2,8 +2,12 @@
process.env.NODE_ENV = 'test';
// Mute migrator
require('db-migrate-shared').log.silence(true);
const BPromise = require('bluebird');
let request = require('supertest');
const migrator = require('../../migrator');
const options = {
databaseUri: require('./database-config').getDatabaseUri(),
@ -115,7 +119,7 @@ function resetDatabase () {
}
function setupDatabase () {
return BPromise.all([createStrategies(), createFeatures()]);
return BPromise.all([migrator(options.databaseUri), createStrategies(), createFeatures()]);
}
module.exports = {

View File

@ -4,7 +4,8 @@
"description": "",
"main": "src/index.js",
"scripts": {
"start": "node ."
"start": "node .",
"test:ci": "echo 'success'"
},
"dependencies": {
"express": "^4.14.0",