From 6deee27e5387e224c07bd1253296e84e9350d7f3 Mon Sep 17 00:00:00 2001 From: "cory.murphy" Date: Sat, 12 Oct 2024 13:30:53 -0400 Subject: [PATCH] conditionally create crds in ci --- .github/workflows/ci.yaml | 2 +- test/integration/install_test.go | 2 +- test/integration/main_test.go | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 90f19e2..ad2286f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -20,4 +20,4 @@ jobs: cluster_name: kind - run: helm dependency update ./charts/argocd - run: go mod download - - run: go test ./test/integration/ + - run: go test ./test/integration/ --create-crds "true" diff --git a/test/integration/install_test.go b/test/integration/install_test.go index ae1bd32..52a2bdb 100644 --- a/test/integration/install_test.go +++ b/test/integration/install_test.go @@ -42,7 +42,7 @@ func TestTemplateBase(t *testing.T) { argocd := &helm.Options{ KubectlOptions: kubectlOptions, ValuesFiles: []string{argoCdChartPath + "/values.yaml"}, - SetValues: map[string]string{"argo-cd.crds.install": "false"}, + SetValues: map[string]string{"argo-cd.crds.install": *createCrds}, ExtraArgs: map[string][]string{ "upgrade": {"--timeout", "60s", "--install", "--wait-for-jobs", "--wait", "--create-namespace", "--namespace", *kubeNamespace}, }, diff --git a/test/integration/main_test.go b/test/integration/main_test.go index b75ab99..7262aef 100644 --- a/test/integration/main_test.go +++ b/test/integration/main_test.go @@ -6,3 +6,4 @@ var kubeContext = flag.String("kubecontext", "kind-kind", "kubernetes context to var kubeNamespace = flag.String("kubenamespace", "bienhoa", "kubernetes namespace to run tests against") var appName = flag.String("appname", "argobot", "application to deploy") var appVersion = flag.String("appversion", "60a4727c6c", "application version to deploy") +var createCrds = flag.String("create-crds", "false", "create crds")