From 2f18616aa7cafabc0717bb0012824c24cabe75b1 Mon Sep 17 00:00:00 2001 From: cskh Date: Mon, 15 May 2023 09:33:05 -0400 Subject: [PATCH] upgrade test: fix on-the-fly-image build and downsize runner (#17331) --- .github/workflows/test-integrations.yml | 6 ++++-- .../test/upgrade/ingress_gateway_sds_test.go | 8 ++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test-integrations.yml b/.github/workflows/test-integrations.yml index ccafc68a6..e75e9df2a 100644 --- a/.github/workflows/test-integrations.yml +++ b/.github/workflows/test-integrations.yml @@ -514,7 +514,7 @@ jobs: } >> "$GITHUB_OUTPUT" upgrade-integration-test: - runs-on: ${{ fromJSON(needs.setup.outputs.compute-xl) }} + runs-on: ${{ fromJSON(needs.setup.outputs.compute-large) }} needs: - setup - dev-build @@ -548,6 +548,8 @@ jobs: run: docker build -t consul-envoy:latest-version --build-arg CONSUL_IMAGE=docker.mirror.hashicorp.services/${{ env.CONSUL_LATEST_IMAGE_NAME }}:${{ env.CONSUL_LATEST_VERSION }} --build-arg ENVOY_VERSION=${{ env.ENVOY_VERSION }} -f ./test/integration/consul-container/assets/Dockerfile-consul-envoy ./test/integration/consul-container/assets - name: Build consul-envoy:target-version image run: docker build -t consul-envoy:target-version --build-arg CONSUL_IMAGE=${{ env.CONSUL_LATEST_IMAGE_NAME }}:local --build-arg ENVOY_VERSION=${{ env.ENVOY_VERSION }} -f ./test/integration/consul-container/assets/Dockerfile-consul-envoy ./test/integration/consul-container/assets + - name: Build sds image + run: docker build -t consul-sds-server ./test/integration/connect/envoy/test-sds-server/ - name: Configure GH workaround for ipv6 loopback if: ${{ !endsWith(github.repository, '-enterprise') }} run: | @@ -566,7 +568,7 @@ jobs: --raw-command \ --format=short-verbose \ --debug \ - --rerun-fails=3 \ + --rerun-fails=2 \ --packages="./..." \ -- \ go test \ diff --git a/test/integration/consul-container/test/upgrade/ingress_gateway_sds_test.go b/test/integration/consul-container/test/upgrade/ingress_gateway_sds_test.go index 52ee91bac..c31f8007b 100644 --- a/test/integration/consul-container/test/upgrade/ingress_gateway_sds_test.go +++ b/test/integration/consul-container/test/upgrade/ingress_gateway_sds_test.go @@ -22,6 +22,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/testcontainers/testcontainers-go" + "github.com/testcontainers/testcontainers-go/wait" ) const sdsServerPort = 1234 @@ -313,10 +314,8 @@ func createSDSServer(t *testing.T, cluster *libcluster.Cluster) (containerName s _, err = testcontainers.GenericContainer(ctx, testcontainers.GenericContainerRequest{ Started: true, ContainerRequest: testcontainers.ContainerRequest{ - FromDockerfile: testcontainers.FromDockerfile{ - Context: sdsServerFilesPath, - }, - Name: containerName, + Image: "consul-sds-server", + Name: containerName, Networks: []string{ cluster.NetworkName, }, @@ -332,6 +331,7 @@ func createSDSServer(t *testing.T, cluster *libcluster.Cluster) (containerName s ReadOnly: true, }, }, + WaitingFor: wait.ForLog("").WithStartupTimeout(60 * time.Second), }, }) require.NoError(t, err, "create SDS server container")