Adding e2e tests back and upgrading terraform version 0.9.11 (#113)

* Adding e2e tests back and upgrading terraform version 0.9.11

* Fixing the binary name for e2e tests

* revert binary name change

* missed indentation for makefile

* use owner name for branch head for pull request creation
This commit is contained in:
Anubhav Mishra
2017-08-10 21:17:50 -07:00
committed by GitHub
parent 6f583aae62
commit c663be4247
4 changed files with 16 additions and 20 deletions

View File

@@ -3,7 +3,7 @@ machine:
environment:
GOPATH: "${HOME}/.go_workspace"
WORKDIR: "${GOPATH}/src/github.com/hootsuite/atlantis"
TERRAFORM_VERSION: 0.8.8
TERRAFORM_VERSION: 0.9.11
dependencies:
pre:
@@ -22,17 +22,16 @@ test:
# Run tests
- cd "${WORKDIR}" && ./scripts/build.sh
# Disable e2e test until we open source atlantis-tests repo and figure out when to run e2e tests
# post:
# # Run e2e tests
# - cd "${WORKDIR}" && ./scripts/e2e-deps.sh
# # Start atlantis server
# - cd "${WORKDIR}/e2e" && ./atlantis server --gh-user="$GITHUB_USERNAME" --gh-token="$GITHUB_PASSWORD" --data-dir="/tmp" --log-level="debug" &> /tmp/atlantis-server.log:
# background: true
# - sleep 2
# - cd "${WORKDIR}/e2e" && ./ngrok http 4141:
# background: true
# - sleep 2
# # Set ATLANTIS_URL environment variable to be used by atlantis e2e test to create the webhook
# - echo '' >> ~/.circlerc && echo 'export ATLANTIS_URL=$(curl -s 'http://localhost:4040/api/tunnels' | jq -r '.tunnels[1].public_url') ' >> ~/.circlerc
# - cd "${WORKDIR}/e2e" && ../scripts/e2e.sh
post:
# Run e2e tests
- cd "${WORKDIR}" && ./scripts/e2e-deps.sh
# Start atlantis server
- cd "${WORKDIR}/e2e" && ./atlantis server --gh-user="$GITHUB_USERNAME" --gh-token="$GITHUB_PASSWORD" --data-dir="/tmp" --log-level="debug" &> /tmp/atlantis-server.log:
background: true
- sleep 2
- cd "${WORKDIR}/e2e" && ./ngrok http 4141:
background: true
- sleep 2
# Set ATLANTIS_URL environment variable to be used by atlantis e2e test to create the webhook
- echo '' >> ~/.circlerc && echo 'export ATLANTIS_URL=$(curl -s 'http://localhost:4040/api/tunnels' | jq -r '.tunnels[1].public_url') ' >> ~/.circlerc
- cd "${WORKDIR}/e2e" && ../scripts/e2e.sh

View File

@@ -13,6 +13,7 @@ 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

View File

@@ -95,7 +95,7 @@ func (t *E2ETester) Start() (*E2EResult, error) {
// create a new pr
title := fmt.Sprintf("This is a test pull request for atlantis e2e test for %s project type", t.projectType.Name)
head := fmt.Sprintf("%s:%s", t.githubClient.username, branchName)
head := fmt.Sprintf("%s:%s", t.ownerName, branchName)
body := ""
base := "master"
newPullRequest := &github.NewPullRequest{Title: &title, Head: &head, Body: &body, Base: &base}

View File

@@ -7,10 +7,6 @@ IFS=$'\n\t'
echo "Running 'make deps'"
make deps
# Test dependencies
echo "Running 'make deps-test'"
make deps-test
# Run tests
echo "Running 'make test'"
make test