From 48457e7cef287e46088e88d776f9d13f1ebb86af Mon Sep 17 00:00:00 2001 From: Kyle Schochenmaier Date: Tue, 12 Jul 2022 16:28:41 -0500 Subject: [PATCH] enable nightlies for 1.11 and 1.12 --- .circleci/config.yml | 24 +++++++++---------- .../snapshot_agent_vault_test.go | 7 ++++++ 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0ddc7c8302..048e77f1a5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -909,7 +909,7 @@ jobs: path: /tmp/test-results - slack/status: fail_only: true - failure_message: "Acceptance tests against Kind with Kubernetes v1.23 with Consul 1.11.x nightly failed. Check the logs at: ${CIRCLE_BUILD_URL}" + failure_message: "Acceptance tests against Kind with Kubernetes v1.23 with Consul 1.11 nightly failed. Check the logs at: ${CIRCLE_BUILD_URL}" acceptance-kind-1-23-consul-nightly-1-12: environment: @@ -1047,15 +1047,15 @@ workflows: requires: - dev-upload-docker -# nightly-acceptance-tests-consul: -# triggers: -# - schedule: -# cron: "0 0 * * *" -# filters: -# branches: -# only: -# - main -# jobs: -# - acceptance-kind-1-23-consul-nightly-1-11 -# - acceptance-kind-1-23-consul-nightly-1-12 + nightly-acceptance-tests-consul: + triggers: + - schedule: + cron: "0 0 * * *" + filters: + branches: + only: + - main + jobs: + - acceptance-kind-1-23-consul-nightly-1-11 + - acceptance-kind-1-23-consul-nightly-1-12 # - acceptance-kind-1-23-consul-nightly-1-13 diff --git a/acceptance/tests/snapshot-agent/snapshot_agent_vault_test.go b/acceptance/tests/snapshot-agent/snapshot_agent_vault_test.go index bde2d88ab0..a3ede3e984 100644 --- a/acceptance/tests/snapshot-agent/snapshot_agent_vault_test.go +++ b/acceptance/tests/snapshot-agent/snapshot_agent_vault_test.go @@ -15,6 +15,7 @@ import ( "github.com/hashicorp/consul-k8s/acceptance/framework/logger" "github.com/hashicorp/consul-k8s/acceptance/framework/vault" "github.com/hashicorp/go-uuid" + "github.com/hashicorp/go-version" "github.com/stretchr/testify/require" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -31,6 +32,12 @@ func TestSnapshotAgent_Vault(t *testing.T) { kubectlOptions := ctx.KubectlOptions(t) ns := kubectlOptions.Namespace + ver, err := version.NewVersion("1.12.0") + require.NoError(t, err) + if cfg.ConsulVersion != nil && cfg.ConsulVersion.LessThan(ver) { + t.Skipf("skipping this test because vault secrets backend is not supported in version %v", cfg.ConsulVersion.String()) + } + consulReleaseName := helpers.RandomName() vaultReleaseName := helpers.RandomName()