From 9e181fe996652ddf0fb086fd7a4953dd156dff20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ezequiel=20Fern=C3=A1ndez=20Ponce?= <20102608+ezfepo@users.noreply.github.com> Date: Thu, 22 Sep 2022 12:31:31 -0300 Subject: [PATCH] [CONSUL-441] Update windows dockerfile with version (#62) --- Dockerfile-windows | 7 +- build-support-windows/BUILD-IMAGES.md | 52 +++-- .../Dockerfile-consul-dev-windows | 4 + .../Dockerfile-consul-local-windows | 19 +- .../Dockerfile-consul-local-windows.sh | 14 -- .../Dockerfile-openzipkin-windows | 2 +- .../build-consul-dev-image.sh | 14 ++ .../build-consul-local-images.sh | 80 +++++++ build-support-windows/build-images.sh | 42 ---- .../build-test-sds-server-image.sh | 5 + execute_windows_tests.sh | 196 +++++++++++------- .../envoy/Dockerfile-consul-envoy-windows | 12 ++ .../envoy/Dockerfile-test-sds-server-windows | 2 +- .../envoy/case-dummy-bats/dummy-function.bash | 16 -- .../connect/envoy/case-dummy-bats/setup.sh | 1 - .../connect/envoy/case-dummy-bats/vars.sh | 2 - .../envoy/case-dummy-bats/verify_1.bats | 9 - .../envoy/case-dummy-bats/verify_2.bats | 47 ----- .../connect/envoy/helpers.windows.bash | 2 +- .../connect/envoy/run-tests.windows.sh | 43 ++-- 20 files changed, 300 insertions(+), 269 deletions(-) create mode 100644 build-support-windows/Dockerfile-consul-dev-windows delete mode 100644 build-support-windows/Dockerfile-consul-local-windows.sh create mode 100644 build-support-windows/build-consul-dev-image.sh create mode 100644 build-support-windows/build-consul-local-images.sh delete mode 100644 build-support-windows/build-images.sh create mode 100644 build-support-windows/build-test-sds-server-image.sh create mode 100644 test/integration/connect/envoy/Dockerfile-consul-envoy-windows delete mode 100644 test/integration/connect/envoy/case-dummy-bats/dummy-function.bash delete mode 100644 test/integration/connect/envoy/case-dummy-bats/setup.sh delete mode 100644 test/integration/connect/envoy/case-dummy-bats/vars.sh delete mode 100644 test/integration/connect/envoy/case-dummy-bats/verify_1.bats delete mode 100644 test/integration/connect/envoy/case-dummy-bats/verify_2.bats diff --git a/Dockerfile-windows b/Dockerfile-windows index 91a3e1f5746b..a1e42c005d7c 100644 --- a/Dockerfile-windows +++ b/Dockerfile-windows @@ -1,5 +1,5 @@ -FROM mcr.microsoft.com/windows/servercore:1809 -ENV VERSION=1.12.0 +FROM docker.mirror.hashicorp.services/windows/servercore:1809 +ARG VERSION=1.13.1 LABEL org.opencontainers.image.authors="Consul Team " \ org.opencontainers.image.url="https://www.consul.io/" \ @@ -8,7 +8,8 @@ LABEL org.opencontainers.image.authors="Consul Team " \ org.opencontainers.image.version=$VERSION \ org.opencontainers.image.vendor="HashiCorp" \ org.opencontainers.image.title="consul" \ - org.opencontainers.image.description="Consul is a datacenter runtime that provides service discovery, configuration, and orchestration." + org.opencontainers.image.description="Consul is a datacenter runtime that provides service discovery, configuration, and orchestration." \ + version=${VERSION} RUN ["powershell", "Set-ExecutionPolicy", "Bypass", "-Scope", "Process", "-Force;"] RUN ["powershell", "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))"] diff --git a/build-support-windows/BUILD-IMAGES.md b/build-support-windows/BUILD-IMAGES.md index 8a58cf111e77..610b8a0d7e14 100644 --- a/build-support-windows/BUILD-IMAGES.md +++ b/build-support-windows/BUILD-IMAGES.md @@ -3,23 +3,23 @@ ## Index - [About](#about-this-file) -- [Consul-windows](#consul-windows) -- [Dockerfile-consul-local-windows](#dockerfile-consul-local-windows) +- [Consul Windows](#consul-windows) +- [Consul Windows Local](#consul-windows-local) +- [Consul Windows Dev](#consul-windows-dev) - [Dockerfile-openzipkin-windows](#dockerfile-openzipkin-windows) -- [Build images](#build-images) ## About this File In this file you will find which Docker images that need to be pre-built to run the Envoy integration tests on Windows, as well as information on how to run each of these files individually for testing purposes. -## Consul-windows +## Consul Windows -The required Consul image is built from the "Dockerfile-windows" file located at the root of the project. +The Windos/Consul:_{VERSION}_ image is built from the "Dockerfile-windows" file located at the root of the project. To do this, the official [windows/servercore image](https://hub.docker.com/_/microsoft-windows-servercore) is used as base image. To build the image, use the following command: ```shell -docker build -t windows/consul -f Dockerfile-windows . +docker build -t windows/consul -f Dockerfile-windows . --build-arg VERSION=${VERSION} ``` You can test the built file by running the following command: @@ -30,22 +30,42 @@ docker run --rm -p 8300:8300 -p 8301:8301 -p 8302:8302 -p 8500:8500 -p 8600:8600 If everything works properly you should openning the browser and check the Consul UI running on: `http://localhost:8500` -## Dockerfile-consul-local-windows +## Consul Windows Local -The Consul:local custom image deployed in the "Dockerfile-consul-local-windows" DockerFile is generated by the shell script of the same name. -When executing it, the compilation of Consul is carried out and it is saved in the _"dist"_ directory, this file is then copied to a container created from the _"windows/consul"_ image. +The Windows/Consul:_{VERSION}_-local custom image deployed in the "Dockerfile-consul-local-windows" DockerFile is built from the selected by the shell script _build-consul-local-images.sh_. +When executing it, all the tools required to run the Windows Connect Envoy Integration Tests will be added to the image. It is necessary that the _"windows/consul"_ image has been built first. To build this image you need to run the following command on your terminal: ```shell -./Dockerfile-consul-local-windows.sh +./build-consul-local-images.sh ``` You can test the built file by running the following command: ```shell -docker run --rm -p 8300:8300 -p 8301:8301 -p 8302:8302 -p 8500:8500 -p 8600:8600 --name consul-local --hostname "consul-primary-server" --network-alias "consul-primary-server" windows/consul:local agent -dev -datacenter "primary" -grpc-port -1 -client "0.0.0.0" -bind "0.0.0.0" +docker run --rm -p 8300:8300 -p 8301:8301 -p 8302:8302 -p 8500:8500 -p 8600:8600 --name consul-local --hostname "consul-primary-server" --network-alias "consul-primary-server" windows/consul:_{VERSION}_-local agent -dev -datacenter "primary" -grpc-port -1 -client "0.0.0.0" -bind "0.0.0.0" +``` + +If everything works properly you should openning the browser and check the Consul UI running on: `http://localhost:8500` + +## Consul Windows Dev + +The Windows/Consul:_{VERSION}_-dev custom image deployed in the "Dockerfile-consul-dev-windows" DockerFile is generated by the shell script named _build-consul-dev-image.sh_. +When executing it, the compilation of Consul is carried out and it is saved in the _"dist"_ directory, this file is then copied to the _"windows/consul:_{VERSION}_-dev"_ image. +It is necessary that the _"windows/consul"_ image has been built first. + +To build this image you need to run the following command on your terminal: + +```shell +./build-consul-dev-image.sh +``` + +You can test the built file by running the following command: + +```shell +docker run --rm -p 8300:8300 -p 8301:8301 -p 8302:8302 -p 8500:8500 -p 8600:8600 --name consul-local --hostname "consul-primary-server" --network-alias "consul-primary-server" windows/consul:_{VERSION}_-dev agent -dev -datacenter "primary" -grpc-port -1 -client "0.0.0.0" -bind "0.0.0.0" ``` If everything works properly you should openning the browser and check the Consul UI running on: `http://localhost:8500` @@ -74,16 +94,6 @@ If everything works as it should, you will see the zipkin logo being displayed, 20XX-XX-XX XX:XX:XX.XXX INFO [/] 1252 --- [oss-http-*:9411] c.l.a.s.Server : Serving HTTP at /[0:0:0:0:0:0:0:0]:9411 - http://127.0.0.1:9411/ ``` -## Build images - -To build the images, it is necessary to open a Git bash terminal and run - -```shell -./build-images.sh -``` - ---- - # Testing During development, it may be more convenient to check your work-in-progress by running only the tests which you expect to be affected by your changes, as the full test suite can take several minutes to execute. [Go's built-in test tool](https://golang.org/pkg/cmd/go/internal/test/) allows specifying a list of packages to test and the `-run` option to only include test names matching a regular expression. diff --git a/build-support-windows/Dockerfile-consul-dev-windows b/build-support-windows/Dockerfile-consul-dev-windows new file mode 100644 index 000000000000..cd3db37e65dc --- /dev/null +++ b/build-support-windows/Dockerfile-consul-dev-windows @@ -0,0 +1,4 @@ +ARG VERSION=1.13.1 + +FROM windows/consul:${VERSION}-local +COPY dist/ C:\\consul diff --git a/build-support-windows/Dockerfile-consul-local-windows b/build-support-windows/Dockerfile-consul-local-windows index 9d75e7fcb73d..aa1efc79c60f 100644 --- a/build-support-windows/Dockerfile-consul-local-windows +++ b/build-support-windows/Dockerfile-consul-local-windows @@ -1,9 +1,7 @@ -ARG ENVOY_VERSION=v1.19.5 -ARG CONSUL_IMAGE_VERSION=latest +ARG VERSION=1.13.1 -FROM envoyproxy/envoy-windows:${ENVOY_VERSION} as envoy -FROM windows/consul:${CONSUL_IMAGE_VERSION} -COPY dist/ C:\\consul +FROM windows/test-sds-server as test-sds-server +FROM windows/consul:${VERSION} # Fortio binary downloaded RUN mkdir fortio @@ -11,9 +9,6 @@ ENV FORTIO_URL=https://github.com/fortio/fortio/releases/download/v1.33.0/fortio RUN curl %FORTIO_URL% -L -o fortio.zip RUN tar -xf fortio.zip -C fortio -# Copy envoy.exe from FROM envoyproxy/envoy-windows:${ENVOY_VERSION} -COPY --from=envoy ["C:/Program Files/envoy/", "C:/envoy/"] - RUN choco install openssl -yf RUN choco install jq -yf RUN choco install netcat -yf @@ -31,15 +26,15 @@ RUN curl %JAEGER_URL% -L -o jaeger.tar.gz RUN mkdir jaeger RUN tar -xf jaeger.tar.gz -C jaeger --strip-components=1 -# Copy test-sds-server binary and certs -COPY --from=test-sds-server ["C:/go/src/", "C:/test-sds-server/"] - # Install Socat ENV SOCAT_URL=https://github.com/tech128/socat-1.7.3.0-windows/archive/refs/heads/master.zip RUN curl %SOCAT_URL% -L -o socat.zip RUN mkdir socat RUN tar -xf socat.zip -C socat --strip-components=1 +# Copy test-sds-server binary and certs +COPY --from=test-sds-server ["C:/go/src/", "C:/test-sds-server/"] + EXPOSE 8300 EXPOSE 8301 8301/udp 8302 8302/udp EXPOSE 8500 8600 8600/udp @@ -49,4 +44,4 @@ EXPOSE 19000 19001 19002 19003 19004 EXPOSE 21000 21001 21002 21003 21004 EXPOSE 5000 1234 2345 -RUN SETX /M path "%PATH%;C:\consul;C:\envoy;C:\fortio;C:\jaeger;C:\Program Files\Git\bin;C:\Program Files\Git\usr\bin;C:\Program Files\OpenSSL-Win64\bin;C:\bats\bin\;C:\ProgramData\chocolatey\lib\jq\tools;C:\socat;" +RUN SETX /M path "%PATH%;C:\consul;C:\fortio;C:\jaeger;C:\Program Files\Git\bin;C:\Program Files\Git\usr\bin;C:\Program Files\OpenSSL-Win64\bin;C:\bats\bin\;C:\ProgramData\chocolatey\lib\jq\tools;C:\socat;" diff --git a/build-support-windows/Dockerfile-consul-local-windows.sh b/build-support-windows/Dockerfile-consul-local-windows.sh deleted file mode 100644 index 6e26b7d078a5..000000000000 --- a/build-support-windows/Dockerfile-consul-local-windows.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash - -cd ../ -rm -rf dist - -export GOOS=windows GOARCH=amd64 -CONSUL_VERSION=1.12.0 -CONSUL_BUILDDATE=$(date +"%Y-%m-%dT%H:%M:%SZ") -GIT_IMPORT=github.com/hashicorp/consul/version -GOLDFLAGS=" -X $GIT_IMPORT.Version=$CONSUL_VERSION -X $GIT_IMPORT.VersionPrerelease=local -X $GIT_IMPORT.BuildDate=$CONSUL_BUILDDATE " - -go build -ldflags "$GOLDFLAGS" -o ./dist/ . - -docker build -t windows/consul:local -f ./build-support-windows/Dockerfile-consul-local-windows . diff --git a/build-support-windows/Dockerfile-openzipkin-windows b/build-support-windows/Dockerfile-openzipkin-windows index b978a3abb361..afeb0f8eca38 100644 --- a/build-support-windows/Dockerfile-openzipkin-windows +++ b/build-support-windows/Dockerfile-openzipkin-windows @@ -1,4 +1,4 @@ -FROM openjdk:jdk-windowsservercore +FROM docker.mirror.hashicorp.services/windows/openjdk:1809 RUN curl.exe -sSL 'https://search.maven.org/remote_content?g=io.zipkin&a=zipkin-server&v=LATEST&c=exec' -o zipkin.jar diff --git a/build-support-windows/build-consul-dev-image.sh b/build-support-windows/build-consul-dev-image.sh new file mode 100644 index 000000000000..2ae4bfd3a866 --- /dev/null +++ b/build-support-windows/build-consul-dev-image.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +cd ../ +rm -rf dist + +export GOOS=windows GOARCH=amd64 +VERSION=1.13.1 +CONSUL_BUILDDATE=$(date +"%Y-%m-%dT%H:%M:%SZ") +GIT_IMPORT=github.com/hashicorp/consul/version +GOLDFLAGS=" -X $GIT_IMPORT.Version=$VERSION -X $GIT_IMPORT.VersionPrerelease=dev -X $GIT_IMPORT.BuildDate=$CONSUL_BUILDDATE " + +go build -ldflags "$GOLDFLAGS" -o ./dist/ . + +docker build -t windows/consul:${VERSION}-dev -f ./build-support-windows/Dockerfile-consul-dev-windows . --build-arg VERSION=${VERSION} diff --git a/build-support-windows/build-consul-local-images.sh b/build-support-windows/build-consul-local-images.sh new file mode 100644 index 000000000000..c20aebc026b2 --- /dev/null +++ b/build-support-windows/build-consul-local-images.sh @@ -0,0 +1,80 @@ +#!/usr/bin/env bash + +readonly HASHICORP_DOCKER_PROXY="docker.mirror.hashicorp.services" + +# Build Consul Version 1.13.1 / 1.12.4 / 1.11.8 +VERSION=${VERSION:-"1.13.1"} +export VERSION + +echo "Building Images" + + +# Pull Windows Servercore image +echo " " +echo "Pull Windows Servercore image" +docker pull mcr.microsoft.com/windows/servercore:1809 +# Tag Windows Servercore image +echo " " +echo "Tag Windows Servercore image" +docker tag mcr.microsoft.com/windows/servercore:1809 "${HASHICORP_DOCKER_PROXY}/windows/servercore:1809" + + +# Pull Windows Nanoserver image +echo " " +echo "Pull Windows Nanoserver image" +docker pull mcr.microsoft.com/windows/nanoserver:1809 +# Tag Windows Nanoserver image +echo " " +echo "Tag Windows Nanoserver image" +docker tag mcr.microsoft.com/windows/nanoserver:1809 "${HASHICORP_DOCKER_PROXY}/windows/nanoserver:1809" + + +# Pull Windows OpenJDK image +echo " " +echo "Pull Windows OpenJDK image" +docker pull openjdk:windowsservercore-1809 +# Tag Windows OpenJDK image +echo " " +echo "Tag Windows OpenJDK image" +docker tag openjdk:windowsservercore-1809 "${HASHICORP_DOCKER_PROXY}/windows/openjdk:1809" + +# Pull Windows Golang image +echo " " +echo "Pull Windows Golang image" +docker pull golang:1.18.1-nanoserver-1809 +# Tag Windows Golang image +echo " " +echo "Tag Windows Golang image" +docker tag golang:1.18.1-nanoserver-1809 "${HASHICORP_DOCKER_PROXY}/windows/golang:1809" + + +# Pull Kubernetes/pause image +echo " " +echo "Pull Kubernetes/pause image" +docker pull mcr.microsoft.com/oss/kubernetes/pause:3.6 +# Tag Kubernetes/pause image +echo " " +echo "Tag Kubernetes/pause image" +docker tag mcr.microsoft.com/oss/kubernetes/pause:3.6 "${HASHICORP_DOCKER_PROXY}/windows/kubernetes/pause" + + +# Build Windows Openzipkin Image +docker build -t "${HASHICORP_DOCKER_PROXY}/windows/openzipkin" -f Dockerfile-openzipkin-windows . + + +# Build Windows Test sds server Image +./build-test-sds-server-image.sh + + +# Build windows/consul:${VERSION} Image +echo " " +echo "Build windows/consul:${VERSION} Image" +docker build -t "windows/consul:${VERSION}" -f ../Dockerfile-windows ../ --build-arg VERSION=${VERSION} + + +# Build windows/consul:${VERSION}-local Image +echo " " +echo "Build windows/consul:${VERSION}-local Image" +docker build -t windows/consul:${VERSION}-local -f ./Dockerfile-consul-local-windows . --build-arg VERSION=${VERSION} + +echo "Building Complete!" diff --git a/build-support-windows/build-images.sh b/build-support-windows/build-images.sh deleted file mode 100644 index 5376c04cc8ca..000000000000 --- a/build-support-windows/build-images.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env bash - -readonly HASHICORP_DOCKER_PROXY="docker.mirror.hashicorp.services" - -ENVOY_VERSION=${ENVOY_VERSION:-"1.19.5"} -export ENVOY_VERSION - -echo "Building Images" - -# Build Windows Consul Image -echo " " -echo "Build Windows Consul Image" -docker build -t "windows/consul" -f ../Dockerfile-windows ../ - -# Build Windows Consul:local Image -echo " " -echo "Build Windows Consul:local Image" -./Dockerfile-consul-local-windows.sh - -# Pull Windows Nanoserver image -echo " " -echo "Pull Windows Nanoserver image" -docker pull mcr.microsoft.com/windows/nanoserver:1809 -# Tag Windows Nanoserver image -echo " " -echo "Tag Windows Nanoserver image" -docker tag mcr.microsoft.com/windows/nanoserver:1809 "${HASHICORP_DOCKER_PROXY}/windows/nanoserver" - - -# Pull Kubernetes/pause image -echo " " -echo "Pull Kubernetes/pause image" -docker pull mcr.microsoft.com/oss/kubernetes/pause:3.6 -# Tag Kubernetes/pause image -echo " " -echo "Tag Kubernetes/pause image" -docker tag mcr.microsoft.com/oss/kubernetes/pause:3.6 "${HASHICORP_DOCKER_PROXY}/windows/kubernetes/pause" - -# Build Windows Openzipkin Image -docker build -t "${HASHICORP_DOCKER_PROXY}/windows/openzipkin" -f Dockerfile-openzipkin-windows . - -echo "Building Complete!" diff --git a/build-support-windows/build-test-sds-server-image.sh b/build-support-windows/build-test-sds-server-image.sh new file mode 100644 index 000000000000..9298bb56f7db --- /dev/null +++ b/build-support-windows/build-test-sds-server-image.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +cd ../test/integration/connect/envoy + +docker build -t windows/test-sds-server -f ./Dockerfile-test-sds-server-windows test-sds-server diff --git a/execute_windows_tests.sh b/execute_windows_tests.sh index c47f554f0816..93d7861f435a 100644 --- a/execute_windows_tests.sh +++ b/execute_windows_tests.sh @@ -1,134 +1,170 @@ #!/usr/bin/env bash -echo "Started tests from Set $1" +SET=${1:-all} -mkdir output -p +echo "Started tests from Set $SET" -if [ $1 == 0 ] +mkdir test/integration/connect/envoy/results/ -p + +if [ $SET == 0 ] then - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-badauthz" -win=true > output/case-badauthz.txt + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-badauthz" -win=true > test/integration/connect/envoy/results/case-badauthz.log echo "Completed 33%" - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-basic" -win=true > output/case-basic.txt + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-basic" -win=true > test/integration/connect/envoy/results/case-basic.log echo "Completed 66%" - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-centralconf" -win=true > output/case-centralconf.txt + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-centralconf" -win=true > test/integration/connect/envoy/results/case-centralconf.log echo "Completed 100%" -elif [ $1 == 1 ] +elif [ $SET == 1 ] then - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-consul-exec" -win=true > output/case-consul-exec.txt + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-consul-exec" -win=true > test/integration/connect/envoy/results/case-consul-exec.log echo "Completed 20%" - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-expose-checks" -win=true > output/case-expose-checks.txt + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-expose-checks" -win=true > test/integration/connect/envoy/results/case-expose-checks.log echo "Completed 40%" - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-I7-intentions" -win=true > output/case-I7-intentions.txt + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-I7-intentions" -win=true > test/integration/connect/envoy/results/case-I7-intentions.log echo "Completed 60%" - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-prometheus" -win=true > output/case-prometheus.txt + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-prometheus" -win=true > test/integration/connect/envoy/results/case-prometheus.log echo "Completed 80%" - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-upstream-config" -win=true > output/case-upstream-config.txt + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-upstream-config" -win=true > test/integration/connect/envoy/results/case-upstream-config.log echo "Completed 100%" -elif [ $1 == 2 ] +elif [ $SET == 2 ] then - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-zipkin" -win=true > output/case-zipkin.txt + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-zipkin" -win=true > test/integration/connect/envoy/results/case-zipkin.log echo "Completed 10%" - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-cfg-resolver-defaultsubset" -win=true > output/case-cfg-resolver-defaultsubset.txt + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-cfg-resolver-defaultsubset" -win=true > test/integration/connect/envoy/results/case-cfg-resolver-defaultsubset.log echo "Completed 20%" - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-cfg-resolver-features" -win=true > output/case-cfg-resolver-features.txt + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-cfg-resolver-features" -win=true > test/integration/connect/envoy/results/case-cfg-resolver-features.log echo "Completed 30%" - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-cfg-resolver-subset-onlypassing" -win=true > output/case-cfg-resolver-subset-onlypassing.txt + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-cfg-resolver-subset-onlypassing" -win=true > test/integration/connect/envoy/results/case-cfg-resolver-subset-onlypassing.log echo "Completed 40%" - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-cfg-resolver-subset-redirect" -win=true > output/case-cfg-resolver-subset-redirect.txt + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-cfg-resolver-subset-redirect" -win=true > test/integration/connect/envoy/results/case-cfg-resolver-subset-redirect.log echo "Completed 50%" - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-cfg-resolver-svc-failover" -win=true > output/case-cfg-resolver-svc-failover.txt + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-cfg-resolver-svc-failover" -win=true > test/integration/connect/envoy/results/case-cfg-resolver-svc-failover.log echo "Completed 60%" - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-cfg-resolver-svc-redirect-http" -win=true > output/case-cfg-resolver-svc-redirect-http.txt + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-cfg-resolver-svc-redirect-http" -win=true > test/integration/connect/envoy/results/case-cfg-resolver-svc-redirect-http.log echo "Completed 70%" - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-cfg-resolver-svc-redirect-tcp" -win=true > output/case-cfg-resolver-svc-redirect-tcp.txt + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-cfg-resolver-svc-redirect-tcp" -win=true > test/integration/connect/envoy/results/case-cfg-resolver-svc-redirect-tcp.log echo "Completed 80%" - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-cfg-router-features" -win=true > output/case-cfg-router-features.txt + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-cfg-router-features" -win=true > test/integration/connect/envoy/results/case-cfg-router-features.log echo "Completed 90%" - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-cfg-splitter-features" -win=true > output/case-cfg-splitter-features.txt + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-cfg-splitter-features" -win=true > test/integration/connect/envoy/results/case-cfg-splitter-features.log echo "Completed 100%" -elif [ $1 == 3 ] +elif [ $SET == 3 ] then - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-ingress-gateway-grpc" -win=true > output/case-ingress-gateway-grpc.txt + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-ingress-gateway-grpc" -win=true > test/integration/connect/envoy/results/case-ingress-gateway-grpc.log echo "Completed 16%" - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-ingress-gateway-http" -win=true > output/case-ingress-gateway-http.txt + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-ingress-gateway-http" -win=true > test/integration/connect/envoy/results/case-ingress-gateway-http.log echo "Completed 32%" - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-ingress-gateway-multiple-services" -win=true > output/case-ingress-gateway-multiple-services.txt + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-ingress-gateway-multiple-services" -win=true > test/integration/connect/envoy/results/case-ingress-gateway-multiple-services.log echo "Completed 48%" - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-ingress-gateway-sds" -win=true > output/case-ingress-gateway-sds.txt + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-ingress-gateway-sds" -win=true > test/integration/connect/envoy/results/case-ingress-gateway-sds.log echo "Completed 66%" - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-ingress-gateway-simple" -win=true > output/case-ingress-gateway-simple.txt + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-ingress-gateway-simple" -win=true > test/integration/connect/envoy/results/case-ingress-gateway-simple.log echo "Completed 83%" - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-ingress-gateway-tls" -win=true > output/case-ingress-gateway-tls.txt + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-ingress-gateway-tls" -win=true > test/integration/connect/envoy/results/case-ingress-gateway-tls.log echo "Completed 100%" -elif [ $1 == 4 ] +elif [ $SET == 4 ] then - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-gateway-without-services" -win=true > output/case-gateway-without-services.txt + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-gateway-without-services" -win=true > test/integration/connect/envoy/results/case-gateway-without-services.log echo "Completed 20%" - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-terminating-gateway-hostnames" -win=true > output/case-terminating-gateway-hostnames.txt + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-terminating-gateway-hostnames" -win=true > test/integration/connect/envoy/results/case-terminating-gateway-hostnames.log echo "Completed 40%" - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-terminating-gateway-simple" -win=true > output/case-terminating-gateway-simple.txt + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-terminating-gateway-simple" -win=true > test/integration/connect/envoy/results/case-terminating-gateway-simple.log echo "Completed 60%" - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-terminating-gateway-subsets" -win=true > output/case-terminating-gateway-subsets.txt + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-terminating-gateway-subsets" -win=true > test/integration/connect/envoy/results/case-terminating-gateway-subsets.log echo "Completed 80%" - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-terminating-gateway-without-services" -win=true > output/case-terminating-gateway-without-services.txt + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-terminating-gateway-without-services" -win=true > test/integration/connect/envoy/results/case-terminating-gateway-without-services.log echo "Completed 100%" -elif [ $1 == 5 ] +elif [ $SET == 5 ] then - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-dogstatsd-udp" -win=true > output/case-dogstatsd-udp.txt + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-dogstatsd-udp" -win=true > test/integration/connect/envoy/results/case-dogstatsd-udp.log echo "Completed 16%" - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-grpc" -win=true > output/case-grpc.txt + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-grpc" -win=true > test/integration/connect/envoy/results/case-grpc.log echo "Completed 32%" - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-http" -win=true > output/case-http.txt + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-http" -win=true > test/integration/connect/envoy/results/case-http.log echo "Completed 48%" - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-http-badauthz" -win=true > output/case-http-badauthz.txt + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-http-badauthz" -win=true > test/integration/connect/envoy/results/case-http-badauthz.log echo "Completed 66%" - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-statsd-udp" -win=true > output/case-statsd-udp.txt + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-statsd-udp" -win=true > test/integration/connect/envoy/results/case-statsd-udp.log echo "Completed 83%" - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-stats-proxy" -win=true > output/case-stats-proxy.txt + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-stats-proxy" -win=true > test/integration/connect/envoy/results/case-stats-proxy.log echo "Completed 100%" else - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-badauthz" -win=true > output/case-badauthz.txt - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-basic" -win=true > output/case-basic.txt - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-centralconf" -win=true > output/case-centralconf.txt - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-consul-exec" -win=true > output/case-consul-exec.txt - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-expose-checks" -win=true > output/case-expose-checks.txt - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-l7-intentions" -win=true > output/case-l7-intentions.txt - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-prometheus" -win=true > output/case-prometheus.txt - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-upstream-config" -win=true > output/case-upstream-config.txt - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-zipkin" -win=true > output/case-zipkin.txt - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-cfg-resolver-defaultsubset" -win=true > output/case-cfg-resolver-defaultsubset.txt - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-cfg-resolver-features" -win=true > output/case-cfg-resolver-features.txt - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-cfg-resolver-subset-onlypassing" -win=true > output/case-cfg-resolver-subset-onlypassing.txt - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-cfg-resolver-subset-redirect" -win=true > output/case-cfg-resolver-subset-redirect.txt - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-cfg-resolver-svc-failover" -win=true > output/case-cfg-resolver-svc-failover.txt - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-cfg-resolver-svc-redirect-http" -win=true > output/case-cfg-resolver-svc-redirect-http.txt - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-cfg-resolver-svc-redirect-tcp" -win=true > output/case-cfg-resolver-svc-redirect-tcp.txt - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-cfg-router-features" -win=true > output/case-cfg-router-features.txt - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-cfg-splitter-features" -win=true > output/case-cfg-splitter-features.txt - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-ingress-gateway-grpc" -win=true > output/case-ingress-gateway-grpc.txt - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-ingress-gateway-http" -win=true > output/case-ingress-gateway-http.txt - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-ingress-gateway-multiple-services" -win=true > output/case-ingress-gateway-multiple-services.txt - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-ingress-gateway-sds" -win=true > output/case-ingress-gateway-sds.txt - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-ingress-gateway-simple" -win=true > output/case-ingress-gateway-simple.txt - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-ingress-gateway-tls" -win=true > output/case-ingress-gateway-tls.txt - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-gateway-without-services" -win=true > output/case-gateway-without-services.txt - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-terminating-gateway-hostnames" -win=true > output/case-terminating-gateway-hostnames.txt - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-terminating-gateway-simple" -win=true > output/case-terminating-gateway-simple.txt - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-terminating-gateway-subsets" -win=true > output/case-terminating-gateway-subsets.txt - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-terminating-gateway-without-services" -win=true > output/case-terminating-gateway-without-services.txt - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-dogstatsd-udp" -win=true > output/case-dogstatsd-udp.txt - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-grpc" -win=true > output/case-grpc.txt - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-http" -win=true > output/case-http.txt - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-http-badauthz" -win=true > output/case-http-badauthz.txt - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-statsd-udp" -win=true > output/case-statsd-udp.txt - go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-stats-proxy" -win=true > output/case-stats-proxy.txt - echo "Completed 100%" + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-badauthz" -win=true > test/integration/connect/envoy/results/case-badauthz.log + echo "Completed 01" + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-basic" -win=true > test/integration/connect/envoy/results/case-basic.log + echo "Completed 02" + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-centralconf" -win=true > test/integration/connect/envoy/results/case-centralconf.log + echo "Completed 03" + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-consul-exec" -win=true > test/integration/connect/envoy/results/case-consul-exec.log + echo "Completed 04" + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-expose-checks" -win=true > test/integration/connect/envoy/results/case-expose-checks.log + echo "Completed 05" + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-l7-intentions" -win=true > test/integration/connect/envoy/results/case-l7-intentions.log + echo "Completed 06" + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-prometheus" -win=true > test/integration/connect/envoy/results/case-prometheus.log + echo "Completed 07" + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-upstream-config" -win=true > test/integration/connect/envoy/results/case-upstream-config.log + echo "Completed 08" + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-zipkin" -win=true > test/integration/connect/envoy/results/case-zipkin.log + echo "Completed 09" + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-cfg-resolver-defaultsubset" -win=true > test/integration/connect/envoy/results/case-cfg-resolver-defaultsubset.log + echo "Completed 10" + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-cfg-resolver-features" -win=true > test/integration/connect/envoy/results/case-cfg-resolver-features.log + echo "Completed 11" + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-cfg-resolver-subset-onlypassing" -win=true > test/integration/connect/envoy/results/case-cfg-resolver-subset-onlypassing.log + echo "Completed 12" + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-cfg-resolver-subset-redirect" -win=true > test/integration/connect/envoy/results/case-cfg-resolver-subset-redirect.log + echo "Completed 13" + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-cfg-resolver-svc-failover" -win=true > test/integration/connect/envoy/results/case-cfg-resolver-svc-failover.log + echo "Completed 14" + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-cfg-resolver-svc-redirect-http" -win=true > test/integration/connect/envoy/results/case-cfg-resolver-svc-redirect-http.log + echo "Completed 15" + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-cfg-resolver-svc-redirect-tcp" -win=true > test/integration/connect/envoy/results/case-cfg-resolver-svc-redirect-tcp.log + echo "Completed 16" + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-cfg-router-features" -win=true > test/integration/connect/envoy/results/case-cfg-router-features.log + echo "Completed 17" + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-cfg-splitter-features" -win=true > test/integration/connect/envoy/results/case-cfg-splitter-features.log + echo "Completed 18" + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-ingress-gateway-grpc" -win=true > test/integration/connect/envoy/results/case-ingress-gateway-grpc.log + echo "Completed 19" + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-ingress-gateway-http" -win=true > test/integration/connect/envoy/results/case-ingress-gateway-http.log + echo "Completed 20" + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-ingress-gateway-multiple-services" -win=true > test/integration/connect/envoy/results/case-ingress-gateway-multiple-services.log + echo "Completed 21" + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-ingress-gateway-sds" -win=true > test/integration/connect/envoy/results/case-ingress-gateway-sds.log + echo "Completed 22" + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-ingress-gateway-simple" -win=true > test/integration/connect/envoy/results/case-ingress-gateway-simple.log + echo "Completed 23" + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-ingress-gateway-tls" -win=true > test/integration/connect/envoy/results/case-ingress-gateway-tls.log + echo "Completed 24" + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-gateway-without-services" -win=true > test/integration/connect/envoy/results/case-gateway-without-services.log + echo "Completed 25" + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-terminating-gateway-hostnames" -win=true > test/integration/connect/envoy/results/case-terminating-gateway-hostnames.log + echo "Completed 26" + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-terminating-gateway-simple" -win=true > test/integration/connect/envoy/results/case-terminating-gateway-simple.log + echo "Completed 27" + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-terminating-gateway-subsets" -win=true > test/integration/connect/envoy/results/case-terminating-gateway-subsets.log + echo "Completed 28" + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-terminating-gateway-without-services" -win=true > test/integration/connect/envoy/results/case-terminating-gateway-without-services.log + echo "Completed 29" + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-dogstatsd-udp" -win=true > test/integration/connect/envoy/results/case-dogstatsd-udp.log + echo "Completed 30" + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-grpc" -win=true > test/integration/connect/envoy/results/case-grpc.log + echo "Completed 31" + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-http" -win=true > test/integration/connect/envoy/results/case-http.log + echo "Completed 32" + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-http-badauthz" -win=true > test/integration/connect/envoy/results/case-http-badauthz.log + echo "Completed 33" + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-statsd-udp" -win=true > test/integration/connect/envoy/results/case-statsd-udp.log + echo "Completed 34" + go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-stats-proxy" -win=true > test/integration/connect/envoy/results/case-stats-proxy.log + echo "Completed 35" fi -echo "Completed tests from Set $1" +echo "Completed tests from Set $SET" diff --git a/test/integration/connect/envoy/Dockerfile-consul-envoy-windows b/test/integration/connect/envoy/Dockerfile-consul-envoy-windows new file mode 100644 index 000000000000..b33c409b5571 --- /dev/null +++ b/test/integration/connect/envoy/Dockerfile-consul-envoy-windows @@ -0,0 +1,12 @@ +# From Consul Version 1.13.1 / 1.12.4 / 1.11.8 +ARG VERSION=1.13.1-local +# From Envoy version 1.23.0 / 1.22.3 / 1.21.4 / 1.20.6 / 1.19.5 +ARG ENVOY_VERSION + +FROM docker.mirror.hashicorp.services/windows/envoy-windows:v${ENVOY_VERSION} as envoy +FROM windows/consul:${VERSION} + +# Copy envoy.exe from FROM windows/envoy-windows:${ENVOY_VERSION} +COPY --from=envoy ["C:/Program Files/envoy/", "C:/envoy/"] + +RUN SETX /M path "%PATH%;C:\envoy;" \ No newline at end of file diff --git a/test/integration/connect/envoy/Dockerfile-test-sds-server-windows b/test/integration/connect/envoy/Dockerfile-test-sds-server-windows index 5973757530d1..fc5e45b88d35 100644 --- a/test/integration/connect/envoy/Dockerfile-test-sds-server-windows +++ b/test/integration/connect/envoy/Dockerfile-test-sds-server-windows @@ -1,4 +1,4 @@ -FROM golang:1.18.1-nanoserver-1809 +FROM docker.mirror.hashicorp.services/windows/golang:1809 WORKDIR /go/src COPY ./ . diff --git a/test/integration/connect/envoy/case-dummy-bats/dummy-function.bash b/test/integration/connect/envoy/case-dummy-bats/dummy-function.bash deleted file mode 100644 index 2a282a868eb9..000000000000 --- a/test/integration/connect/envoy/case-dummy-bats/dummy-function.bash +++ /dev/null @@ -1,16 +0,0 @@ -function dummyFunction { - local LOCAL_VAR=$1 - echo $LOCAL_VAR $COMMON_VAR -} - -function curlFunction { - STATUS_CODE=$(curl -s -o /dev/null -w "%{http_code}" https://www.google.com) - echo $STATUS_CODE -} - -function jqFunction { - INPUT_RAW_JSON=$1 - KEY_TO_FIND=$2 - RESULT=$(echo $INPUT_RAW_JSON | jq .$KEY_TO_FIND) - echo $RESULT -} diff --git a/test/integration/connect/envoy/case-dummy-bats/setup.sh b/test/integration/connect/envoy/case-dummy-bats/setup.sh deleted file mode 100644 index 6683bf561f49..000000000000 --- a/test/integration/connect/envoy/case-dummy-bats/setup.sh +++ /dev/null @@ -1 +0,0 @@ -echo $1 >> $2 diff --git a/test/integration/connect/envoy/case-dummy-bats/vars.sh b/test/integration/connect/envoy/case-dummy-bats/vars.sh deleted file mode 100644 index ef12c16d938a..000000000000 --- a/test/integration/connect/envoy/case-dummy-bats/vars.sh +++ /dev/null @@ -1,2 +0,0 @@ -COMMON_VAR="Common variable" -TXT_FILE_NAME="file.txt" diff --git a/test/integration/connect/envoy/case-dummy-bats/verify_1.bats b/test/integration/connect/envoy/case-dummy-bats/verify_1.bats deleted file mode 100644 index 31007243da01..000000000000 --- a/test/integration/connect/envoy/case-dummy-bats/verify_1.bats +++ /dev/null @@ -1,9 +0,0 @@ -@test "Basic Test 1" { - result=4 - [ "$result" -eq 4 ] -} - -@test "Basic Test 2" { - result=10 - [ "$result" -eq 10 ] -} diff --git a/test/integration/connect/envoy/case-dummy-bats/verify_2.bats b/test/integration/connect/envoy/case-dummy-bats/verify_2.bats deleted file mode 100644 index 3b3d92f5f3fc..000000000000 --- a/test/integration/connect/envoy/case-dummy-bats/verify_2.bats +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/env bats - -load dummy-function - -setup() { - source vars.sh - source setup.sh "Content of the created setup.txt file in setup.sh" $TXT_FILE_NAME -} - -teardown() { - cat /dev/null >$TXT_FILE_NAME -} - -@test "Test with dummyFunction invoked" { - FIRST_ARG="First Argument" - - run dummyFunction "$FIRST_ARG" - - [ $status -eq 0 ] - [ -n "$output" ] # Not empty - [ "$output" = "$FIRST_ARG $COMMON_VAR" ] -} - -@test "Test skipped" { - skip - - run not_existing_function - - [ "$status" -eq 100000 ] -} - -@test "Test Function with Curl" { - run curlFunction - - [ $status -eq 0 ] - [ -n "$output" ] - [ "$output" = "200" ] -} - -@test "Test Function with jq" { - local INPUT='{"key1": "Test Value 1", "key2": "Test Value 2"}' - run jqFunction "$INPUT" "key1" - - [ $status -eq 0 ] - [ -n "$output" ] - [ "$output" = "\"Test Value 1\"" ] -} \ No newline at end of file diff --git a/test/integration/connect/envoy/helpers.windows.bash b/test/integration/connect/envoy/helpers.windows.bash index a9cdf9b75dd1..d0effcf48e38 100644 --- a/test/integration/connect/envoy/helpers.windows.bash +++ b/test/integration/connect/envoy/helpers.windows.bash @@ -610,7 +610,7 @@ function docker_consul_for_proxy_bootstrap { function docker_wget { local DC=$1 shift 1 - docker.exe run --rm --network envoy-tests docker.mirror.hashicorp.services/windows/nanoserver curl "$@" + docker.exe run --rm --network envoy-tests docker.mirror.hashicorp.services/windows/nanoserver:1809 curl "$@" } function docker_curl { diff --git a/test/integration/connect/envoy/run-tests.windows.sh b/test/integration/connect/envoy/run-tests.windows.sh index f0765a464e8d..815db049595f 100644 --- a/test/integration/connect/envoy/run-tests.windows.sh +++ b/test/integration/connect/envoy/run-tests.windows.sh @@ -17,7 +17,7 @@ DEBUG=${DEBUG:-} XDS_TARGET=${XDS_TARGET:-server} # ENVOY_VERSION to run each test against -ENVOY_VERSION=${ENVOY_VERSION:-"1.19.5"} +ENVOY_VERSION=${ENVOY_VERSION:-"1.23.0"} export ENVOY_VERSION export DOCKER_BUILDKIT=0 @@ -464,10 +464,6 @@ function stop_and_copy_files { } function run_tests { - local CONSUL_VERSION=$(docker image inspect --format='{{(index (.ContainerConfig.Env) 0)}}' \ - windows/consul:local | grep "VERSION=" | cut -c9-) - echo "Running Tests with Consul=$CONSUL_VERSION - Envoy=$ENVOY_VERSION - XDS_TARGET=$XDS_TARGET" - CASE_DIR="${CASE_DIR?CASE_DIR must be set to the path of the test case}" CASE_NAME=$( basename $CASE_DIR | cut -c6- ) export CASE_NAME @@ -565,22 +561,31 @@ function workdir_cleanup { function suite_setup { - # Cleanup from any previous unclean runs. - suite_teardown + # Cleanup from any previous unclean runs. + suite_teardown - docker.exe network create -d "nat" envoy-tests &>/dev/null + docker.exe network create -d "nat" envoy-tests &>/dev/null - # Start the volume container - # - # This is a dummy container that we use to create volume and keep it - # accessible while other containers are down. - docker.exe volume create envoy_workdir &>/dev/null - docker.exe run -d --name envoy_workdir_1 \ - $WORKDIR_SNIPPET \ - --net=none \ - "${HASHICORP_DOCKER_PROXY}/windows/kubernetes/pause" &>/dev/null - # TODO(rb): switch back to "${HASHICORP_DOCKER_PROXY}/google/pause" once that is cached + # Start the volume container + # + # This is a dummy container that we use to create volume and keep it + # accessible while other containers are down. + docker.exe volume create envoy_workdir &>/dev/null + docker.exe run -d --name envoy_workdir_1 \ + $WORKDIR_SNIPPET \ + --net=none \ + "${HASHICORP_DOCKER_PROXY}/windows/kubernetes/pause" &>/dev/null + # pre-build the consul+envoy container + echo "Rebuilding 'windows/consul:local' image with envoy $ENVOY_VERSION..." + retry_default docker.exe build -t windows/consul:local \ + --build-arg ENVOY_VERSION=${ENVOY_VERSION} \ + -f Dockerfile-consul-envoy-windows . + + + local CONSUL_VERSION=$(docker image inspect --format='{{.ContainerConfig.Labels.version}}' \ + windows/consul:local) + echo "Running Tests with Consul=$CONSUL_VERSION - Envoy=$ENVOY_VERSION - XDS_TARGET=$XDS_TARGET" } function suite_teardown { @@ -854,7 +859,7 @@ function debug_dump_volumes { $WORKDIR_SNIPPET \ -v ./:/cwd \ --net=none \ - "${HASHICORP_DOCKER_PROXY}/windows/nanoserver" \ + "${HASHICORP_DOCKER_PROXY}/windows/nanoserver:1809" \ xcopy "\workdir" "\cwd\workdir" /E /H /C /I /Y }