diff --git a/Dockerfile.test b/Dockerfile.test index 5be25682..efeca998 100644 --- a/Dockerfile.test +++ b/Dockerfile.test @@ -1,4 +1,7 @@ -FROM golang:1.12 +ARG GOLANG_VERSION=latest +FROM golang:$GOLANG_VERSION + +RUN echo $GOLANG_VERSION RUN mkdir -p /athens/tests diff --git a/Makefile b/Makefile index 130721ee..07d8596a 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,10 @@ VERSION = "unset" DATE=$(shell date -u +%Y-%m-%d-%H:%M:%S-%Z) + +ifndef GOLANG_VERSION +override GOLANG_VERSION = latest +endif + .PHONY: build build: ## build the athens proxy cd cmd/proxy && go build @@ -47,7 +52,8 @@ test-unit: ## run unit tests with race detector and code coverage enabled .PHONY: test-unit-docker test-unit-docker: ## run unit tests with docker - docker-compose -p athensunit up --exit-code-from=testunit --build testunit + docker-compose -p athensunit build --build-arg GOLANG_VERSION=${GOLANG_VERSION} testunit + docker-compose -p athensunit up --exit-code-from=testunit testunit docker-compose -p athensunit down .PHONY: test-e2e @@ -56,7 +62,8 @@ test-e2e: .PHONY: test-e2e-docker test-e2e-docker: - docker-compose -p athense2e up --build --exit-code-from=teste2e teste2e + docker-compose -p athense2e build --build-arg GOLANG_VERSION=${GOLANG_VERSION} teste2e + docker-compose -p athense2e up --exit-code-from=teste2e teste2e docker-compose -p athense2e down .PHONY: docker diff --git a/docker-compose.yml b/docker-compose.yml index e42cdfa8..716d8bdf 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -17,6 +17,8 @@ services: build: context: . dockerfile: Dockerfile.test + args: + GOLANG_VERSION: latest command: ["./scripts/test_unit.sh"] environment: - GO_ENV=test @@ -31,6 +33,8 @@ services: build: context: . dockerfile: Dockerfile.test + args: + GOLANG_VERSION: latest command: ["./scripts/test_e2e.sh"] azurite: image: arafato/azurite:2.6.5 diff --git a/go.sum b/go.sum index 48578cd3..fff96bf8 100644 --- a/go.sum +++ b/go.sum @@ -6,8 +6,10 @@ git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999 h1:OR8VhtwhcAI3U48/ git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= github.com/Azure/azure-pipeline-go v0.1.8 h1:KmVRa8oFMaargVesEuuEoiLCQ4zCCwQ8QX/xg++KS20= github.com/Azure/azure-pipeline-go v0.1.8/go.mod h1:XA1kFWRVhSK+KNFiOhfv83Fv8L9achrP7OxIzeTn1Yg= +github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= github.com/Azure/azure-storage-blob-go v0.0.0-20181022225951-5152f14ace1c h1:Y5ueznoCekgCWBytF1Q9lTpZ3tJeX37dQtCcGjMCLYI= github.com/Azure/azure-storage-blob-go v0.0.0-20181022225951-5152f14ace1c/go.mod h1:oGfmITT1V6x//CswqY2gtAHND+xIP64/qL7a5QJix0Y= +github.com/Azure/azure-storage-blob-go v0.7.0/go.mod h1:f9YQKtsG1nMisotuTPpO0tjNuEjKRYAcJU8/ydDI++4= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/DataDog/datadog-go v0.0.0-20180822151419-281ae9f2d895 h1:dmc/C8bpE5VkQn65PNbbyACDC8xw8Hpp/NEurdPmQDQ= @@ -144,6 +146,7 @@ github.com/markbates/hmax v1.0.0 h1:yo2N0gBoCnUMKhV/VRLHomT6Y9wUm+oQQENuWJqCdlM= github.com/markbates/hmax v1.0.0/go.mod h1:cOkR9dktiESxIMu+65oc/r/bdY4bE8zZw3OLhLx0X2c= github.com/mattn/go-colorable v0.0.9 h1:UVL0vNpWh04HeJXV0KLcaT7r06gOH2l4OW6ddYRUIY4= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= github.com/mattn/go-isatty v0.0.4 h1:bnP0vzxcAdeI1zdubAl5PjU6zsERjGZb7raWodagDYs= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=