@@ -90,10 +90,10 @@ 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" , PermitRestartPermit ),
93
+ Config : testAccCodefreshPipelineBasicConfigPermitRestartFromFailedSteps (name , "codefresh-contrib/react-sample-app" , "./codefresh.yml" , "master" , "git" , true ),
94
94
Check : resource .ComposeTestCheckFunc (
95
95
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" ),
97
97
),
98
98
},
99
99
{
@@ -102,22 +102,10 @@ 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" , PermitRestartForbid ),
105
+ Config : testAccCodefreshPipelineBasicConfigPermitRestartFromFailedSteps (name , "codefresh-contrib/react-sample-app" , "./codefresh.yml" , "master" , "git" , false ),
106
106
Check : resource .ComposeTestCheckFunc (
107
107
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" ),
121
109
),
122
110
},
123
111
},
@@ -1082,7 +1070,7 @@ resource "codefresh_pipeline" "test" {
1082
1070
` , rName , repo , path , revision , context , concurrency , concurrencyBranch , concurrencyTrigger )
1083
1071
}
1084
1072
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 {
1086
1074
return fmt .Sprintf (`
1087
1075
resource "codefresh_pipeline" "test" {
1088
1076
@@ -1102,7 +1090,7 @@ resource "codefresh_pipeline" "test" {
1102
1090
context = %q
1103
1091
}
1104
1092
1105
- permit_restart_from_failed_steps = %s
1093
+ permit_restart_from_failed_steps = %t
1106
1094
1107
1095
}
1108
1096
}
0 commit comments