-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CONSUL-384] Rebase and sync fork (#50)
- Loading branch information
Showing
5 changed files
with
292 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
ARG ENVOY_VERSION=v1.23.0 | ||
ARG CONSUL_IMAGE_VERSION=latest | ||
|
||
FROM envoyproxy/envoy-windows:${ENVOY_VERSION} as envoy | ||
FROM windows/consul:${CONSUL_IMAGE_VERSION} | ||
COPY dist/ C:\\consul | ||
|
||
# Fortio binary downloaded | ||
RUN mkdir fortio | ||
ENV FORTIO_URL=https://github.com/fortio/fortio/releases/download/v1.33.0/fortio_win_1.33.0.zip | ||
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 | ||
|
||
# Install Bats | ||
ENV BATS_URL=https://github.com/bats-core/bats-core/archive/refs/tags/v1.7.0.zip | ||
RUN curl %BATS_URL% -L -o bats.zip | ||
RUN mkdir bats-core | ||
RUN tar -xf bats.zip -C bats-core --strip-components=1 | ||
RUN cd "C:\\Program Files\\Git\\bin" && bash.exe -c "/c/bats-core/install.sh /c/bats" | ||
|
||
# Install Jaeger | ||
ENV JAEGER_URL=https://github.com/jaegertracing/jaeger/releases/download/v1.11.0/jaeger-1.11.0-windows-amd64.tar.gz | ||
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/"] | ||
|
||
EXPOSE 8300 | ||
EXPOSE 8301 8301/udp 8302 8302/udp | ||
EXPOSE 8500 8600 8600/udp | ||
EXPOSE 8502 | ||
|
||
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\OpenSSL-Win64\bin;C:\bats\bin\bats;C:\ProgramData\chocolatey\lib\jq\tools;" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/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 . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
#!/usr/bin/env bash | ||
|
||
echo "Started tests from Set $1" | ||
|
||
mkdir output -p | ||
|
||
if [ $1 == 0 ] | ||
then | ||
|
||
go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-badauthz" -win=true > output/case-badauthz.txt | ||
echo "Completed 33%" | ||
go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-basic" -win=true > output/case-basic.txt | ||
echo "Completed 66%" | ||
go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-centralconf" -win=true > output/case-centralconf.txt | ||
echo "Completed 100%" | ||
|
||
elif [ $1 == 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 | ||
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 | ||
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 | ||
echo "Completed 60%" | ||
go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-prometheus" -win=true > output/case-prometheus.txt | ||
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 | ||
echo "Completed 100%" | ||
|
||
elif [ $1 == 2 ] | ||
then | ||
go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-zipkin" -win=true > output/case-zipkin.txt | ||
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 | ||
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 | ||
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 | ||
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 | ||
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 | ||
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 | ||
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 | ||
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 | ||
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 | ||
echo "Completed 100%" | ||
|
||
elif [ $1 == 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 | ||
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 | ||
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 | ||
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 | ||
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 | ||
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 | ||
echo "Completed 100%" | ||
|
||
elif [ $1 == 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 | ||
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 | ||
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 | ||
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 | ||
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 | ||
echo "Completed 100%" | ||
|
||
elif [ $1 == 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 | ||
echo "Completed 16%" | ||
go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-grpc" -win=true > output/case-grpc.txt | ||
echo "Completed 32%" | ||
go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-http" -win=true > output/case-http.txt | ||
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 | ||
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 | ||
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 | ||
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%" | ||
fi | ||
|
||
echo "Completed tests from Set $1" |
Oops, something went wrong.