From b99832f99b813530c0e53bf1228bcc6c4ed0dc9a Mon Sep 17 00:00:00 2001 From: Luke Kysow <1034429+lkysow@users.noreply.github.com> Date: Mon, 26 Aug 2019 19:24:47 +0200 Subject: [PATCH] Fix e2e tests --- .circleci/config.yml | 1 - Makefile | 2 +- e2e/Makefile | 6 ------ e2e/go.mod | 8 ++++++++ e2e/go.sum | 17 +++++++++++++++++ scripts/e2e.sh | 4 +--- 6 files changed, 27 insertions(+), 11 deletions(-) create mode 100644 e2e/go.mod create mode 100644 e2e/go.sum diff --git a/.circleci/config.yml b/.circleci/config.yml index 5601bf89f..97c324c48 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -22,7 +22,6 @@ jobs: # that flag starts the download asynchronously so we'd have a race # condition. TERRAFORM_VERSION: 0.12.7 - GOFLAGS: "-mod=vendor" steps: - checkout - run: make build-service diff --git a/Makefile b/Makefile index 05a8575c7..501d80df7 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,7 @@ debug: ## Output internal make variables @echo PKG = $(PKG) build-service: ## Build the main Go service - CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -o atlantis . + CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -mod=vendor -v -o atlantis . go-generate: ## Run go generate in all packages go generate $(PKG) diff --git a/e2e/Makefile b/e2e/Makefile index 60c7e44ab..16790362b 100644 --- a/e2e/Makefile +++ b/e2e/Makefile @@ -9,15 +9,9 @@ help: ## List targets & descriptions debug: ## Output internal make variables @echo WORKSPACE = $(WORKSPACE) -deps: ## Get go dependencies - go get -v . - build: ## Build the main Go service rm -f atlantis-tests go build -v -o atlantis-tests . -deps-test: ## Run tests for go dependencies - go get -t - run: ## Run e2e tests ./atlantis-tests diff --git a/e2e/go.mod b/e2e/go.mod new file mode 100644 index 000000000..25e6ad059 --- /dev/null +++ b/e2e/go.mod @@ -0,0 +1,8 @@ +module github.com/runatlantis/atlantis/e2e + +go 1.12 + +require ( + github.com/google/go-github/v28 v28.0.0 + github.com/hashicorp/go-multierror v1.0.0 +) diff --git a/e2e/go.sum b/e2e/go.sum new file mode 100644 index 000000000..694d62374 --- /dev/null +++ b/e2e/go.sum @@ -0,0 +1,17 @@ +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/google/go-github/v28 v28.0.0 h1:+UjHI4+1W/vsXR4jJBWt0ZA74XHbvt5yBAvsf1M3bgM= +github.com/google/go-github/v28 v28.0.0/go.mod h1:+5GboIspo7F0NG2qsvfYh7en6F3EK37uyqv+c35AR3s= +github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk= +github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= +github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= diff --git a/scripts/e2e.sh b/scripts/e2e.sh index 8e48ee783..6dfb50ea5 100755 --- a/scripts/e2e.sh +++ b/scripts/e2e.sh @@ -4,6 +4,7 @@ set -euo pipefail IFS=$'\n\t' # download all the tooling needed for e2e tests +CIRCLE_WORKING_DIRECTORY="${CIRCLE_WORKING_DIRECTORY/#\~/$HOME}" # https://discuss.circleci.com/t/circle-working-directory-doesnt-expand/17007/5 ${CIRCLE_WORKING_DIRECTORY}/scripts/e2e-deps.sh cd "${CIRCLE_WORKING_DIRECTORY}/e2e" @@ -25,9 +26,6 @@ sleep 2 export ATLANTIS_URL=$(curl -s 'http://localhost:4040/api/tunnels' | jq -r '.tunnels[] | select(.proto=="http") | .public_url') # Now we can start the e2e tests -echo "Running 'make deps'" -make deps - echo "Running 'make build'" make build