Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Commit 4b6c5db

Browse files
committed
tests: Make plan visible during test failure
1 parent 52e6385 commit 4b6c5db

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

octopusdeploy/schema_action_apply_terraform_template_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,11 @@ func testAccCheckApplyTerraformAction(name string, runOnServer bool, isPlan bool
112112
action := process.Steps[0].Actions[0]
113113

114114
if !isPlan && action.ActionType != "Octopus.TerraformApply" {
115-
return fmt.Errorf("Action type is incorrect: %s", action.ActionType)
115+
return fmt.Errorf("Action type is incorrect: %s, isPlan: %s", action.ActionType, strconv.FormatBool(isPlan))
116116
}
117117

118118
if isPlan && action.ActionType != "Octopus.TerraformPlan" {
119-
return fmt.Errorf("Action type is incorrect: %s", action.ActionType)
119+
return fmt.Errorf("Action type is incorrect: %s, isPlan: %s", action.ActionType, strconv.FormatBool(isPlan))
120120
}
121121

122122
if action.Properties["Octopus.Action.Terraform.AdditionalInitParams"].Value != initParameters {

octopusdeploy/schema_action_destroy_terraform_template_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,11 @@ func testAccCheckDestroyTerraformAction(name string, runOnServer bool, isPlan bo
112112
action := process.Steps[0].Actions[0]
113113

114114
if !isPlan && action.ActionType != "Octopus.TerraformDestroy" {
115-
return fmt.Errorf("Action type is incorrect: %s", action.ActionType)
115+
return fmt.Errorf("Action type is incorrect: %s, isPlan: %s", action.ActionType, strconv.FormatBool(isPlan))
116116
}
117117

118118
if isPlan && action.ActionType != "Octopus.TerraformPlanDestroy" {
119-
return fmt.Errorf("Action type is incorrect: %s", action.ActionType)
119+
return fmt.Errorf("Action type is incorrect: %s, isPlan: %s", action.ActionType, strconv.FormatBool(isPlan))
120120
}
121121

122122
if action.Properties["Octopus.Action.Terraform.AdditionalInitParams"].Value != initParameters {

0 commit comments

Comments
 (0)