2018-08-09 20:24:02 +00:00
|
|
|
require("chromedriver");
|
2018-08-26 08:30:43 +00:00
|
|
|
import ChildProcess = require('child_process');
|
|
|
|
import Bluebird = require("bluebird");
|
|
|
|
|
2018-08-09 20:24:02 +00:00
|
|
|
import Environment = require('../environment');
|
|
|
|
|
2018-08-26 08:30:43 +00:00
|
|
|
const execAsync = Bluebird.promisify(ChildProcess.exec);
|
|
|
|
|
2018-08-09 20:24:02 +00:00
|
|
|
const includes = [
|
|
|
|
"docker-compose.minimal.yml",
|
|
|
|
"example/compose/docker-compose.base.yml",
|
|
|
|
"example/compose/nginx/minimal/docker-compose.yml",
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
before(function() {
|
|
|
|
this.timeout(20000);
|
2018-08-19 14:51:36 +00:00
|
|
|
this.environment = new Environment.Environment(includes);
|
2018-08-26 08:30:43 +00:00
|
|
|
|
|
|
|
return execAsync("cp users_database.yml users_database.test.yml")
|
|
|
|
.then(() => this.environment.setup(2000));
|
2018-08-09 20:24:02 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
after(function() {
|
|
|
|
this.timeout(30000);
|
2018-08-26 08:30:43 +00:00
|
|
|
return execAsync("rm users_database.test.yml")
|
|
|
|
.then(() => {
|
|
|
|
if(process.env.KEEP_ENV != "true") {
|
|
|
|
return this.environment.cleanup();
|
|
|
|
}
|
|
|
|
});
|
2018-08-09 20:24:02 +00:00
|
|
|
});
|