diff options
Diffstat (limited to 'tests/test_dcae-deployments.js')
-rw-r--r-- | tests/test_dcae-deployments.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/test_dcae-deployments.js b/tests/test_dcae-deployments.js index a010017..ca64d94 100644 --- a/tests/test_dcae-deployments.js +++ b/tests/test_dcae-deployments.js @@ -174,6 +174,23 @@ const Cloudify = { "blueprint_id": blueprint_id || deployment_id }; }, + resp_dep_creation: function(deployment_id) { + return { + "items": [ + { + "status": "terminated", + "id": "ee6b0d21-0257-46a3-bb83-6f61f9ab5f99" + } + ], + "metadata": { + "pagination": { + "total": 1, + "offset": 0, + "size": 10000 + } + } + }; + }, resp_execution: function(deployment_id, blueprint_id, execution_id, terminated, workflow_id) { return { "status": (terminated && "terminated") || "pending", @@ -406,6 +423,12 @@ function test_put_dcae_deployments_success(dh_server) { return JSON.stringify(Cloudify.resp_deploy(DEPLOYMENT_ID_JFL_1, DEPLOYMENT_ID_JFL_1, message.inputs)); }); + nock(dh.CLOUDIFY_URL).get("/api/v2.1/executions?deployment_id=" + DEPLOYMENT_ID_JFL_1 + "&workflow_id=create_deployment_environment&_include=id,status") + .reply(200, function(uri) { + console.log(action_timer.step, "get", dh.CLOUDIFY_URL, uri); + return JSON.stringify(Cloudify.resp_dep_creation(DEPLOYMENT_ID_JFL_1)); + }); + nock(dh.CLOUDIFY_URL).post("/api/v2.1/executions") .reply(201, function(uri, requestBody) { console.log(action_timer.step, "post", dh.CLOUDIFY_URL, uri, JSON.stringify(requestBody)); |