@@ -90,7 +90,7 @@ func TestAccCodefreshPipeline_PremitRestartFromFailedSteps(t *testing.T) {
90
90
CheckDestroy : testAccCheckCodefreshPipelineDestroy ,
91
91
Steps : []resource.TestStep {
92
92
{
93
- Config : testAccCodefreshPipelineBasicConfigPermitRestartFromFailedSteps (name , "codefresh-contrib/react-sample-app" , "./codefresh.yml" , "master" , "git" , true ),
93
+ Config : testAccCodefreshPipelineBasicConfigPermitRestartFromFailedSteps (name , "codefresh-contrib/react-sample-app" , "./codefresh.yml" , "master" , "git" , ptrBool ( true ) ),
94
94
Check : resource .ComposeTestCheckFunc (
95
95
testAccCheckCodefreshPipelineExists (resourceName , & pipeline ),
96
96
resource .TestCheckResourceAttr (resourceName , "spec.0.permit_restart_from_failed_steps" , "true" ),
@@ -102,7 +102,7 @@ func TestAccCodefreshPipeline_PremitRestartFromFailedSteps(t *testing.T) {
102
102
ImportStateVerify : true ,
103
103
},
104
104
{
105
- Config : testAccCodefreshPipelineBasicConfigPermitRestartFromFailedSteps (name , "codefresh-contrib/react-sample-app" , "./codefresh.yml" , "master" , "git" , false ),
105
+ Config : testAccCodefreshPipelineBasicConfigPermitRestartFromFailedSteps (name , "codefresh-contrib/react-sample-app" , "./codefresh.yml" , "master" , "git" , ptrBool ( false ) ),
106
106
Check : resource .ComposeTestCheckFunc (
107
107
testAccCheckCodefreshPipelineExists (resourceName , & pipeline ),
108
108
resource .TestCheckResourceAttr (resourceName , "spec.0.permit_restart_from_failed_steps" , "false" ),
@@ -1069,8 +1069,11 @@ resource "codefresh_pipeline" "test" {
1069
1069
}
1070
1070
` , rName , repo , path , revision , context , concurrency , concurrencyBranch , concurrencyTrigger )
1071
1071
}
1072
+ func ptrBool (b bool ) * bool {
1073
+ return & b
1074
+ }
1072
1075
1073
- func testAccCodefreshPipelineBasicConfigPermitRestartFromFailedSteps (rName string , repo string , path string , revision string , context string , permitRestartFromFailedSteps bool ) string {
1076
+ func testAccCodefreshPipelineBasicConfigPermitRestartFromFailedSteps (rName string , repo string , path string , revision string , context string , permitRestartFromFailedSteps * bool ) string {
1074
1077
return fmt .Sprintf (`
1075
1078
resource "codefresh_pipeline" "test" {
1076
1079
@@ -1094,7 +1097,7 @@ resource "codefresh_pipeline" "test" {
1094
1097
1095
1098
}
1096
1099
}
1097
- ` , rName , repo , path , revision , context , permitRestartFromFailedSteps )
1100
+ ` , rName , repo , path , revision , context , * permitRestartFromFailedSteps )
1098
1101
}
1099
1102
1100
1103
func testAccCodefreshPipelineBasicConfigTriggers (
0 commit comments