Add env and debug mode tests

This commit is contained in:
Girish Ramakrishnan
2019-09-09 15:35:02 -07:00
parent 801ca7eda1
commit 5f9b2f1159
3 changed files with 156 additions and 4 deletions

View File

@@ -940,7 +940,6 @@ function setMemoryLimit(appId, memoryLimit, auditSource, callback) {
function setEnvironment(appId, env, auditSource, callback) {
assert.strictEqual(typeof appId, 'string');
assert.strictEqual(typeof env, 'object');
assert.strictEqual(typeof memoryLimit, 'number');
assert.strictEqual(typeof auditSource, 'object');
assert.strictEqual(typeof callback, 'function');
@@ -950,7 +949,7 @@ function setEnvironment(appId, env, auditSource, callback) {
error = validateEnv(env);
if (error) return callback(error);
scheduleTask(appId, {}, { installationState: exports.ISTATE_PENDING_CREATE, env: env }, function (error, result) {
scheduleTask(appId, {}, { installationState: exports.ISTATE_PENDING_CREATE_CONTAINER, env: env }, function (error, result) {
if (error) return callback(error);
eventlog.add(eventlog.ACTION_APP_CONFIGURE, auditSource, { appId: appId, app: app, env: env, taskId: result.taskId });
@@ -972,7 +971,7 @@ function setDebugMode(appId, debugMode, auditSource, callback) {
error = validateDebugMode(debugMode);
if (error) return callback(error);
scheduleTask(appId, {}, { installationState: exports.ISTATE_PENDING_CREATE, debugMode: debugMode }, function (error, result) {
scheduleTask(appId, {}, { installationState: exports.ISTATE_PENDING_CREATE_CONTAINER, debugMode: debugMode }, function (error, result) {
if (error) return callback(error);
eventlog.add(eventlog.ACTION_APP_CONFIGURE, auditSource, { appId: appId, app: app, debugMode: debugMode, taskId: result.taskId });