Skip to content

Commit

Permalink
fix: remove test-patch without target
Browse files Browse the repository at this point in the history
Signed-off-by: Nathanael Liechti <[email protected]>
  • Loading branch information
the-technat committed Jan 9, 2025
1 parent c2dd220 commit d4616c8
Showing 1 changed file with 6 additions and 19 deletions.
25 changes: 6 additions & 19 deletions argocd/resource_argocd_application_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,32 +239,28 @@ func TestAccArgoCDApplication_KustomizePatches(t *testing.T) {
"argocd_application.kustomize_patches",
"spec.0.source.0.kustomize.0.patches.0.patch",
),
resource.TestCheckResourceAttrSet(
"argocd_application.kustomize_patches",
"spec.0.source.0.kustomize.0.patches.1.patch",
),
resource.TestCheckResourceAttr(
"argocd_application.kustomize_patches",
"spec.0.source.0.kustomize.0.patches.1.target.0.group",
"spec.0.source.0.kustomize.0.patches.0.target.0.group",
"apps",
),
resource.TestCheckResourceAttr(
"argocd_application.kustomize_patches",
"spec.0.source.0.kustomize.0.patches.1.target.0.version",
"spec.0.source.0.kustomize.0.patches.0.target.0.version",
"v1",
),
resource.TestCheckResourceAttr(
"argocd_application.kustomize_patches",
"spec.0.source.0.kustomize.0.patches.1.target.0.kind",
"spec.0.source.0.kustomize.0.patches.0.target.0.kind",
"Deployment",
),
resource.TestCheckResourceAttrSet(
"argocd_application.kustomize_patches",
"spec.0.source.0.kustomize.0.patches.2.patch",
"spec.0.source.0.kustomize.0.patches.1.patch",
),
resource.TestCheckResourceAttr(
"argocd_application.kustomize_patches",
"spec.0.source.0.kustomize.0.patches.2.target.0.label_selector",
"spec.0.source.0.kustomize.0.patches.1.target.0.label_selector",
"app=hello",
),
),
Expand Down Expand Up @@ -1431,16 +1427,7 @@ resource "argocd_application" "kustomize_patches" {
"this.is.a.common" = "anno-tation"
"another.io/one" = "false"
}
patches {
patch = <<-EOT
apiVersion: apps/v1
kind: Deployment
metadata:
name: the-deployment
labels:
app.kubernetes.io/version: 1.21.0
EOT
}
patches {
target {
group = "apps"
Expand Down

0 comments on commit d4616c8

Please sign in to comment.