@@ -90,10 +90,10 @@ func TestAccCodefreshPipeline_PremitRestartFromFailedSteps(t *testing.T) {
9090 CheckDestroy : testAccCheckCodefreshPipelineDestroy ,
9191 Steps : []resource.TestStep {
9292 {
93- Config : testAccCodefreshPipelineBasicConfigPermitRestartFromFailedSteps (name , "codefresh-contrib/react-sample-app" , "./codefresh.yml" , "master" , "git" , PermitRestartPermit ),
93+ Config : testAccCodefreshPipelineBasicConfigPermitRestartFromFailedSteps (name , "codefresh-contrib/react-sample-app" , "./codefresh.yml" , "master" , "git" , true ),
9494 Check : resource .ComposeTestCheckFunc (
9595 testAccCheckCodefreshPipelineExists (resourceName , & pipeline ),
96- resource .TestCheckResourceAttr (resourceName , "spec.0.permit_restart_from_failed_steps" , PermitRestartPermit ),
96+ resource .TestCheckResourceAttr (resourceName , "spec.0.permit_restart_from_failed_steps" , "true" ),
9797 ),
9898 },
9999 {
@@ -102,22 +102,10 @@ func TestAccCodefreshPipeline_PremitRestartFromFailedSteps(t *testing.T) {
102102 ImportStateVerify : true ,
103103 },
104104 {
105- Config : testAccCodefreshPipelineBasicConfigPermitRestartFromFailedSteps (name , "codefresh-contrib/react-sample-app" , "./codefresh.yml" , "master" , "git" , PermitRestartForbid ),
105+ Config : testAccCodefreshPipelineBasicConfigPermitRestartFromFailedSteps (name , "codefresh-contrib/react-sample-app" , "./codefresh.yml" , "master" , "git" , false ),
106106 Check : resource .ComposeTestCheckFunc (
107107 testAccCheckCodefreshPipelineExists (resourceName , & pipeline ),
108- resource .TestCheckResourceAttr (resourceName , "spec.0.permit_restart_from_failed_steps" , PermitRestartForbid ),
109- ),
110- },
111- {
112- ResourceName : resourceName ,
113- ImportState : true ,
114- ImportStateVerify : true ,
115- },
116- {
117- Config : testAccCodefreshPipelineBasicConfigPermitRestartFromFailedSteps (name , "codefresh-contrib/react-sample-app" , "./codefresh.yml" , "master" , "git" , PermitRestartUseAccountSettings ),
118- Check : resource .ComposeTestCheckFunc (
119- testAccCheckCodefreshPipelineExists (resourceName , & pipeline ),
120- resource .TestCheckResourceAttr (resourceName , "spec.0.permit_restart_from_failed_steps" , PermitRestartUseAccountSettings ),
108+ resource .TestCheckResourceAttr (resourceName , "spec.0.permit_restart_from_failed_steps" , "false" ),
121109 ),
122110 },
123111 },
@@ -1082,7 +1070,7 @@ resource "codefresh_pipeline" "test" {
10821070` , rName , repo , path , revision , context , concurrency , concurrencyBranch , concurrencyTrigger )
10831071}
10841072
1085- func testAccCodefreshPipelineBasicConfigPermitRestartFromFailedSteps (rName string , repo string , path string , revision string , context string , permitRestartFromFailedSteps string ) string {
1073+ func testAccCodefreshPipelineBasicConfigPermitRestartFromFailedSteps (rName string , repo string , path string , revision string , context string , permitRestartFromFailedSteps bool ) string {
10861074 return fmt .Sprintf (`
10871075resource "codefresh_pipeline" "test" {
10881076
@@ -1102,7 +1090,7 @@ resource "codefresh_pipeline" "test" {
11021090 context = %q
11031091 }
11041092
1105- permit_restart_from_failed_steps = %s
1093+ permit_restart_from_failed_steps = %t
11061094
11071095 }
11081096}
0 commit comments