MXS-1220: Add server test

The test creates, alters and destroys servers.
This commit is contained in:
Markus Mäkelä
2017-05-04 17:06:40 +03:00
parent a3c683ab87
commit 9495438f2b
6 changed files with 98 additions and 22 deletions

View File

@ -421,7 +421,7 @@ module.exports = function() {
this.validate_func = ajv.compile(json_api_schema)
this.validate = validate_json
this.base_url = "http://localhost:8989/v1"
this.before(function(done) {
this.startMaxScale = function(done) {
child_process.execFile("./before.sh", function(err, stdout, stderr) {
if (process.env.MAXSCALE_DIR == null) {
throw new Error("MAXSCALE_DIR is not set");
@ -429,10 +429,10 @@ module.exports = function() {
done()
})
});
this.after(function(done) {
};
this.stopMaxScale = function(done) {
child_process.execFile("./after.sh", function(err, stdout, stderr) {
done()
})
});
};
}