diff --git a/src/test/java/io/gaia_app/e2e/CucumberContextConfiguration.java b/src/test/java/io/gaia_app/e2e/CucumberContextConfiguration.java index 599abc41b..9ef24c78b 100644 --- a/src/test/java/io/gaia_app/e2e/CucumberContextConfiguration.java +++ b/src/test/java/io/gaia_app/e2e/CucumberContextConfiguration.java @@ -33,6 +33,7 @@ public void setup_cucumber_spring_context() { mongo.runScript("40_job.js"); mongo.runScript("50_step.js"); mongo.runScript("60_terraformState.js"); + mongo.runScript("80_plan.js"); } @After diff --git a/src/test/resources/db/50_step.js b/src/test/resources/db/50_step.js index ee4411b29..90e765ff4 100644 --- a/src/test/resources/db/50_step.js +++ b/src/test/resources/db/50_step.js @@ -32,6 +32,10 @@ gaia.step.insert([ "type" : "PLAN", "status" : "FINISHED", "logs" : "", + "plan": { + "$ref" : "plan", + "$id" : "1f38d7e3-b7d5-4bbb-9a75-1c1ea35dfee9" + }, "_class" : "io.gaia_app.stacks.bo.Step" }, { diff --git a/src/test/resources/db/80_plan.js b/src/test/resources/db/80_plan.js new file mode 100644 index 000000000..5bd8afc8a --- /dev/null +++ b/src/test/resources/db/80_plan.js @@ -0,0 +1,21 @@ +gaia = db.getSiblingDB('gaia'); +gaia.plan.drop(); +gaia.plan.insert([ + { + '_id': '1f38d7e3-b7d5-4bbb-9a75-1c1ea35dfee9', + 'terraform_version': '0.12.29', + 'resource_changes': [ + { + 'address': 'docker_container.mongo', + 'provider_name': 'docker', + 'type': 'docker_container', + 'change': { 'actions': ['CREATE'] }, + }, { + 'address': 'docker_image.mongo', + 'provider_name': 'docker', + 'type': 'docker_image', + 'change': { 'actions': ['CREATE'] }, + }], + '_class': 'io.gaia_app.stacks.bo.Plan', + }, +]);