Create Container tested

This commit is contained in:
Luis Fernando Molina committed 2018-07-02 13:45:29 +02:00
1 parent 31a22bec3f
commit 27bc8ac267
3 files changed
+46 -15

No files matched your search

+15 -5
View File
@@ -1,8 +1,5 @@
exports.newTeamSetup = function newTeamSetup() {
CONSOLE_LOG = true;
LOG_FILE_CONTENT = false;
let thisObject = {
newTeam: newTeam,
initialize: initialize
@@ -61,11 +58,24 @@
console.log("[ERROR] TeamSetup -> newTeam -> createContainer -> onContainerCreated -> Could not create the container. ");
console.log("[ERROR] TeamSetup -> newTeam -> createContainer -> onContainerCreated -> err.message = " + err.message);
callBackFunction(global.DEFAULT_FAIL_RESPONSE);
if (err.message === "ContainerAlreadyExists") {
let err = {
resutl: global.CUSTOM_FAIL_RESPONSE.result,
message: "Team Name already taken"
};
callBackFunction(err);
} else {
callBackFunction(global.DEFAULT_FAIL_RESPONSE);
}
return;
}
callBackFunction(global.DEFAULT_OK_RESPONSE);
addToEcosystem();
}
}