Fix e2e tests

This commit is contained in:
Luke Kysow
2019-08-26 19:24:47 +02:00
parent fe84240d72
commit b99832f99b
6 changed files with 27 additions and 11 deletions

View File

@@ -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

View File

@@ -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)

View File

@@ -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

8
e2e/go.mod Normal file
View File

@@ -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
)

17
e2e/go.sum Normal file
View File

@@ -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=

View File

@@ -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