7
7
"testing"
8
8
9
9
"github.com/argoproj-labs/terraform-provider-argocd/internal/features"
10
- "github.com/hashicorp/terraform-plugin-sdk/v2 /helper/acctest"
11
- "github.com/hashicorp/terraform-plugin-sdk/v2 /helper/resource"
10
+ "github.com/hashicorp/terraform-plugin-testing /helper/acctest"
11
+ "github.com/hashicorp/terraform-plugin-testing /helper/resource"
12
12
)
13
13
14
14
func TestAccArgoCDApplication (t * testing.T ) {
@@ -40,7 +40,7 @@ func TestAccArgoCDApplication(t *testing.T) {
40
40
ResourceName : "argocd_application." + name ,
41
41
ImportState : true ,
42
42
ImportStateVerify : true ,
43
- ImportStateVerifyIgnore : []string {"wait" , "cascade" , "metadata.0.generation" , "metadata.0.resource_version" , "status" , "validate" },
43
+ ImportStateVerifyIgnore : []string {"wait" , "cascade" , "metadata.0.generation" , "metadata.0.resource_version" , "status" , "validate" , "spec.0.source.0.helm.0.parameter.0.force_string" },
44
44
},
45
45
{
46
46
// Update
@@ -154,7 +154,7 @@ ingress:
154
154
ResourceName : "argocd_application.helm" ,
155
155
ImportState : true ,
156
156
ImportStateVerify : true ,
157
- ImportStateVerifyIgnore : []string {"wait" , "cascade" , "metadata.0.generation" , "metadata.0.resource_version" , "status" , "validate" },
157
+ ImportStateVerifyIgnore : []string {"wait" , "cascade" , "metadata.0.generation" , "metadata.0.resource_version" , "status" , "validate" , "spec.0.source.0.helm.0.parameter.0.force_string" , "spec.0.source.0.helm.0.parameter.1.force_string" },
158
158
},
159
159
},
160
160
})
@@ -304,7 +304,7 @@ func TestAccArgoCDApplication_IgnoreDifferences(t *testing.T) {
304
304
ResourceName : "argocd_application.ignore_differences" ,
305
305
ImportState : true ,
306
306
ImportStateVerify : true ,
307
- ImportStateVerifyIgnore : []string {"wait" , "cascade" , "status" , "validate" },
307
+ ImportStateVerifyIgnore : []string {"wait" , "cascade" , "status" , "validate" , "metadata.0.generation" , "metadata.0.resource_version" },
308
308
},
309
309
{
310
310
Config : testAccArgoCDApplicationIgnoreDiffJQPathExpressions (
@@ -330,7 +330,7 @@ func TestAccArgoCDApplication_IgnoreDifferences(t *testing.T) {
330
330
ResourceName : "argocd_application.ignore_differences_jqpe" ,
331
331
ImportState : true ,
332
332
ImportStateVerify : true ,
333
- ImportStateVerifyIgnore : []string {"wait" , "cascade" , "status" , "validate" },
333
+ ImportStateVerifyIgnore : []string {"wait" , "cascade" , "status" , "validate" , "metadata.0.generation" , "metadata.0.resource_version" },
334
334
},
335
335
{
336
336
Config : testAccArgoCDApplicationIgnoreDiffManagedFieldsManagers (
@@ -356,7 +356,7 @@ func TestAccArgoCDApplication_IgnoreDifferences(t *testing.T) {
356
356
ResourceName : "argocd_application.ignore_differences_managed_fields_managers" ,
357
357
ImportState : true ,
358
358
ImportStateVerify : true ,
359
- ImportStateVerifyIgnore : []string {"wait" , "cascade" , "status" , "validate" },
359
+ ImportStateVerifyIgnore : []string {"wait" , "cascade" , "status" , "validate" , "metadata.0.generation" , "metadata.0.resource_version" },
360
360
},
361
361
},
362
362
})
@@ -390,7 +390,7 @@ func TestAccArgoCDApplication_RevisionHistoryLimit(t *testing.T) {
390
390
ResourceName : "argocd_application.revision_history_limit" ,
391
391
ImportState : true ,
392
392
ImportStateVerify : true ,
393
- ImportStateVerifyIgnore : []string {"wait" , "cascade" , "status" , "validate" },
393
+ ImportStateVerifyIgnore : []string {"wait" , "cascade" , "status" , "validate" , "metadata.0.generation" , "metadata.0.resource_version" , "spec.0.source.0.helm.0.parameter.0.force_string" , "spec.0.source.0.helm.0.parameter.1.force_string" },
394
394
},
395
395
},
396
396
})
@@ -419,7 +419,7 @@ func TestAccArgoCDApplication_OptionalDestinationNamespace(t *testing.T) {
419
419
ResourceName : "argocd_application.no_namespace" ,
420
420
ImportState : true ,
421
421
ImportStateVerify : true ,
422
- ImportStateVerifyIgnore : []string {"wait" , "cascade" , "status" , "validate" },
422
+ ImportStateVerifyIgnore : []string {"wait" , "cascade" , "status" , "validate" , "metadata.0.generation" , "metadata.0.resource_version" },
423
423
},
424
424
},
425
425
})
@@ -1054,7 +1054,7 @@ func TestAccArgoCDApplication_CustomNamespace(t *testing.T) {
1054
1054
ResourceName : "argocd_application.custom_namespace" ,
1055
1055
ImportState : true ,
1056
1056
ImportStateVerify : true ,
1057
- ImportStateVerifyIgnore : []string {"wait" , "cascade" , "status" , "validate" },
1057
+ ImportStateVerifyIgnore : []string {"wait" , "cascade" , "status" , "validate" , "metadata.0.generation" , "metadata.0.resource_version" , "spec.0.source.0.helm.0.parameter.0.force_string" , "spec.0.source.0.helm.0.parameter.1.force_string" },
1058
1058
},
1059
1059
},
1060
1060
})
@@ -1099,10 +1099,13 @@ func TestAccArgoCDApplication_MultipleSources(t *testing.T) {
1099
1099
),
1100
1100
},
1101
1101
{
1102
- ResourceName : "argocd_application.multiple_sources" ,
1103
- ImportState : true ,
1104
- ImportStateVerify : true ,
1105
- ImportStateVerifyIgnore : []string {"wait" , "cascade" , "metadata.0.generation" , "metadata.0.resource_version" , "status" , "validate" },
1102
+ ResourceName : "argocd_application.multiple_sources" ,
1103
+ ImportState : true ,
1104
+ ImportStateVerify : true ,
1105
+ ImportStateVerifyIgnore : []string {"wait" , "cascade" , "metadata.0.generation" , "metadata.0.resource_version" , "status" , "validate" ,
1106
+ "spec.0.source.0.helm.0.parameter.0.force_string" ,
1107
+ "spec.0.source.0.helm.0.parameter.1.force_string" ,
1108
+ "spec.0.source.0.helm.0.parameter.2.force_string" },
1106
1109
},
1107
1110
},
1108
1111
})
@@ -1177,7 +1180,7 @@ func TestAccArgoCDApplication_ManagedNamespaceMetadata(t *testing.T) {
1177
1180
ResourceName : "argocd_application.namespace_metadata" ,
1178
1181
ImportState : true ,
1179
1182
ImportStateVerify : true ,
1180
- ImportStateVerifyIgnore : []string {"wait" , "cascade" , "metadata.0.generation" , "metadata.0.resource_version" , "validate" },
1183
+ ImportStateVerifyIgnore : []string {"wait" , "cascade" , "metadata.0.generation" , "metadata.0.resource_version" , "validate" , "status" },
1181
1184
},
1182
1185
},
1183
1186
})
0 commit comments