From d4616c8bd60d87a0c8d0c86d5914d5bceb9100b5 Mon Sep 17 00:00:00 2001 From: Nathanael Liechti Date: Wed, 8 Jan 2025 17:38:32 +0100 Subject: [PATCH] fix: remove test-patch without target Signed-off-by: Nathanael Liechti --- argocd/resource_argocd_application_test.go | 25 ++++++---------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/argocd/resource_argocd_application_test.go b/argocd/resource_argocd_application_test.go index 45db783a..793b6b33 100644 --- a/argocd/resource_argocd_application_test.go +++ b/argocd/resource_argocd_application_test.go @@ -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", ), ), @@ -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"