Skip to content

Commit

Permalink
Chore: move env test is flaky - use never deployed env (#943)
Browse files Browse the repository at this point in the history
  • Loading branch information
chpl authored Aug 26, 2024
1 parent eb0e55d commit 00a265f
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions tests/integration/012_environment/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ resource "env0_environment" "example" {
depends_on = [env0_template_project_assignment.assignment]
force_destroy = true
name = "environment-${random_string.random.result}"
project_id = var.second_run ? env0_project.test_project2.id : env0_project.test_project.id
project_id = env0_project.test_project.id
template_id = env0_template.template.id
configuration {
name = "environment configuration variable"
Expand All @@ -67,6 +67,15 @@ resource "env0_environment" "example" {
drift_detection_cron = var.second_run ? "*/5 * * * *" : "*/10 * * * *"
}

resource "env0_environment" "move_environment" {
depends_on = [env0_template_project_assignment.assignment]
force_destroy = true
name = "environment-move-${random_string.random.result}"
project_id = var.second_run ? env0_project.test_project2.id : env0_project.test_project.id
template_id = env0_template.template.id
prevent_auto_deploy = true
}

resource "env0_custom_role" "custom_role1" {
name = "custom-role-${random_string.random.result}"
permissions = [
Expand Down Expand Up @@ -240,7 +249,10 @@ resource "env0_variable_set" "variable_set2" {
}

resource "env0_environment" "workflow-environment" {
depends_on = [env0_template_project_assignment.assignment_workflow, env0_template_project_assignment.assignment_sub_environment_null_template]
depends_on = [
env0_template_project_assignment.assignment_workflow,
env0_template_project_assignment.assignment_sub_environment_null_template
]
force_destroy = true
name = "environment-workflow-${random_string.random.result}"
project_id = env0_project.test_project.id
Expand Down

0 comments on commit 00a265f

Please sign in to comment.