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:
parent
801cafbd14
commit
237ac7731c
@ -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 = {
|
||||
|
@ -4,7 +4,8 @@
|
||||
"description": "",
|
||||
"main": "src/index.js",
|
||||
"scripts": {
|
||||
"start": "node ."
|
||||
"start": "node .",
|
||||
"test:ci": "echo 'success'"
|
||||
},
|
||||
"dependencies": {
|
||||
"express": "^4.14.0",
|
||||
|
Loading…
Reference in New Issue
Block a user