diff --git a/.circleci/config.yml b/.circleci/config.yml index 4a4a04fbb2..949f43be6e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -123,6 +123,7 @@ commands: if ! gotestsum --no-summary=all --jsonfile=jsonfile-${pkg////-} -- $pkg -p 1 -timeout 2h -failfast \ << parameters.additional-flags >> \ -enable-multi-cluster \ + ${ENABLE_ENTERPRISE:+-enable-enterprise} \ -debug-directory="$TEST_RESULTS/debug" \ -consul-k8s-image=<< parameters.consul-k8s-image >> then diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 51f131ea8d..4bc3052983 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,7 +6,7 @@ env: TEST_RESULTS: /tmp/test-results # path to where test results are saved CONSUL_VERSION: 1.14.0-beta1 # Consul's OSS version to use in tests CONSUL_ENT_VERSION: 1.14.0-beta1+ent # Consul's enterprise version to use in tests - GOTESTSUM_VERSION: 1.8.1 # You cannot use environment variables with workflows. The gotestsum version is hardcoded in the reusable workflows too. + GOTESTSUM_VERSION: 1.8.2 # You cannot use environment variables with workflows. The gotestsum version is hardcoded in the reusable workflows too. jobs: get-go-version: @@ -158,11 +158,9 @@ jobs: working-directory: control-plane run: | mkdir -p $HOME/bin - wget https://releases.hashicorp.com/consul/${{env.CONSUL_VERSION}}/consul_${{env.CONSUL_VERSION}}_linux_amd64.zip && \ - unzip consul_${{env.CONSUL_VERSION}}_linux_amd64.zip -d $HOME/bin && \ - rm consul_${{env.CONSUL_VERSION}}_linux_amd64.zip - chmod +x $HOME/bin/consul - + container_id=$(docker create hashicorppreview/consul:1.14-dev) + docker cp "$container_id:/bin/consul" $HOME/bin/consul + docker rm "$container_id" - name: Run go tests working-directory: control-plane run: | @@ -207,10 +205,9 @@ jobs: working-directory: control-plane run: | mkdir -p $HOME/bin - wget https://releases.hashicorp.com/consul/${{env.CONSUL_ENT_VERSION}}/consul_${{env.CONSUL_ENT_VERSION}}_linux_amd64.zip && \ - unzip consul_${{env.CONSUL_ENT_VERSION}}_linux_amd64.zip -d $HOME/bin && \ - rm consul_${{env.CONSUL_ENT_VERSION}}_linux_amd64.zip - chmod +x $HOME/bin/consul + container_id=$(docker create hashicorppreview/consul-enterprise:1.14-dev) + docker cp "$container_id:/bin/consul" $HOME/bin/consul + docker rm "$container_id" - name: Run go tests working-directory: control-plane diff --git a/acceptance/framework/consul/helm_cluster.go b/acceptance/framework/consul/helm_cluster.go index 44f37d051b..a4008702e6 100644 --- a/acceptance/framework/consul/helm_cluster.go +++ b/acceptance/framework/consul/helm_cluster.go @@ -141,7 +141,7 @@ func (h *HelmCluster) Destroy(t *testing.T) { // Ignore the error returned by the helm delete here so that we can // always idempotently clean up resources in the cluster. h.helmOptions.ExtraArgs = map[string][]string{ - "--wait": nil, + "--wait": nil, } err := helm.DeleteE(t, h.helmOptions, h.releaseName, false) require.NoError(t, err) diff --git a/control-plane/connect-inject/peering_acceptor_controller_test.go b/control-plane/connect-inject/peering_acceptor_controller_test.go index 010779f9fd..bb72d7c42d 100644 --- a/control-plane/connect-inject/peering_acceptor_controller_test.go +++ b/control-plane/connect-inject/peering_acceptor_controller_test.go @@ -566,7 +566,7 @@ func TestReconcile_CreateUpdatePeeringAcceptor(t *testing.T) { require.Contains(t, string(decodedTokenData), "\"CA\":") require.Contains(t, string(decodedTokenData), "\"ServerAddresses\"") - require.Contains(t, string(decodedTokenData), "\"ServerName\":\"server.dc1.consul\"") + require.Contains(t, string(decodedTokenData), "\"ServerName\":\"server.dc1.peering.11111111-2222-3333-4444-555555555555.consul\"") // Get the reconciled PeeringAcceptor and make assertions on the status acceptor := &v1alpha1.PeeringAcceptor{} diff --git a/control-plane/subcommand/inject-connect/command.go b/control-plane/subcommand/inject-connect/command.go index 324ce902a6..6303bc17a5 100644 --- a/control-plane/subcommand/inject-connect/command.go +++ b/control-plane/subcommand/inject-connect/command.go @@ -487,7 +487,7 @@ func (c *Command) Run(args []string) int { mgr.GetWebhookServer().Register("/mutate", &webhook.Admission{Handler: &connectinject.MeshWebhook{ Clientset: c.clientset, - ReleaseNamespace: c.flagReleaseNamespace, + ReleaseNamespace: c.flagReleaseNamespace, ConsulConfig: consulConfig, ConsulServerConnMgr: watcher, ImageConsul: c.flagConsulImage,