diff --git a/.circleci/config.yml b/.circleci/config.yml index a28ec66add..4fe8846dc4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -701,7 +701,7 @@ jobs: - run: mkdir -p $TEST_RESULTS - run-acceptance-tests: - additional-flags: -kubeconfig="$primary_kubeconfig" -secondary-kubeconfig="$secondary_kubeconfig" + additional-flags: -kubeconfig="$primary_kubeconfig" -secondary-kubeconfig="$secondary_kubeconfig" -disable-peering -run 'TestPeering*' - store_test_results: path: /tmp/test-results @@ -999,6 +999,7 @@ workflows: context: consul-ci requires: - dev-upload-docker + - acceptance-aks-1-21 nightly-acceptance-tests: triggers: - schedule: diff --git a/acceptance/framework/config/config.go b/acceptance/framework/config/config.go index 1bda173025..62fd094a33 100644 --- a/acceptance/framework/config/config.go +++ b/acceptance/framework/config/config.go @@ -40,6 +40,8 @@ type TestConfig struct { EnableTransparentProxy bool + DisablePeering bool + ConsulImage string ConsulK8SImage string ConsulVersion *version.Version diff --git a/acceptance/framework/flags/flags.go b/acceptance/framework/flags/flags.go index 6565c2413d..b275bb0904 100644 --- a/acceptance/framework/flags/flags.go +++ b/acceptance/framework/flags/flags.go @@ -40,6 +40,8 @@ type TestFlags struct { flagUseKind bool + flagDisablePeering bool + once sync.Once } @@ -96,6 +98,8 @@ func (t *TestFlags) init() { flag.BoolVar(&t.flagUseKind, "use-kind", false, "If true, the tests will assume they are running against a local kind cluster(s).") + flag.BoolVar(&t.flagDisablePeering, "disable-peering", false, + "If true, the peering tests will not run.") if t.flagEnterpriseLicense == "" { t.flagEnterpriseLicense = os.Getenv("CONSUL_ENT_LICENSE") @@ -140,6 +144,8 @@ func (t *TestFlags) TestConfigFromFlags() *config.TestConfig { EnableTransparentProxy: t.flagEnableTransparentProxy, + DisablePeering: t.flagDisablePeering, + ConsulImage: t.flagConsulImage, ConsulK8SImage: t.flagConsulK8sImage, ConsulVersion: consulVersion, diff --git a/acceptance/tests/peering/main_test.go b/acceptance/tests/peering/main_test.go index fff59f1e70..12bb35afd5 100644 --- a/acceptance/tests/peering/main_test.go +++ b/acceptance/tests/peering/main_test.go @@ -13,10 +13,10 @@ var suite testsuite.Suite func TestMain(m *testing.M) { suite = testsuite.NewSuite(m) - if suite.Config().EnableMultiCluster { + if suite.Config().EnableMultiCluster && !suite.Config().DisablePeering { os.Exit(suite.Run()) } else { - fmt.Println("Skipping peering tests because -enable-multi-cluster is not set") + fmt.Println("Skipping peering tests because either -enable-multi-cluster is not set or -disable-peering is set") os.Exit(0) } } diff --git a/charts/consul/test/terraform/aks/main.tf b/charts/consul/test/terraform/aks/main.tf index e12ad64cf9..57de5d2a54 100644 --- a/charts/consul/test/terraform/aks/main.tf +++ b/charts/consul/test/terraform/aks/main.tf @@ -45,7 +45,7 @@ resource "azurerm_kubernetes_cluster" "default" { location = azurerm_resource_group.default[count.index].location resource_group_name = azurerm_resource_group.default[count.index].name dns_prefix = "consul-k8s-${random_id.suffix[count.index].dec}" - kubernetes_version = "1.21.7" + kubernetes_version = "1.21.14" // We're setting the network plugin and other network properties explicitly // here even though they are the same as defaults to ensure that none of these CIDRs