mirror of
https://git.vectorsigma.ru/public/atlantis.git
synced 2026-07-28 23:18:15 +00:00
Rename to runatlantis from atlantisnorth.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
version: 2
|
||||
jobs:
|
||||
build:
|
||||
working_directory: /go/src/github.com/atlantisnorth/atlantis
|
||||
working_directory: /go/src/github.com/runatlantis/atlantis
|
||||
docker:
|
||||
- image: circleci/golang:1.9.2
|
||||
environment:
|
||||
@@ -38,14 +38,14 @@ jobs:
|
||||
name: Build image
|
||||
command: |
|
||||
if [ "${CIRCLE_BRANCH}" == "master" ]; then
|
||||
docker build -t atlantisnorth/atlantis:latest .
|
||||
docker build -t runatlantis/atlantis:latest .
|
||||
fi
|
||||
- run:
|
||||
name: Push image
|
||||
command: |
|
||||
if [ "${CIRCLE_BRANCH}" == "master" ]; then
|
||||
docker login -u "$DOCKER_USER" -p "$DOCKER_PASSWORD"
|
||||
docker push atlantisnorth/atlantis:latest
|
||||
docker push runatlantis/atlantis:latest
|
||||
fi
|
||||
- run:
|
||||
name: Tag and push version if exists
|
||||
@@ -54,7 +54,7 @@ jobs:
|
||||
command: |
|
||||
if [ "${CIRCLE_BRANCH}" == "master" ]; then
|
||||
for TAG in $(git tag --contains $CIRCLE_SHA1); do
|
||||
docker tag atlantisnorth/atlantis:latest atlantisnorth/atlantis:$TAG
|
||||
docker push atlantisnorth/atlantis:$TAG
|
||||
docker tag runatlantis/atlantis:latest runatlantis/atlantis:$TAG
|
||||
docker push runatlantis/atlantis:$TAG
|
||||
done
|
||||
fi
|
||||
|
||||
68
CHANGELOG.md
68
CHANGELOG.md
@@ -9,10 +9,10 @@
|
||||
None
|
||||
|
||||
## Downloads
|
||||
* [atlantis_darwin_amd64.zip](https://github.com/atlantisnorth/atlantis/releases/download/v0.2.4/atlantis_darwin_amd64.zip)
|
||||
* [atlantis_linux_386.zip](https://github.com/atlantisnorth/atlantis/releases/download/v0.2.4/atlantis_linux_386.zip)
|
||||
* [atlantis_linux_amd64.zip](https://github.com/atlantisnorth/atlantis/releases/download/v0.2.4/atlantis_linux_amd64.zip)
|
||||
* [atlantis_linux_arm.zip](https://github.com/atlantisnorth/atlantis/releases/download/v0.2.4/atlantis_linux_arm.zip)
|
||||
* [atlantis_darwin_amd64.zip](https://github.com/runatlantis/atlantis/releases/download/v0.2.4/atlantis_darwin_amd64.zip)
|
||||
* [atlantis_linux_386.zip](https://github.com/runatlantis/atlantis/releases/download/v0.2.4/atlantis_linux_386.zip)
|
||||
* [atlantis_linux_amd64.zip](https://github.com/runatlantis/atlantis/releases/download/v0.2.4/atlantis_linux_amd64.zip)
|
||||
* [atlantis_linux_arm.zip](https://github.com/runatlantis/atlantis/releases/download/v0.2.4/atlantis_linux_arm.zip)
|
||||
|
||||
# v0.2.3
|
||||
## Features
|
||||
@@ -25,10 +25,10 @@ None
|
||||
None
|
||||
|
||||
## Downloads
|
||||
* [atlantis_darwin_amd64.zip](https://github.com/atlantisnorth/atlantis/releases/download/v0.2.3/atlantis_darwin_amd64.zip)
|
||||
* [atlantis_linux_386.zip](https://github.com/atlantisnorth/atlantis/releases/download/v0.2.3/atlantis_linux_386.zip)
|
||||
* [atlantis_linux_amd64.zip](https://github.com/atlantisnorth/atlantis/releases/download/v0.2.3/atlantis_linux_amd64.zip)
|
||||
* [atlantis_linux_arm.zip](https://github.com/atlantisnorth/atlantis/releases/download/v0.2.3/atlantis_linux_arm.zip)
|
||||
* [atlantis_darwin_amd64.zip](https://github.com/runatlantis/atlantis/releases/download/v0.2.3/atlantis_darwin_amd64.zip)
|
||||
* [atlantis_linux_386.zip](https://github.com/runatlantis/atlantis/releases/download/v0.2.3/atlantis_linux_386.zip)
|
||||
* [atlantis_linux_amd64.zip](https://github.com/runatlantis/atlantis/releases/download/v0.2.3/atlantis_linux_amd64.zip)
|
||||
* [atlantis_linux_arm.zip](https://github.com/runatlantis/atlantis/releases/download/v0.2.3/atlantis_linux_arm.zip)
|
||||
|
||||
# v0.2.2
|
||||
## Features
|
||||
@@ -47,10 +47,10 @@ None
|
||||
This is safe to do because you'll just need to re-run `plan` to get your plan back.
|
||||
|
||||
## Downloads
|
||||
* [atlantis_darwin_amd64.zip](https://github.com/atlantisnorth/atlantis/releases/download/v0.2.2/atlantis_darwin_amd64.zip)
|
||||
* [atlantis_linux_386.zip](https://github.com/atlantisnorth/atlantis/releases/download/v0.2.2/atlantis_linux_386.zip)
|
||||
* [atlantis_linux_amd64.zip](https://github.com/atlantisnorth/atlantis/releases/download/v0.2.2/atlantis_linux_amd64.zip)
|
||||
* [atlantis_linux_arm.zip](https://github.com/atlantisnorth/atlantis/releases/download/v0.2.2/atlantis_linux_arm.zip)
|
||||
* [atlantis_darwin_amd64.zip](https://github.com/runatlantis/atlantis/releases/download/v0.2.2/atlantis_darwin_amd64.zip)
|
||||
* [atlantis_linux_386.zip](https://github.com/runatlantis/atlantis/releases/download/v0.2.2/atlantis_linux_386.zip)
|
||||
* [atlantis_linux_amd64.zip](https://github.com/runatlantis/atlantis/releases/download/v0.2.2/atlantis_linux_amd64.zip)
|
||||
* [atlantis_linux_arm.zip](https://github.com/runatlantis/atlantis/releases/download/v0.2.2/atlantis_linux_arm.zip)
|
||||
|
||||
# v0.2.1
|
||||
## Features
|
||||
@@ -63,10 +63,10 @@ This is safe to do because you'll just need to re-run `plan` to get your plan ba
|
||||
None
|
||||
|
||||
## Downloads
|
||||
* [atlantis_darwin_amd64.zip](https://github.com/atlantisnorth/atlantis/releases/download/v0.2.1/atlantis_darwin_amd64.zip)
|
||||
* [atlantis_linux_386.zip](https://github.com/atlantisnorth/atlantis/releases/download/v0.2.1/atlantis_linux_386.zip)
|
||||
* [atlantis_linux_amd64.zip](https://github.com/atlantisnorth/atlantis/releases/download/v0.2.1/atlantis_linux_amd64.zip)
|
||||
* [atlantis_linux_arm.zip](https://github.com/atlantisnorth/atlantis/releases/download/v0.2.1/atlantis_linux_arm.zip)
|
||||
* [atlantis_darwin_amd64.zip](https://github.com/runatlantis/atlantis/releases/download/v0.2.1/atlantis_darwin_amd64.zip)
|
||||
* [atlantis_linux_386.zip](https://github.com/runatlantis/atlantis/releases/download/v0.2.1/atlantis_linux_386.zip)
|
||||
* [atlantis_linux_amd64.zip](https://github.com/runatlantis/atlantis/releases/download/v0.2.1/atlantis_linux_amd64.zip)
|
||||
* [atlantis_linux_arm.zip](https://github.com/runatlantis/atlantis/releases/download/v0.2.1/atlantis_linux_arm.zip)
|
||||
|
||||
# v0.2.0
|
||||
## Features
|
||||
@@ -80,10 +80,10 @@ None
|
||||
None
|
||||
|
||||
## Downloads
|
||||
* [atlantis_darwin_amd64.zip](https://github.com/atlantisnorth/atlantis/releases/download/v0.2.0/atlantis_darwin_amd64.zip)
|
||||
* [atlantis_linux_386.zip](https://github.com/atlantisnorth/atlantis/releases/download/v0.2.0/atlantis_linux_386.zip)
|
||||
* [atlantis_linux_amd64.zip](https://github.com/atlantisnorth/atlantis/releases/download/v0.2.0/atlantis_linux_amd64.zip)
|
||||
* [atlantis_linux_arm.zip](https://github.com/atlantisnorth/atlantis/releases/download/v0.2.0/atlantis_linux_arm.zip)
|
||||
* [atlantis_darwin_amd64.zip](https://github.com/runatlantis/atlantis/releases/download/v0.2.0/atlantis_darwin_amd64.zip)
|
||||
* [atlantis_linux_386.zip](https://github.com/runatlantis/atlantis/releases/download/v0.2.0/atlantis_linux_386.zip)
|
||||
* [atlantis_linux_amd64.zip](https://github.com/runatlantis/atlantis/releases/download/v0.2.0/atlantis_linux_amd64.zip)
|
||||
* [atlantis_linux_arm.zip](https://github.com/runatlantis/atlantis/releases/download/v0.2.0/atlantis_linux_arm.zip)
|
||||
|
||||
# v0.1.3
|
||||
## Features
|
||||
@@ -98,10 +98,10 @@ None
|
||||
None
|
||||
|
||||
## Downloads
|
||||
* [atlantis_darwin_amd64.zip](https://github.com/atlantisnorth/atlantis/releases/download/v0.1.3/atlantis_darwin_amd64.zip)
|
||||
* [atlantis_linux_386.zip](https://github.com/atlantisnorth/atlantis/releases/download/v0.1.3/atlantis_linux_386.zip)
|
||||
* [atlantis_linux_amd64.zip](https://github.com/atlantisnorth/atlantis/releases/download/v0.1.3/atlantis_linux_amd64.zip)
|
||||
* [atlantis_linux_arm.zip](https://github.com/atlantisnorth/atlantis/releases/download/v0.1.3/atlantis_linux_arm.zip)
|
||||
* [atlantis_darwin_amd64.zip](https://github.com/runatlantis/atlantis/releases/download/v0.1.3/atlantis_darwin_amd64.zip)
|
||||
* [atlantis_linux_386.zip](https://github.com/runatlantis/atlantis/releases/download/v0.1.3/atlantis_linux_386.zip)
|
||||
* [atlantis_linux_amd64.zip](https://github.com/runatlantis/atlantis/releases/download/v0.1.3/atlantis_linux_amd64.zip)
|
||||
* [atlantis_linux_arm.zip](https://github.com/runatlantis/atlantis/releases/download/v0.1.3/atlantis_linux_arm.zip)
|
||||
|
||||
# v0.1.2
|
||||
## Features
|
||||
@@ -112,10 +112,10 @@ None
|
||||
* Plan and Apply outputs are shown in new line. ([#132](https://github.com/hootsuite/atlantis/pull/132))
|
||||
|
||||
## Downloads
|
||||
* [atlantis_darwin_amd64.zip](https://github.com/atlantisnorth/atlantis/releases/download/v0.1.2/atlantis_darwin_amd64.zip)
|
||||
* [atlantis_linux_386.zip](https://github.com/atlantisnorth/atlantis/releases/download/v0.1.2/atlantis_linux_386.zip)
|
||||
* [atlantis_linux_amd64.zip](https://github.com/atlantisnorth/atlantis/releases/download/v0.1.2/atlantis_linux_amd64.zip)
|
||||
* [atlantis_linux_arm.zip](https://github.com/atlantisnorth/atlantis/releases/download/v0.1.2/atlantis_linux_arm.zip)
|
||||
* [atlantis_darwin_amd64.zip](https://github.com/runatlantis/atlantis/releases/download/v0.1.2/atlantis_darwin_amd64.zip)
|
||||
* [atlantis_linux_386.zip](https://github.com/runatlantis/atlantis/releases/download/v0.1.2/atlantis_linux_386.zip)
|
||||
* [atlantis_linux_amd64.zip](https://github.com/runatlantis/atlantis/releases/download/v0.1.2/atlantis_linux_amd64.zip)
|
||||
* [atlantis_linux_arm.zip](https://github.com/runatlantis/atlantis/releases/download/v0.1.2/atlantis_linux_arm.zip)
|
||||
|
||||
# v0.1.1
|
||||
## Backwards Incompatibilities / Notes:
|
||||
@@ -123,11 +123,11 @@ None
|
||||
assume role session with the GitHub username of the user running the Atlantis command
|
||||
use the `atlantis_user` terraform variable alongside Terraform's
|
||||
[built-in support](https://www.terraform.io/docs/providers/aws/#assume-role) for assume role
|
||||
(see https://github.com/atlantisnorth/atlantis/blob/master/README.md#assume-role-session-names)
|
||||
(see https://github.com/runatlantis/atlantis/blob/master/README.md#assume-role-session-names)
|
||||
* Atlantis has a docker image now ([#123](https://github.com/hootsuite/atlantis/pull/123)). Here is how you can try it out:
|
||||
|
||||
```bash
|
||||
docker run atlantisnorth/atlantis:v0.1.1 server --gh-user=GITHUB_USERNAME --gh-token=GITHUB_TOKEN
|
||||
docker run runatlantis/atlantis:v0.1.1 server --gh-user=GITHUB_USERNAME --gh-token=GITHUB_TOKEN
|
||||
```
|
||||
|
||||
## Improvements
|
||||
@@ -137,7 +137,7 @@ docker run atlantisnorth/atlantis:v0.1.1 server --gh-user=GITHUB_USERNAME --gh-t
|
||||
|
||||
## Downloads
|
||||
|
||||
* [atlantis_darwin_amd64.zip](https://github.com/atlantisnorth/atlantis/releases/download/v0.1.1/atlantis_darwin_amd64.zip)
|
||||
* [atlantis_linux_386.zip](https://github.com/atlantisnorth/atlantis/releases/download/v0.1.1/atlantis_linux_386.zip)
|
||||
* [atlantis_linux_amd64.zip](https://github.com/atlantisnorth/atlantis/releases/download/v0.1.1/atlantis_linux_amd64.zip)
|
||||
* [atlantis_linux_arm.zip](https://github.com/atlantisnorth/atlantis/releases/download/v0.1.1/atlantis_linux_arm.zip)
|
||||
* [atlantis_darwin_amd64.zip](https://github.com/runatlantis/atlantis/releases/download/v0.1.1/atlantis_darwin_amd64.zip)
|
||||
* [atlantis_linux_386.zip](https://github.com/runatlantis/atlantis/releases/download/v0.1.1/atlantis_linux_386.zip)
|
||||
* [atlantis_linux_amd64.zip](https://github.com/runatlantis/atlantis/releases/download/v0.1.1/atlantis_linux_amd64.zip)
|
||||
* [atlantis_linux_arm.zip](https://github.com/runatlantis/atlantis/releases/download/v0.1.1/atlantis_linux_arm.zip)
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
## Running Atlantis Locally
|
||||
Get the source code:
|
||||
```
|
||||
go get github.com/atlantisnorth/atlantis
|
||||
go get github.com/runatlantis/atlantis
|
||||
```
|
||||
This will clone Atlantis into `$GOPATH/src/github.com/atlantisnorth/atlantis` (where `$GOPATH` defaults to `~/go`).
|
||||
This will clone Atlantis into `$GOPATH/src/github.com/runatlantis/atlantis` (where `$GOPATH` defaults to `~/go`).
|
||||
|
||||
Go to that directory:
|
||||
```
|
||||
cd $GOPATH/src/github.com/atlantisnorth/atlantis
|
||||
cd $GOPATH/src/github.com/runatlantis/atlantis
|
||||
```
|
||||
|
||||
Compile Atlantis:
|
||||
@@ -25,7 +25,7 @@ If you get an error like `command not found: atlantis`, ensure that `$GOPATH/bin
|
||||
|
||||
## Calling Your Local Atlantis From GitHub
|
||||
- Create a test terraform repository in your GitHub.
|
||||
- Create a personal access token for Atlantis. See [Create a GitHub token](https://github.com/atlantisnorth/atlantis#create-a-github-token).
|
||||
- Create a personal access token for Atlantis. See [Create a GitHub token](https://github.com/runatlantis/atlantis#create-a-github-token).
|
||||
- Start Atlantis in server mode using that token:
|
||||
```
|
||||
atlantis server --gh-user <your username> --gh-token <your token> --log-level debug
|
||||
@@ -35,7 +35,7 @@ atlantis server --gh-user <your username> --gh-token <your token> --log-level de
|
||||
```
|
||||
ngrok http 4141
|
||||
```
|
||||
- Create a WebHook in your repo and use the `https` url that `ngrok` printed out after running `ngrok http 4141`. Be sure to append `/events` so your webhook url looks something like `https://efce3bcd.ngrok.io/events`. See [Add GitHub Webhook](https://github.com/atlantisnorth/atlantis#add-github-webhook).
|
||||
- Create a WebHook in your repo and use the `https` url that `ngrok` printed out after running `ngrok http 4141`. Be sure to append `/events` so your webhook url looks something like `https://efce3bcd.ngrok.io/events`. See [Add GitHub Webhook](https://github.com/runatlantis/atlantis#add-github-webhook).
|
||||
- Create a pull request and type `atlantis help`. You should see the request in the `ngrok` and Atlantis logs and you should also see Atlantis comment back.
|
||||
|
||||
## Code Style
|
||||
@@ -70,7 +70,7 @@ This is easier to read and more consistent
|
||||
### Testing
|
||||
- place tests under `{package under test}_test` to enforce testing the external interfaces
|
||||
- if you need to test internally i.e. access non-exported stuff, call the file `{file under test}_internal_test.go`
|
||||
- use our testing utility for easier-to-read assertions: `import . "github.com/atlantisnorth/atlantis/testing"` and then use `Assert()`, `Equals()` and `Ok()`
|
||||
- use our testing utility for easier-to-read assertions: `import . "github.com/runatlantis/atlantis/testing"` and then use `Assert()`, `Equals()` and `Ok()`
|
||||
- don't try to describe the whole test by its function name. Instead use `t.Log` statements:
|
||||
```go
|
||||
// don't do this
|
||||
@@ -94,7 +94,7 @@ func TestLockingExisting(t *testing.T) {
|
||||
1. Create a pull request and merge to master
|
||||
1. Check out master and fetch latest
|
||||
1. Run `make release`
|
||||
1. Go to https://github.com/atlantisnorth/atlantis/releases and click "Draft a new release"
|
||||
1. Go to https://github.com/runatlantis/atlantis/releases and click "Draft a new release"
|
||||
1. Prefix version with `v`
|
||||
1. The title of the release is the same as the tag (ex. v0.2.2)
|
||||
1. Description should just be `See CHANGELOG` with link to CHANGELOG at that release, ex: `See [CHANGELOG](CHANGELOG.md#v022)`
|
||||
|
||||
2
Makefile
2
Makefile
@@ -1,7 +1,7 @@
|
||||
BUILD_ID := $(shell git rev-parse --short HEAD 2>/dev/null || echo no-commit-id)
|
||||
WORKSPACE := $(shell pwd)
|
||||
PKG := $(shell go list ./... | grep -v e2e | grep -v vendor | grep -v static)
|
||||
IMAGE_NAME := atlantisnorth/atlantis
|
||||
IMAGE_NAME := runatlantis/atlantis
|
||||
|
||||
.PHONY: test
|
||||
|
||||
|
||||
14
README.md
14
README.md
@@ -10,7 +10,7 @@
|
||||
|
||||
Read about [Why We Built Atlantis](https://www.atlantis.run/blog/atlantis-release/)
|
||||
|
||||
[](https://circleci.com/gh/atlantisnorth/atlantis/tree/master)
|
||||
[](https://circleci.com/gh/runatlantis/atlantis/tree/master)
|
||||
[](https://twitter.com/kelseyhightower/status/893260922222813184)
|
||||
[](https://thawing-headland-22460.herokuapp.com)
|
||||
|
||||
@@ -51,10 +51,10 @@ Read about [Why We Built Atlantis](https://www.atlantis.run/blog/atlantis-releas
|
||||
## Atlantis Works With
|
||||
* GitHub (public, private or enterprise) and GitLab (public, private or enterprise)
|
||||
* Any Terraform version (see [Terraform Versions](#terraform-version))
|
||||
* Can be run with a [single binary](https://github.com/atlantisnorth/atlantis/releases) or with our [Docker image](https://hub.docker.com/r/atlantisnorth/atlantis/)
|
||||
* Can be run with a [single binary](https://github.com/runatlantis/atlantis/releases) or with our [Docker image](https://hub.docker.com/r/runatlantis/atlantis/)
|
||||
|
||||
## Getting Started
|
||||
Download from [https://github.com/atlantisnorth/atlantis/releases](https://github.com/atlantisnorth/atlantis/releases)
|
||||
Download from [https://github.com/runatlantis/atlantis/releases](https://github.com/runatlantis/atlantis/releases)
|
||||
|
||||
Run
|
||||
```
|
||||
@@ -326,7 +326,7 @@ Atlantis is now running!
|
||||
Atlantis also ships inside a docker image. Run the docker image:
|
||||
|
||||
```bash
|
||||
docker run atlantisnorth/atlantis:latest server <required options>
|
||||
docker run runatlantis/atlantis:latest server <required options>
|
||||
```
|
||||
|
||||
#### Usage
|
||||
@@ -338,7 +338,7 @@ vim Dockerfile-custom
|
||||
```
|
||||
|
||||
```dockerfile
|
||||
FROM atlantisnorth/atlantis
|
||||
FROM runatlantis/atlantis
|
||||
|
||||
# copy a terraform binary of the version you need
|
||||
COPY terraform /usr/local/bin/terraform
|
||||
@@ -361,7 +361,7 @@ docker run {YOUR_DOCKER_ORG}/atlantis-custom server --gh-user=GITHUB_USERNAME --
|
||||
|
||||
If you'd like to test out Atlantis before running it on your own repositories you can fork our example repo.
|
||||
|
||||
- Fork https://github.com/atlantisnorth/atlantis-example
|
||||
- Fork https://github.com/runatlantis/atlantis-example
|
||||
- If you didn't add the Webhook as to your organization add Atlantis as a Webhook to the forked repo (see [Add GitHub Webhook](#add-github-webhook))
|
||||
- Now that Atlantis can receive events you should be able to comment on a pull request to trigger Atlantis. Create a pull request
|
||||
- Click **Branches** on your forked repo's homepage
|
||||
@@ -487,7 +487,7 @@ See `atlantis server --help` for more information.
|
||||
|
||||
|
||||
## Contributing
|
||||
Want to contribute? Check out [CONTRIBUTING](https://github.com/atlantisnorth/atlantis/blob/master/CONTRIBUTING.md).
|
||||
Want to contribute? Check out [CONTRIBUTING](https://github.com/runatlantis/atlantis/blob/master/CONTRIBUTING.md).
|
||||
|
||||
Thank you to these awesome contributors!
|
||||
- [@nicholas-wu-hs](https://github.com/nicholas-wu-hs)
|
||||
|
||||
@@ -19,7 +19,7 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
var terraformExampleRepoOwner = "atlantisnorth"
|
||||
var terraformExampleRepoOwner = "runatlantis"
|
||||
var terraformExampleRepo = "atlantis-example"
|
||||
var bootstrapDescription = `[white]Welcome to Atlantis bootstrap!
|
||||
|
||||
@@ -35,7 +35,7 @@ var pullRequestBody = "In this pull request we will learn how to use atlantis. T
|
||||
"* Start by typing `atlantis help` in the comments.\n" +
|
||||
"* Next, lets plan by typing `atlantis plan` in the comments. That will run a `terraform plan`.\n" +
|
||||
"* Now lets apply that plan. Type `atlantis apply` in the comments. This will run a `terraform apply`.\n" +
|
||||
"\nThank you for trying out atlantis. For more info on running atlantis in production see https://github.com/atlantisnorth/atlantis"
|
||||
"\nThank you for trying out atlantis. For more info on running atlantis in production see https://github.com/runatlantis/atlantis"
|
||||
|
||||
// Start begins the bootstrap process.
|
||||
// nolint: errcheck
|
||||
@@ -195,6 +195,6 @@ Follow these instructions to create a token (we don't store any tokens):
|
||||
signal.Notify(signalChan, syscall.SIGINT, syscall.SIGTERM)
|
||||
<-signalChan
|
||||
colorstring.Println("\n[red]shutdown signal received, exiting....")
|
||||
colorstring.Println("\n[green]Thank you for using atlantis :) \n[white]For more information about how to use atlantis in production go to: https://github.com/atlantisnorth/atlantis")
|
||||
colorstring.Println("\n[green]Thank you for using atlantis :) \n[white]For more information about how to use atlantis in production go to: https://github.com/runatlantis/atlantis")
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/atlantisnorth/atlantis/bootstrap"
|
||||
"github.com/runatlantis/atlantis/bootstrap"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@ import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/atlantisnorth/atlantis/server"
|
||||
"github.com/mitchellh/go-homedir"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/runatlantis/atlantis/server"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
@@ -6,10 +6,10 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/atlantisnorth/atlantis/cmd"
|
||||
"github.com/atlantisnorth/atlantis/server"
|
||||
. "github.com/atlantisnorth/atlantis/testing"
|
||||
"github.com/mitchellh/go-homedir"
|
||||
"github.com/runatlantis/atlantis/cmd"
|
||||
"github.com/runatlantis/atlantis/server"
|
||||
. "github.com/runatlantis/atlantis/testing"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
@@ -42,7 +42,7 @@ func main() {
|
||||
atlantisURL = fmt.Sprintf("%s/events", atlantisURL)
|
||||
ownerName := os.Getenv("GITHUB_REPO_OWNER_NAME")
|
||||
if ownerName == "" {
|
||||
ownerName = "atlantisnorth"
|
||||
ownerName = "runatlantis"
|
||||
}
|
||||
repoName := os.Getenv("GITHUB_REPO_NAME")
|
||||
if repoName == "" {
|
||||
|
||||
2
main.go
2
main.go
@@ -2,7 +2,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/atlantisnorth/atlantis/cmd"
|
||||
"github.com/runatlantis/atlantis/cmd"
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
# with multiple packages, see https://code.google.com/p/go/issues/detail?id=6909
|
||||
#
|
||||
# Usage: coverage.sh packages...
|
||||
# Example: coverage.sh github.com/atlantisnorth/atlantis github.com/atlantisnorth/atlantis/bootstrap
|
||||
# Example: coverage.sh github.com/runatlantis/atlantis github.com/runatlantis/atlantis/bootstrap
|
||||
#
|
||||
|
||||
set -e
|
||||
|
||||
@@ -5,12 +5,12 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/atlantisnorth/atlantis/server/events/models"
|
||||
"github.com/atlantisnorth/atlantis/server/events/run"
|
||||
"github.com/atlantisnorth/atlantis/server/events/terraform"
|
||||
"github.com/atlantisnorth/atlantis/server/events/vcs"
|
||||
"github.com/atlantisnorth/atlantis/server/events/webhooks"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/runatlantis/atlantis/server/events/models"
|
||||
"github.com/runatlantis/atlantis/server/events/run"
|
||||
"github.com/runatlantis/atlantis/server/events/terraform"
|
||||
"github.com/runatlantis/atlantis/server/events/vcs"
|
||||
"github.com/runatlantis/atlantis/server/events/webhooks"
|
||||
)
|
||||
|
||||
// ApplyExecutor handles executing terraform apply.
|
||||
|
||||
@@ -6,9 +6,9 @@ import (
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
|
||||
"github.com/atlantisnorth/atlantis/server/events/models"
|
||||
"github.com/atlantisnorth/atlantis/server/logging"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/runatlantis/atlantis/server/events/models"
|
||||
"github.com/runatlantis/atlantis/server/logging"
|
||||
)
|
||||
|
||||
const workspacePrefix = "repos"
|
||||
|
||||
@@ -3,8 +3,8 @@ package events_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/atlantisnorth/atlantis/server/events"
|
||||
. "github.com/atlantisnorth/atlantis/testing"
|
||||
"github.com/runatlantis/atlantis/server/events"
|
||||
. "github.com/runatlantis/atlantis/testing"
|
||||
)
|
||||
|
||||
var repo = "repo/owner"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package events
|
||||
|
||||
import (
|
||||
"github.com/atlantisnorth/atlantis/server/events/models"
|
||||
"github.com/atlantisnorth/atlantis/server/events/vcs"
|
||||
"github.com/atlantisnorth/atlantis/server/logging"
|
||||
"github.com/runatlantis/atlantis/server/events/models"
|
||||
"github.com/runatlantis/atlantis/server/events/vcs"
|
||||
"github.com/runatlantis/atlantis/server/logging"
|
||||
)
|
||||
|
||||
// CommandContext represents the context of a command that came from a comment
|
||||
|
||||
@@ -3,13 +3,13 @@ package events
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/atlantisnorth/atlantis/server/events/models"
|
||||
"github.com/atlantisnorth/atlantis/server/events/vcs"
|
||||
"github.com/atlantisnorth/atlantis/server/logging"
|
||||
"github.com/atlantisnorth/atlantis/server/recovery"
|
||||
"github.com/google/go-github/github"
|
||||
"github.com/lkysow/go-gitlab"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/runatlantis/atlantis/server/events/models"
|
||||
"github.com/runatlantis/atlantis/server/events/vcs"
|
||||
"github.com/runatlantis/atlantis/server/logging"
|
||||
"github.com/runatlantis/atlantis/server/recovery"
|
||||
)
|
||||
|
||||
//go:generate pegomock generate -m --use-experimental-model-gen --package mocks -o mocks/mock_command_runner.go CommandRunner
|
||||
|
||||
@@ -7,17 +7,17 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/atlantisnorth/atlantis/server/events"
|
||||
"github.com/atlantisnorth/atlantis/server/events/mocks"
|
||||
"github.com/atlantisnorth/atlantis/server/events/mocks/matchers"
|
||||
"github.com/atlantisnorth/atlantis/server/events/models"
|
||||
"github.com/atlantisnorth/atlantis/server/events/models/fixtures"
|
||||
"github.com/atlantisnorth/atlantis/server/events/vcs"
|
||||
vcsmocks "github.com/atlantisnorth/atlantis/server/events/vcs/mocks"
|
||||
logmocks "github.com/atlantisnorth/atlantis/server/logging/mocks"
|
||||
. "github.com/atlantisnorth/atlantis/testing"
|
||||
"github.com/google/go-github/github"
|
||||
. "github.com/petergtz/pegomock"
|
||||
"github.com/runatlantis/atlantis/server/events"
|
||||
"github.com/runatlantis/atlantis/server/events/mocks"
|
||||
"github.com/runatlantis/atlantis/server/events/mocks/matchers"
|
||||
"github.com/runatlantis/atlantis/server/events/models"
|
||||
"github.com/runatlantis/atlantis/server/events/models/fixtures"
|
||||
"github.com/runatlantis/atlantis/server/events/vcs"
|
||||
vcsmocks "github.com/runatlantis/atlantis/server/events/vcs/mocks"
|
||||
logmocks "github.com/runatlantis/atlantis/server/logging/mocks"
|
||||
. "github.com/runatlantis/atlantis/testing"
|
||||
)
|
||||
|
||||
var applier *mocks.MockExecutor
|
||||
@@ -75,7 +75,7 @@ func TestExecuteCommand_NoGithubPullGetter(t *testing.T) {
|
||||
setup(t)
|
||||
ch.GithubPullGetter = nil
|
||||
ch.ExecuteCommand(fixtures.Repo, fixtures.Repo, fixtures.User, 1, nil, vcs.Github)
|
||||
Equals(t, "[ERROR] atlantisnorth/atlantis#1: Atlantis not configured to support GitHub\n", logBytes.String())
|
||||
Equals(t, "[ERROR] runatlantis/atlantis#1: Atlantis not configured to support GitHub\n", logBytes.String())
|
||||
}
|
||||
|
||||
func TestExecuteCommand_NoGitlabMergeGetter(t *testing.T) {
|
||||
@@ -83,7 +83,7 @@ func TestExecuteCommand_NoGitlabMergeGetter(t *testing.T) {
|
||||
setup(t)
|
||||
ch.GitlabMergeRequestGetter = nil
|
||||
ch.ExecuteCommand(fixtures.Repo, fixtures.Repo, fixtures.User, 1, nil, vcs.Gitlab)
|
||||
Equals(t, "[ERROR] atlantisnorth/atlantis#1: Atlantis not configured to support GitLab\n", logBytes.String())
|
||||
Equals(t, "[ERROR] runatlantis/atlantis#1: Atlantis not configured to support GitLab\n", logBytes.String())
|
||||
}
|
||||
|
||||
func TestExecuteCommand_GithubPullErr(t *testing.T) {
|
||||
@@ -91,7 +91,7 @@ func TestExecuteCommand_GithubPullErr(t *testing.T) {
|
||||
setup(t)
|
||||
When(githubGetter.GetPullRequest(fixtures.Repo, fixtures.Pull.Num)).ThenReturn(nil, errors.New("err"))
|
||||
ch.ExecuteCommand(fixtures.Repo, fixtures.Repo, fixtures.User, fixtures.Pull.Num, nil, vcs.Github)
|
||||
Equals(t, "[ERROR] atlantisnorth/atlantis#1: Making pull request API call to GitHub: err\n", logBytes.String())
|
||||
Equals(t, "[ERROR] runatlantis/atlantis#1: Making pull request API call to GitHub: err\n", logBytes.String())
|
||||
}
|
||||
|
||||
func TestExecuteCommand_GitlabMergeRequestErr(t *testing.T) {
|
||||
@@ -99,7 +99,7 @@ func TestExecuteCommand_GitlabMergeRequestErr(t *testing.T) {
|
||||
setup(t)
|
||||
When(gitlabGetter.GetMergeRequest(fixtures.Repo.FullName, fixtures.Pull.Num)).ThenReturn(nil, errors.New("err"))
|
||||
ch.ExecuteCommand(fixtures.Repo, fixtures.Repo, fixtures.User, fixtures.Pull.Num, nil, vcs.Gitlab)
|
||||
Equals(t, "[ERROR] atlantisnorth/atlantis#1: Making merge request API call to GitLab: err\n", logBytes.String())
|
||||
Equals(t, "[ERROR] runatlantis/atlantis#1: Making merge request API call to GitLab: err\n", logBytes.String())
|
||||
}
|
||||
|
||||
func TestExecuteCommand_GithubPullParseErr(t *testing.T) {
|
||||
@@ -110,7 +110,7 @@ func TestExecuteCommand_GithubPullParseErr(t *testing.T) {
|
||||
When(eventParsing.ParseGithubPull(&pull)).ThenReturn(fixtures.Pull, fixtures.Repo, errors.New("err"))
|
||||
|
||||
ch.ExecuteCommand(fixtures.Repo, fixtures.Repo, fixtures.User, fixtures.Pull.Num, nil, vcs.Github)
|
||||
Equals(t, "[ERROR] atlantisnorth/atlantis#1: Extracting required fields from comment data: err\n", logBytes.String())
|
||||
Equals(t, "[ERROR] runatlantis/atlantis#1: Extracting required fields from comment data: err\n", logBytes.String())
|
||||
}
|
||||
|
||||
func TestExecuteCommand_ClosedPull(t *testing.T) {
|
||||
|
||||
@@ -4,8 +4,8 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/atlantisnorth/atlantis/server/events/models"
|
||||
"github.com/atlantisnorth/atlantis/server/events/vcs"
|
||||
"github.com/runatlantis/atlantis/server/events/models"
|
||||
"github.com/runatlantis/atlantis/server/events/vcs"
|
||||
)
|
||||
|
||||
//go:generate pegomock generate -m --use-experimental-model-gen --package mocks -o mocks/mock_commit_status_updater.go CommitStatusUpdater
|
||||
|
||||
@@ -5,12 +5,12 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/atlantisnorth/atlantis/server/events"
|
||||
"github.com/atlantisnorth/atlantis/server/events/models"
|
||||
"github.com/atlantisnorth/atlantis/server/events/vcs"
|
||||
"github.com/atlantisnorth/atlantis/server/events/vcs/mocks"
|
||||
. "github.com/atlantisnorth/atlantis/testing"
|
||||
. "github.com/petergtz/pegomock"
|
||||
"github.com/runatlantis/atlantis/server/events"
|
||||
"github.com/runatlantis/atlantis/server/events/models"
|
||||
"github.com/runatlantis/atlantis/server/events/vcs"
|
||||
"github.com/runatlantis/atlantis/server/events/vcs/mocks"
|
||||
. "github.com/runatlantis/atlantis/testing"
|
||||
)
|
||||
|
||||
var repoModel = models.Repo{}
|
||||
|
||||
@@ -5,10 +5,10 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/atlantisnorth/atlantis/server/events/models"
|
||||
"github.com/atlantisnorth/atlantis/server/events/vcs"
|
||||
"github.com/google/go-github/github"
|
||||
"github.com/lkysow/go-gitlab"
|
||||
"github.com/runatlantis/atlantis/server/events/models"
|
||||
"github.com/runatlantis/atlantis/server/events/vcs"
|
||||
)
|
||||
|
||||
const gitlabPullOpened = "opened"
|
||||
|
||||
@@ -8,14 +8,14 @@ import (
|
||||
|
||||
"encoding/json"
|
||||
|
||||
"github.com/atlantisnorth/atlantis/server/events"
|
||||
"github.com/atlantisnorth/atlantis/server/events/models"
|
||||
"github.com/atlantisnorth/atlantis/server/events/vcs"
|
||||
. "github.com/atlantisnorth/atlantis/server/events/vcs/fixtures"
|
||||
. "github.com/atlantisnorth/atlantis/testing"
|
||||
"github.com/google/go-github/github"
|
||||
"github.com/lkysow/go-gitlab"
|
||||
"github.com/mohae/deepcopy"
|
||||
"github.com/runatlantis/atlantis/server/events"
|
||||
"github.com/runatlantis/atlantis/server/events/models"
|
||||
"github.com/runatlantis/atlantis/server/events/vcs"
|
||||
. "github.com/runatlantis/atlantis/server/events/vcs/fixtures"
|
||||
. "github.com/runatlantis/atlantis/testing"
|
||||
)
|
||||
|
||||
var parser = events.EventParser{
|
||||
@@ -165,7 +165,7 @@ func TestParseGithubIssueCommentEvent(t *testing.T) {
|
||||
Issue: &github.Issue{
|
||||
Number: github.Int(1),
|
||||
User: &github.User{Login: github.String("issue_user")},
|
||||
HTMLURL: github.String("https://github.com/atlantisnorth/atlantis/issues/1"),
|
||||
HTMLURL: github.String("https://github.com/runatlantis/atlantis/issues/1"),
|
||||
},
|
||||
Comment: &github.IssueComment{
|
||||
User: &github.User{Login: github.String("comment_user")},
|
||||
|
||||
@@ -3,8 +3,8 @@ package events_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/atlantisnorth/atlantis/server/events"
|
||||
. "github.com/atlantisnorth/atlantis/testing"
|
||||
"github.com/runatlantis/atlantis/server/events"
|
||||
. "github.com/runatlantis/atlantis/testing"
|
||||
)
|
||||
|
||||
func TestExecute(t *testing.T) {
|
||||
|
||||
@@ -11,9 +11,9 @@ import (
|
||||
"path"
|
||||
"time"
|
||||
|
||||
"github.com/atlantisnorth/atlantis/server/events/models"
|
||||
"github.com/boltdb/bolt"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/runatlantis/atlantis/server/events/models"
|
||||
)
|
||||
|
||||
// BoltLocker is a locking backend using BoltDB
|
||||
|
||||
@@ -6,11 +6,11 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/atlantisnorth/atlantis/server/events/locking/boltdb"
|
||||
"github.com/atlantisnorth/atlantis/server/events/models"
|
||||
. "github.com/atlantisnorth/atlantis/testing"
|
||||
"github.com/boltdb/bolt"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/runatlantis/atlantis/server/events/locking/boltdb"
|
||||
"github.com/runatlantis/atlantis/server/events/models"
|
||||
. "github.com/runatlantis/atlantis/testing"
|
||||
)
|
||||
|
||||
var lockBucket = "bucket"
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"regexp"
|
||||
"time"
|
||||
|
||||
"github.com/atlantisnorth/atlantis/server/events/models"
|
||||
"github.com/runatlantis/atlantis/server/events/models"
|
||||
)
|
||||
|
||||
//go:generate pegomock generate -m --use-experimental-model-gen --package mocks -o mocks/mock_backend.go Backend
|
||||
|
||||
@@ -7,12 +7,12 @@ import (
|
||||
|
||||
"strings"
|
||||
|
||||
"github.com/atlantisnorth/atlantis/server/events/locking"
|
||||
"github.com/atlantisnorth/atlantis/server/events/locking/mocks"
|
||||
"github.com/atlantisnorth/atlantis/server/events/locking/mocks/matchers"
|
||||
"github.com/atlantisnorth/atlantis/server/events/models"
|
||||
. "github.com/atlantisnorth/atlantis/testing"
|
||||
. "github.com/petergtz/pegomock"
|
||||
"github.com/runatlantis/atlantis/server/events/locking"
|
||||
"github.com/runatlantis/atlantis/server/events/locking/mocks"
|
||||
"github.com/runatlantis/atlantis/server/events/locking/mocks/matchers"
|
||||
"github.com/runatlantis/atlantis/server/events/models"
|
||||
. "github.com/runatlantis/atlantis/testing"
|
||||
)
|
||||
|
||||
var project = models.NewProject("owner/repo", "path")
|
||||
|
||||
@@ -3,8 +3,8 @@ package matchers
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
locking "github.com/atlantisnorth/atlantis/server/events/locking"
|
||||
"github.com/petergtz/pegomock"
|
||||
locking "github.com/runatlantis/atlantis/server/events/locking"
|
||||
)
|
||||
|
||||
func AnyLockingTryLockResponse() locking.TryLockResponse {
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
|
||||
"github.com/petergtz/pegomock"
|
||||
|
||||
models "github.com/atlantisnorth/atlantis/server/events/models"
|
||||
models "github.com/runatlantis/atlantis/server/events/models"
|
||||
)
|
||||
|
||||
func AnyMapOfStringToModelsProjectLock() map[string]models.ProjectLock {
|
||||
|
||||
@@ -3,8 +3,8 @@ package matchers
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
models "github.com/atlantisnorth/atlantis/server/events/models"
|
||||
"github.com/petergtz/pegomock"
|
||||
models "github.com/runatlantis/atlantis/server/events/models"
|
||||
)
|
||||
|
||||
func AnyModelsProject() models.Project {
|
||||
|
||||
@@ -3,8 +3,8 @@ package matchers
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
models "github.com/atlantisnorth/atlantis/server/events/models"
|
||||
"github.com/petergtz/pegomock"
|
||||
models "github.com/runatlantis/atlantis/server/events/models"
|
||||
)
|
||||
|
||||
func AnyModelsProjectLock() models.ProjectLock {
|
||||
|
||||
@@ -3,8 +3,8 @@ package matchers
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
models "github.com/atlantisnorth/atlantis/server/events/models"
|
||||
"github.com/petergtz/pegomock"
|
||||
models "github.com/runatlantis/atlantis/server/events/models"
|
||||
)
|
||||
|
||||
func AnyModelsPullRequest() models.PullRequest {
|
||||
|
||||
@@ -3,8 +3,8 @@ package matchers
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
models "github.com/atlantisnorth/atlantis/server/events/models"
|
||||
"github.com/petergtz/pegomock"
|
||||
models "github.com/runatlantis/atlantis/server/events/models"
|
||||
)
|
||||
|
||||
func AnyModelsUser() models.User {
|
||||
|
||||
@@ -3,8 +3,8 @@ package matchers
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
models "github.com/atlantisnorth/atlantis/server/events/models"
|
||||
"github.com/petergtz/pegomock"
|
||||
models "github.com/runatlantis/atlantis/server/events/models"
|
||||
)
|
||||
|
||||
func AnyPtrToModelsProjectLock() *models.ProjectLock {
|
||||
|
||||
@@ -3,8 +3,8 @@ package matchers
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
models "github.com/atlantisnorth/atlantis/server/events/models"
|
||||
"github.com/petergtz/pegomock"
|
||||
models "github.com/runatlantis/atlantis/server/events/models"
|
||||
)
|
||||
|
||||
func AnySliceOfModelsProjectLock() []models.ProjectLock {
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
// Automatically generated by pegomock. DO NOT EDIT!
|
||||
// Source: github.com/atlantisnorth/atlantis/server/events/locking (interfaces: Backend)
|
||||
// Source: github.com/runatlantis/atlantis/server/events/locking (interfaces: Backend)
|
||||
|
||||
package mocks
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
models "github.com/atlantisnorth/atlantis/server/events/models"
|
||||
pegomock "github.com/petergtz/pegomock"
|
||||
models "github.com/runatlantis/atlantis/server/events/models"
|
||||
)
|
||||
|
||||
type MockBackend struct {
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
// Automatically generated by pegomock. DO NOT EDIT!
|
||||
// Source: github.com/atlantisnorth/atlantis/server/events/locking (interfaces: Locker)
|
||||
// Source: github.com/runatlantis/atlantis/server/events/locking (interfaces: Locker)
|
||||
|
||||
package mocks
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
locking "github.com/atlantisnorth/atlantis/server/events/locking"
|
||||
models "github.com/atlantisnorth/atlantis/server/events/models"
|
||||
pegomock "github.com/petergtz/pegomock"
|
||||
locking "github.com/runatlantis/atlantis/server/events/locking"
|
||||
models "github.com/runatlantis/atlantis/server/events/models"
|
||||
)
|
||||
|
||||
type MockLocker struct {
|
||||
|
||||
@@ -4,8 +4,8 @@ import (
|
||||
"errors"
|
||||
"testing"
|
||||
|
||||
"github.com/atlantisnorth/atlantis/server/events"
|
||||
. "github.com/atlantisnorth/atlantis/testing"
|
||||
"github.com/runatlantis/atlantis/server/events"
|
||||
. "github.com/runatlantis/atlantis/testing"
|
||||
)
|
||||
|
||||
func TestRenderErr(t *testing.T) {
|
||||
|
||||
@@ -3,8 +3,8 @@ package matchers
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
events "github.com/atlantisnorth/atlantis/server/events"
|
||||
"github.com/petergtz/pegomock"
|
||||
events "github.com/runatlantis/atlantis/server/events"
|
||||
)
|
||||
|
||||
func AnyEventsCommandResponse() events.CommandResponse {
|
||||
|
||||
@@ -3,8 +3,8 @@ package matchers
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
events "github.com/atlantisnorth/atlantis/server/events"
|
||||
"github.com/petergtz/pegomock"
|
||||
events "github.com/runatlantis/atlantis/server/events"
|
||||
)
|
||||
|
||||
func AnyEventsPreExecuteResult() events.PreExecuteResult {
|
||||
|
||||
@@ -3,8 +3,8 @@ package matchers
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
events "github.com/atlantisnorth/atlantis/server/events"
|
||||
"github.com/petergtz/pegomock"
|
||||
events "github.com/runatlantis/atlantis/server/events"
|
||||
)
|
||||
|
||||
func AnyEventsProjectConfig() events.ProjectConfig {
|
||||
|
||||
@@ -3,8 +3,8 @@ package matchers
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
models "github.com/atlantisnorth/atlantis/server/events/models"
|
||||
"github.com/petergtz/pegomock"
|
||||
models "github.com/runatlantis/atlantis/server/events/models"
|
||||
)
|
||||
|
||||
func AnyModelsProject() models.Project {
|
||||
|
||||
@@ -3,8 +3,8 @@ package matchers
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
models "github.com/atlantisnorth/atlantis/server/events/models"
|
||||
"github.com/petergtz/pegomock"
|
||||
models "github.com/runatlantis/atlantis/server/events/models"
|
||||
)
|
||||
|
||||
func AnyModelsPullRequest() models.PullRequest {
|
||||
|
||||
@@ -3,8 +3,8 @@ package matchers
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
models "github.com/atlantisnorth/atlantis/server/events/models"
|
||||
"github.com/petergtz/pegomock"
|
||||
models "github.com/runatlantis/atlantis/server/events/models"
|
||||
)
|
||||
|
||||
func AnyModelsRepo() models.Repo {
|
||||
|
||||
@@ -3,8 +3,8 @@ package matchers
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
models "github.com/atlantisnorth/atlantis/server/events/models"
|
||||
"github.com/petergtz/pegomock"
|
||||
models "github.com/runatlantis/atlantis/server/events/models"
|
||||
)
|
||||
|
||||
func AnyModelsUser() models.User {
|
||||
|
||||
@@ -3,8 +3,8 @@ package matchers
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
events "github.com/atlantisnorth/atlantis/server/events"
|
||||
"github.com/petergtz/pegomock"
|
||||
events "github.com/runatlantis/atlantis/server/events"
|
||||
)
|
||||
|
||||
func AnyPtrToEventsCommand() *events.Command {
|
||||
|
||||
@@ -3,8 +3,8 @@ package matchers
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
events "github.com/atlantisnorth/atlantis/server/events"
|
||||
"github.com/petergtz/pegomock"
|
||||
events "github.com/runatlantis/atlantis/server/events"
|
||||
)
|
||||
|
||||
func AnyPtrToEventsCommandContext() *events.CommandContext {
|
||||
|
||||
@@ -3,8 +3,8 @@ package matchers
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
logging "github.com/atlantisnorth/atlantis/server/logging"
|
||||
"github.com/petergtz/pegomock"
|
||||
logging "github.com/runatlantis/atlantis/server/logging"
|
||||
)
|
||||
|
||||
func AnyPtrToLoggingSimpleLogger() *logging.SimpleLogger {
|
||||
|
||||
@@ -3,8 +3,8 @@ package matchers
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
models "github.com/atlantisnorth/atlantis/server/events/models"
|
||||
"github.com/petergtz/pegomock"
|
||||
models "github.com/runatlantis/atlantis/server/events/models"
|
||||
)
|
||||
|
||||
func AnySliceOfModelsProject() []models.Project {
|
||||
|
||||
@@ -3,8 +3,8 @@ package matchers
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
vcs "github.com/atlantisnorth/atlantis/server/events/vcs"
|
||||
"github.com/petergtz/pegomock"
|
||||
vcs "github.com/runatlantis/atlantis/server/events/vcs"
|
||||
)
|
||||
|
||||
func AnyVcsCommitStatus() vcs.CommitStatus {
|
||||
|
||||
@@ -3,8 +3,8 @@ package matchers
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
vcs "github.com/atlantisnorth/atlantis/server/events/vcs"
|
||||
"github.com/petergtz/pegomock"
|
||||
vcs "github.com/runatlantis/atlantis/server/events/vcs"
|
||||
)
|
||||
|
||||
func AnyVcsHost() vcs.Host {
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
// Automatically generated by pegomock. DO NOT EDIT!
|
||||
// Source: github.com/atlantisnorth/atlantis/server/events (interfaces: AtlantisWorkspace)
|
||||
// Source: github.com/runatlantis/atlantis/server/events (interfaces: AtlantisWorkspace)
|
||||
|
||||
package mocks
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
models "github.com/atlantisnorth/atlantis/server/events/models"
|
||||
logging "github.com/atlantisnorth/atlantis/server/logging"
|
||||
pegomock "github.com/petergtz/pegomock"
|
||||
models "github.com/runatlantis/atlantis/server/events/models"
|
||||
logging "github.com/runatlantis/atlantis/server/logging"
|
||||
)
|
||||
|
||||
type MockAtlantisWorkspace struct {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Automatically generated by pegomock. DO NOT EDIT!
|
||||
// Source: github.com/atlantisnorth/atlantis/server/events (interfaces: AtlantisWorkspaceLocker)
|
||||
// Source: github.com/runatlantis/atlantis/server/events (interfaces: AtlantisWorkspaceLocker)
|
||||
|
||||
package mocks
|
||||
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
// Automatically generated by pegomock. DO NOT EDIT!
|
||||
// Source: github.com/atlantisnorth/atlantis/server/events (interfaces: CommandRunner)
|
||||
// Source: github.com/runatlantis/atlantis/server/events (interfaces: CommandRunner)
|
||||
|
||||
package mocks
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
events "github.com/atlantisnorth/atlantis/server/events"
|
||||
models "github.com/atlantisnorth/atlantis/server/events/models"
|
||||
vcs "github.com/atlantisnorth/atlantis/server/events/vcs"
|
||||
pegomock "github.com/petergtz/pegomock"
|
||||
events "github.com/runatlantis/atlantis/server/events"
|
||||
models "github.com/runatlantis/atlantis/server/events/models"
|
||||
vcs "github.com/runatlantis/atlantis/server/events/vcs"
|
||||
)
|
||||
|
||||
type MockCommandRunner struct {
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
// Automatically generated by pegomock. DO NOT EDIT!
|
||||
// Source: github.com/atlantisnorth/atlantis/server/events (interfaces: CommitStatusUpdater)
|
||||
// Source: github.com/runatlantis/atlantis/server/events (interfaces: CommitStatusUpdater)
|
||||
|
||||
package mocks
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
events "github.com/atlantisnorth/atlantis/server/events"
|
||||
models "github.com/atlantisnorth/atlantis/server/events/models"
|
||||
vcs "github.com/atlantisnorth/atlantis/server/events/vcs"
|
||||
pegomock "github.com/petergtz/pegomock"
|
||||
events "github.com/runatlantis/atlantis/server/events"
|
||||
models "github.com/runatlantis/atlantis/server/events/models"
|
||||
vcs "github.com/runatlantis/atlantis/server/events/vcs"
|
||||
)
|
||||
|
||||
type MockCommitStatusUpdater struct {
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
// Automatically generated by pegomock. DO NOT EDIT!
|
||||
// Source: github.com/atlantisnorth/atlantis/server/events (interfaces: EventParsing)
|
||||
// Source: github.com/runatlantis/atlantis/server/events (interfaces: EventParsing)
|
||||
|
||||
package mocks
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
events "github.com/atlantisnorth/atlantis/server/events"
|
||||
models "github.com/atlantisnorth/atlantis/server/events/models"
|
||||
vcs "github.com/atlantisnorth/atlantis/server/events/vcs"
|
||||
github "github.com/google/go-github/github"
|
||||
go_gitlab "github.com/lkysow/go-gitlab"
|
||||
pegomock "github.com/petergtz/pegomock"
|
||||
events "github.com/runatlantis/atlantis/server/events"
|
||||
models "github.com/runatlantis/atlantis/server/events/models"
|
||||
vcs "github.com/runatlantis/atlantis/server/events/vcs"
|
||||
)
|
||||
|
||||
type MockEventParsing struct {
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
// Automatically generated by pegomock. DO NOT EDIT!
|
||||
// Source: github.com/atlantisnorth/atlantis/server/events (interfaces: Executor)
|
||||
// Source: github.com/runatlantis/atlantis/server/events (interfaces: Executor)
|
||||
|
||||
package mocks
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
events "github.com/atlantisnorth/atlantis/server/events"
|
||||
pegomock "github.com/petergtz/pegomock"
|
||||
events "github.com/runatlantis/atlantis/server/events"
|
||||
)
|
||||
|
||||
type MockExecutor struct {
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
// Automatically generated by pegomock. DO NOT EDIT!
|
||||
// Source: github.com/atlantisnorth/atlantis/server/events (interfaces: GithubPullGetter)
|
||||
// Source: github.com/runatlantis/atlantis/server/events (interfaces: GithubPullGetter)
|
||||
|
||||
package mocks
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
models "github.com/atlantisnorth/atlantis/server/events/models"
|
||||
github "github.com/google/go-github/github"
|
||||
pegomock "github.com/petergtz/pegomock"
|
||||
models "github.com/runatlantis/atlantis/server/events/models"
|
||||
)
|
||||
|
||||
type MockGithubPullGetter struct {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Automatically generated by pegomock. DO NOT EDIT!
|
||||
// Source: github.com/atlantisnorth/atlantis/server/events (interfaces: GitlabMergeRequestGetter)
|
||||
// Source: github.com/runatlantis/atlantis/server/events (interfaces: GitlabMergeRequestGetter)
|
||||
|
||||
package mocks
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Automatically generated by pegomock. DO NOT EDIT!
|
||||
// Source: github.com/atlantisnorth/atlantis/server/events (interfaces: LockURLGenerator)
|
||||
// Source: github.com/runatlantis/atlantis/server/events (interfaces: LockURLGenerator)
|
||||
|
||||
package mocks
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
// Automatically generated by pegomock. DO NOT EDIT!
|
||||
// Source: github.com/atlantisnorth/atlantis/server/events (interfaces: ProjectConfigReader)
|
||||
// Source: github.com/runatlantis/atlantis/server/events (interfaces: ProjectConfigReader)
|
||||
|
||||
package mocks
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
events "github.com/atlantisnorth/atlantis/server/events"
|
||||
pegomock "github.com/petergtz/pegomock"
|
||||
events "github.com/runatlantis/atlantis/server/events"
|
||||
)
|
||||
|
||||
type MockProjectConfigReader struct {
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
// Automatically generated by pegomock. DO NOT EDIT!
|
||||
// Source: github.com/atlantisnorth/atlantis/server/events (interfaces: ProjectFinder)
|
||||
// Source: github.com/runatlantis/atlantis/server/events (interfaces: ProjectFinder)
|
||||
|
||||
package mocks
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
models "github.com/atlantisnorth/atlantis/server/events/models"
|
||||
logging "github.com/atlantisnorth/atlantis/server/logging"
|
||||
pegomock "github.com/petergtz/pegomock"
|
||||
models "github.com/runatlantis/atlantis/server/events/models"
|
||||
logging "github.com/runatlantis/atlantis/server/logging"
|
||||
)
|
||||
|
||||
type MockProjectFinder struct {
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
// Automatically generated by pegomock. DO NOT EDIT!
|
||||
// Source: github.com/atlantisnorth/atlantis/server/events (interfaces: ProjectPreExecutor)
|
||||
// Source: github.com/runatlantis/atlantis/server/events (interfaces: ProjectPreExecutor)
|
||||
|
||||
package mocks
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
events "github.com/atlantisnorth/atlantis/server/events"
|
||||
models "github.com/atlantisnorth/atlantis/server/events/models"
|
||||
pegomock "github.com/petergtz/pegomock"
|
||||
events "github.com/runatlantis/atlantis/server/events"
|
||||
models "github.com/runatlantis/atlantis/server/events/models"
|
||||
)
|
||||
|
||||
type MockProjectPreExecutor struct {
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
// Automatically generated by pegomock. DO NOT EDIT!
|
||||
// Source: github.com/atlantisnorth/atlantis/server/events (interfaces: PullCleaner)
|
||||
// Source: github.com/runatlantis/atlantis/server/events (interfaces: PullCleaner)
|
||||
|
||||
package mocks
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
models "github.com/atlantisnorth/atlantis/server/events/models"
|
||||
vcs "github.com/atlantisnorth/atlantis/server/events/vcs"
|
||||
pegomock "github.com/petergtz/pegomock"
|
||||
models "github.com/runatlantis/atlantis/server/events/models"
|
||||
vcs "github.com/runatlantis/atlantis/server/events/vcs"
|
||||
)
|
||||
|
||||
type MockPullCleaner struct {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package fixtures
|
||||
|
||||
import "github.com/atlantisnorth/atlantis/server/events/models"
|
||||
import "github.com/runatlantis/atlantis/server/events/models"
|
||||
|
||||
var Pull = models.PullRequest{
|
||||
Num: 1,
|
||||
@@ -11,10 +11,10 @@ var Pull = models.PullRequest{
|
||||
}
|
||||
|
||||
var Repo = models.Repo{
|
||||
CloneURL: "https://user:password@github.com/atlantisnorth/atlantis.git",
|
||||
FullName: "atlantisnorth/atlantis",
|
||||
Owner: "atlantisnorth",
|
||||
SanitizedCloneURL: "https://github.com/atlantisnorth/atlantis.git",
|
||||
CloneURL: "https://user:password@github.com/runatlantis/atlantis.git",
|
||||
FullName: "runatlantis/atlantis",
|
||||
Owner: "runatlantis",
|
||||
SanitizedCloneURL: "https://github.com/runatlantis/atlantis.git",
|
||||
Name: "atlantis",
|
||||
}
|
||||
|
||||
|
||||
@@ -11,9 +11,9 @@ import (
|
||||
// Repo is a VCS repository.
|
||||
type Repo struct {
|
||||
// FullName is the owner and repo name separated
|
||||
// by a "/", ex. "atlantisnorth/atlantis".
|
||||
// by a "/", ex. "runatlantis/atlantis".
|
||||
FullName string
|
||||
// Owner is just the repo owner, ex. "atlantisnorth".
|
||||
// Owner is just the repo owner, ex. "runatlantis".
|
||||
Owner string
|
||||
// Name is just the repo name, ex. "atlantis".
|
||||
Name string
|
||||
@@ -34,7 +34,7 @@ type PullRequest struct {
|
||||
// pull requested into the base.
|
||||
HeadCommit string
|
||||
// URL is the url of the pull request.
|
||||
// ex. "https://github.com/atlantisnorth/atlantis/pull/1"
|
||||
// ex. "https://github.com/runatlantis/atlantis/pull/1"
|
||||
URL string
|
||||
// Branch is the name of the head branch (not the base).
|
||||
Branch string
|
||||
@@ -79,7 +79,7 @@ type ProjectLock struct {
|
||||
// Terraform projects in a single repo we also include Path to the project
|
||||
// root relative to the repo root.
|
||||
type Project struct {
|
||||
// RepoFullName is the owner and repo name, ex. "atlantisnorth/atlantis"
|
||||
// RepoFullName is the owner and repo name, ex. "runatlantis/atlantis"
|
||||
RepoFullName string
|
||||
// Path to project root in the repo.
|
||||
// If "." then project is at root.
|
||||
|
||||
@@ -5,12 +5,12 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/atlantisnorth/atlantis/server/events/locking"
|
||||
"github.com/atlantisnorth/atlantis/server/events/models"
|
||||
"github.com/atlantisnorth/atlantis/server/events/run"
|
||||
"github.com/atlantisnorth/atlantis/server/events/terraform"
|
||||
"github.com/atlantisnorth/atlantis/server/events/vcs"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/runatlantis/atlantis/server/events/locking"
|
||||
"github.com/runatlantis/atlantis/server/events/models"
|
||||
"github.com/runatlantis/atlantis/server/events/run"
|
||||
"github.com/runatlantis/atlantis/server/events/terraform"
|
||||
"github.com/runatlantis/atlantis/server/events/vcs"
|
||||
)
|
||||
|
||||
//go:generate pegomock generate -m --use-experimental-model-gen --package mocks -o mocks/mock_lock_url_generator.go LockURLGenerator
|
||||
|
||||
@@ -4,18 +4,18 @@ import (
|
||||
"errors"
|
||||
"testing"
|
||||
|
||||
"github.com/atlantisnorth/atlantis/server/events"
|
||||
"github.com/atlantisnorth/atlantis/server/events/locking"
|
||||
lmocks "github.com/atlantisnorth/atlantis/server/events/locking/mocks"
|
||||
"github.com/atlantisnorth/atlantis/server/events/mocks"
|
||||
"github.com/atlantisnorth/atlantis/server/events/models"
|
||||
rmocks "github.com/atlantisnorth/atlantis/server/events/run/mocks"
|
||||
tmocks "github.com/atlantisnorth/atlantis/server/events/terraform/mocks"
|
||||
vcsmocks "github.com/atlantisnorth/atlantis/server/events/vcs/mocks"
|
||||
"github.com/atlantisnorth/atlantis/server/events/vcs/mocks/matchers"
|
||||
"github.com/atlantisnorth/atlantis/server/logging"
|
||||
. "github.com/atlantisnorth/atlantis/testing"
|
||||
. "github.com/petergtz/pegomock"
|
||||
"github.com/runatlantis/atlantis/server/events"
|
||||
"github.com/runatlantis/atlantis/server/events/locking"
|
||||
lmocks "github.com/runatlantis/atlantis/server/events/locking/mocks"
|
||||
"github.com/runatlantis/atlantis/server/events/mocks"
|
||||
"github.com/runatlantis/atlantis/server/events/models"
|
||||
rmocks "github.com/runatlantis/atlantis/server/events/run/mocks"
|
||||
tmocks "github.com/runatlantis/atlantis/server/events/terraform/mocks"
|
||||
vcsmocks "github.com/runatlantis/atlantis/server/events/vcs/mocks"
|
||||
"github.com/runatlantis/atlantis/server/events/vcs/mocks/matchers"
|
||||
"github.com/runatlantis/atlantis/server/logging"
|
||||
. "github.com/runatlantis/atlantis/testing"
|
||||
)
|
||||
|
||||
var planCtx = events.CommandContext{
|
||||
|
||||
@@ -5,8 +5,8 @@ import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/atlantisnorth/atlantis/server/events"
|
||||
. "github.com/atlantisnorth/atlantis/testing"
|
||||
"github.com/runatlantis/atlantis/server/events"
|
||||
. "github.com/runatlantis/atlantis/testing"
|
||||
)
|
||||
|
||||
var tempConfigFile = "/tmp/" + events.ProjectConfigFile
|
||||
|
||||
@@ -4,8 +4,8 @@ import (
|
||||
"path"
|
||||
"strings"
|
||||
|
||||
"github.com/atlantisnorth/atlantis/server/events/models"
|
||||
"github.com/atlantisnorth/atlantis/server/logging"
|
||||
"github.com/runatlantis/atlantis/server/events/models"
|
||||
"github.com/runatlantis/atlantis/server/logging"
|
||||
)
|
||||
|
||||
//go:generate pegomock generate -m --use-experimental-model-gen --package mocks -o mocks/mock_project_finder.go ProjectFinder
|
||||
|
||||
@@ -3,9 +3,9 @@ package events_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/atlantisnorth/atlantis/server/events"
|
||||
"github.com/atlantisnorth/atlantis/server/logging"
|
||||
. "github.com/atlantisnorth/atlantis/testing"
|
||||
"github.com/runatlantis/atlantis/server/events"
|
||||
"github.com/runatlantis/atlantis/server/logging"
|
||||
. "github.com/runatlantis/atlantis/testing"
|
||||
)
|
||||
|
||||
var noopLogger = logging.NewNoopLogger()
|
||||
|
||||
@@ -5,12 +5,12 @@ import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/atlantisnorth/atlantis/server/events/locking"
|
||||
"github.com/atlantisnorth/atlantis/server/events/models"
|
||||
"github.com/atlantisnorth/atlantis/server/events/run"
|
||||
"github.com/atlantisnorth/atlantis/server/events/terraform"
|
||||
"github.com/hashicorp/go-version"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/runatlantis/atlantis/server/events/locking"
|
||||
"github.com/runatlantis/atlantis/server/events/models"
|
||||
"github.com/runatlantis/atlantis/server/events/run"
|
||||
"github.com/runatlantis/atlantis/server/events/terraform"
|
||||
)
|
||||
|
||||
//go:generate pegomock generate -m --use-experimental-model-gen --package mocks -o mocks/mock_project_pre_executor.go ProjectPreExecutor
|
||||
|
||||
@@ -4,18 +4,18 @@ import (
|
||||
"errors"
|
||||
"testing"
|
||||
|
||||
"github.com/atlantisnorth/atlantis/server/events"
|
||||
"github.com/atlantisnorth/atlantis/server/events/locking"
|
||||
lmocks "github.com/atlantisnorth/atlantis/server/events/locking/mocks"
|
||||
"github.com/atlantisnorth/atlantis/server/events/mocks"
|
||||
"github.com/atlantisnorth/atlantis/server/events/models"
|
||||
rmocks "github.com/atlantisnorth/atlantis/server/events/run/mocks"
|
||||
tmocks "github.com/atlantisnorth/atlantis/server/events/terraform/mocks"
|
||||
"github.com/atlantisnorth/atlantis/server/logging"
|
||||
. "github.com/atlantisnorth/atlantis/testing"
|
||||
"github.com/hashicorp/go-version"
|
||||
"github.com/mohae/deepcopy"
|
||||
. "github.com/petergtz/pegomock"
|
||||
"github.com/runatlantis/atlantis/server/events"
|
||||
"github.com/runatlantis/atlantis/server/events/locking"
|
||||
lmocks "github.com/runatlantis/atlantis/server/events/locking/mocks"
|
||||
"github.com/runatlantis/atlantis/server/events/mocks"
|
||||
"github.com/runatlantis/atlantis/server/events/models"
|
||||
rmocks "github.com/runatlantis/atlantis/server/events/run/mocks"
|
||||
tmocks "github.com/runatlantis/atlantis/server/events/terraform/mocks"
|
||||
"github.com/runatlantis/atlantis/server/logging"
|
||||
. "github.com/runatlantis/atlantis/testing"
|
||||
)
|
||||
|
||||
var ctx = events.CommandContext{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package events
|
||||
|
||||
import "github.com/atlantisnorth/atlantis/server/events/vcs"
|
||||
import "github.com/runatlantis/atlantis/server/events/vcs"
|
||||
|
||||
// ProjectResult is the result of executing a plan/apply for a project.
|
||||
type ProjectResult struct {
|
||||
|
||||
@@ -7,10 +7,10 @@ import (
|
||||
"strings"
|
||||
"text/template"
|
||||
|
||||
"github.com/atlantisnorth/atlantis/server/events/locking"
|
||||
"github.com/atlantisnorth/atlantis/server/events/models"
|
||||
"github.com/atlantisnorth/atlantis/server/events/vcs"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/runatlantis/atlantis/server/events/locking"
|
||||
"github.com/runatlantis/atlantis/server/events/models"
|
||||
"github.com/runatlantis/atlantis/server/events/vcs"
|
||||
)
|
||||
|
||||
//go:generate pegomock generate -m --use-experimental-model-gen --package mocks -o mocks/mock_pull_cleaner.go PullCleaner
|
||||
|
||||
@@ -4,16 +4,16 @@ import (
|
||||
"errors"
|
||||
"testing"
|
||||
|
||||
"github.com/atlantisnorth/atlantis/server/events"
|
||||
lockmocks "github.com/atlantisnorth/atlantis/server/events/locking/mocks"
|
||||
"github.com/atlantisnorth/atlantis/server/events/mocks"
|
||||
"github.com/atlantisnorth/atlantis/server/events/mocks/matchers"
|
||||
"github.com/atlantisnorth/atlantis/server/events/models"
|
||||
"github.com/atlantisnorth/atlantis/server/events/models/fixtures"
|
||||
"github.com/atlantisnorth/atlantis/server/events/vcs"
|
||||
vcsmocks "github.com/atlantisnorth/atlantis/server/events/vcs/mocks"
|
||||
. "github.com/atlantisnorth/atlantis/testing"
|
||||
. "github.com/petergtz/pegomock"
|
||||
"github.com/runatlantis/atlantis/server/events"
|
||||
lockmocks "github.com/runatlantis/atlantis/server/events/locking/mocks"
|
||||
"github.com/runatlantis/atlantis/server/events/mocks"
|
||||
"github.com/runatlantis/atlantis/server/events/mocks/matchers"
|
||||
"github.com/runatlantis/atlantis/server/events/models"
|
||||
"github.com/runatlantis/atlantis/server/events/models/fixtures"
|
||||
"github.com/runatlantis/atlantis/server/events/vcs"
|
||||
vcsmocks "github.com/runatlantis/atlantis/server/events/vcs/mocks"
|
||||
. "github.com/runatlantis/atlantis/testing"
|
||||
)
|
||||
|
||||
func TestCleanUpPullWorkspaceErr(t *testing.T) {
|
||||
|
||||
@@ -3,8 +3,8 @@ package matchers
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
logging "github.com/atlantisnorth/atlantis/server/logging"
|
||||
"github.com/petergtz/pegomock"
|
||||
logging "github.com/runatlantis/atlantis/server/logging"
|
||||
)
|
||||
|
||||
func AnyPtrToLoggingSimpleLogger() *logging.SimpleLogger {
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
// Automatically generated by pegomock. DO NOT EDIT!
|
||||
// Source: github.com/atlantisnorth/atlantis/server/events/run (interfaces: Runner)
|
||||
// Source: github.com/runatlantis/atlantis/server/events/run (interfaces: Runner)
|
||||
|
||||
package mocks
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
logging "github.com/atlantisnorth/atlantis/server/logging"
|
||||
go_version "github.com/hashicorp/go-version"
|
||||
pegomock "github.com/petergtz/pegomock"
|
||||
logging "github.com/runatlantis/atlantis/server/logging"
|
||||
)
|
||||
|
||||
type MockRunner struct {
|
||||
|
||||
@@ -10,9 +10,9 @@ import (
|
||||
"os/exec"
|
||||
"strings"
|
||||
|
||||
"github.com/atlantisnorth/atlantis/server/logging"
|
||||
"github.com/hashicorp/go-version"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/runatlantis/atlantis/server/logging"
|
||||
)
|
||||
|
||||
const inlineShebang = "#!/bin/sh -e"
|
||||
|
||||
@@ -3,9 +3,9 @@ package run
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/atlantisnorth/atlantis/server/logging"
|
||||
. "github.com/atlantisnorth/atlantis/testing"
|
||||
"github.com/hashicorp/go-version"
|
||||
"github.com/runatlantis/atlantis/server/logging"
|
||||
. "github.com/runatlantis/atlantis/testing"
|
||||
)
|
||||
|
||||
var logger = logging.NewNoopLogger()
|
||||
|
||||
@@ -3,8 +3,8 @@ package matchers
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
logging "github.com/atlantisnorth/atlantis/server/logging"
|
||||
"github.com/petergtz/pegomock"
|
||||
logging "github.com/runatlantis/atlantis/server/logging"
|
||||
)
|
||||
|
||||
func AnyPtrToLoggingSimpleLogger() *logging.SimpleLogger {
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
// Automatically generated by pegomock. DO NOT EDIT!
|
||||
// Source: github.com/atlantisnorth/atlantis/server/events/terraform (interfaces: Client)
|
||||
// Source: github.com/runatlantis/atlantis/server/events/terraform (interfaces: Client)
|
||||
|
||||
package mocks
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
logging "github.com/atlantisnorth/atlantis/server/logging"
|
||||
go_version "github.com/hashicorp/go-version"
|
||||
pegomock "github.com/petergtz/pegomock"
|
||||
logging "github.com/runatlantis/atlantis/server/logging"
|
||||
)
|
||||
|
||||
type MockClient struct {
|
||||
|
||||
@@ -8,9 +8,9 @@ import (
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/atlantisnorth/atlantis/server/logging"
|
||||
"github.com/hashicorp/go-version"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/runatlantis/atlantis/server/logging"
|
||||
)
|
||||
|
||||
//go:generate pegomock generate -m --use-experimental-model-gen --package mocks -o mocks/mock_terraform_client.go Client
|
||||
|
||||
@@ -3,9 +3,9 @@ package terraform_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/atlantisnorth/atlantis/server/events/terraform"
|
||||
. "github.com/atlantisnorth/atlantis/testing"
|
||||
"github.com/hashicorp/go-version"
|
||||
"github.com/runatlantis/atlantis/server/events/terraform"
|
||||
. "github.com/runatlantis/atlantis/testing"
|
||||
)
|
||||
|
||||
func TestMustConstraint_PancisOnBadConstraint(t *testing.T) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package vcs
|
||||
|
||||
import (
|
||||
"github.com/atlantisnorth/atlantis/server/events/models"
|
||||
"github.com/runatlantis/atlantis/server/events/models"
|
||||
)
|
||||
|
||||
//go:generate pegomock generate -m --use-experimental-model-gen --package mocks -o mocks/mock_client.go Client
|
||||
|
||||
@@ -6,9 +6,9 @@ import (
|
||||
"net/url"
|
||||
"strings"
|
||||
|
||||
"github.com/atlantisnorth/atlantis/server/events/models"
|
||||
"github.com/google/go-github/github"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/runatlantis/atlantis/server/events/models"
|
||||
)
|
||||
|
||||
// GithubClient is used to perform GitHub actions.
|
||||
|
||||
@@ -4,8 +4,8 @@ import (
|
||||
"fmt"
|
||||
"net/url"
|
||||
|
||||
"github.com/atlantisnorth/atlantis/server/events/models"
|
||||
"github.com/lkysow/go-gitlab"
|
||||
"github.com/runatlantis/atlantis/server/events/models"
|
||||
)
|
||||
|
||||
type GitlabClient struct {
|
||||
|
||||
@@ -3,8 +3,8 @@ package matchers
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
models "github.com/atlantisnorth/atlantis/server/events/models"
|
||||
"github.com/petergtz/pegomock"
|
||||
models "github.com/runatlantis/atlantis/server/events/models"
|
||||
)
|
||||
|
||||
func AnyModelsPullRequest() models.PullRequest {
|
||||
|
||||
@@ -3,8 +3,8 @@ package matchers
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
models "github.com/atlantisnorth/atlantis/server/events/models"
|
||||
"github.com/petergtz/pegomock"
|
||||
models "github.com/runatlantis/atlantis/server/events/models"
|
||||
)
|
||||
|
||||
func AnyModelsRepo() models.Repo {
|
||||
|
||||
@@ -3,8 +3,8 @@ package matchers
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
vcs "github.com/atlantisnorth/atlantis/server/events/vcs"
|
||||
"github.com/petergtz/pegomock"
|
||||
vcs "github.com/runatlantis/atlantis/server/events/vcs"
|
||||
)
|
||||
|
||||
func AnyVcsCommitStatus() vcs.CommitStatus {
|
||||
|
||||
@@ -3,8 +3,8 @@ package matchers
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
vcs "github.com/atlantisnorth/atlantis/server/events/vcs"
|
||||
"github.com/petergtz/pegomock"
|
||||
vcs "github.com/runatlantis/atlantis/server/events/vcs"
|
||||
)
|
||||
|
||||
func AnyVcsHost() vcs.Host {
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
// Automatically generated by pegomock. DO NOT EDIT!
|
||||
// Source: github.com/atlantisnorth/atlantis/server/events/vcs (interfaces: Client)
|
||||
// Source: github.com/runatlantis/atlantis/server/events/vcs (interfaces: Client)
|
||||
|
||||
package mocks
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
models "github.com/atlantisnorth/atlantis/server/events/models"
|
||||
vcs "github.com/atlantisnorth/atlantis/server/events/vcs"
|
||||
pegomock "github.com/petergtz/pegomock"
|
||||
models "github.com/runatlantis/atlantis/server/events/models"
|
||||
vcs "github.com/runatlantis/atlantis/server/events/vcs"
|
||||
)
|
||||
|
||||
type MockClient struct {
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
// Automatically generated by pegomock. DO NOT EDIT!
|
||||
// Source: github.com/atlantisnorth/atlantis/server/events/vcs (interfaces: ClientProxy)
|
||||
// Source: github.com/runatlantis/atlantis/server/events/vcs (interfaces: ClientProxy)
|
||||
|
||||
package mocks
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
models "github.com/atlantisnorth/atlantis/server/events/models"
|
||||
vcs "github.com/atlantisnorth/atlantis/server/events/vcs"
|
||||
pegomock "github.com/petergtz/pegomock"
|
||||
models "github.com/runatlantis/atlantis/server/events/models"
|
||||
vcs "github.com/runatlantis/atlantis/server/events/vcs"
|
||||
)
|
||||
|
||||
type MockClientProxy struct {
|
||||
|
||||
@@ -3,7 +3,7 @@ package vcs
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/atlantisnorth/atlantis/server/events/models"
|
||||
"github.com/runatlantis/atlantis/server/events/models"
|
||||
)
|
||||
|
||||
// NotConfiguredVCSClient is used as a placeholder when Atlantis isn't configured
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package vcs
|
||||
|
||||
import (
|
||||
"github.com/atlantisnorth/atlantis/server/events/models"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/runatlantis/atlantis/server/events/models"
|
||||
)
|
||||
|
||||
//go:generate pegomock generate -m --use-experimental-model-gen --package mocks -o mocks/mock_proxy.go ClientProxy
|
||||
|
||||
@@ -3,8 +3,8 @@ package matchers
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
logging "github.com/atlantisnorth/atlantis/server/logging"
|
||||
"github.com/petergtz/pegomock"
|
||||
logging "github.com/runatlantis/atlantis/server/logging"
|
||||
)
|
||||
|
||||
func AnyPtrToLoggingSimpleLogger() *logging.SimpleLogger {
|
||||
|
||||
@@ -3,8 +3,8 @@ package matchers
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
webhooks "github.com/atlantisnorth/atlantis/server/events/webhooks"
|
||||
"github.com/petergtz/pegomock"
|
||||
webhooks "github.com/runatlantis/atlantis/server/events/webhooks"
|
||||
)
|
||||
|
||||
func AnyWebhooksApplyResult() webhooks.ApplyResult {
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
// Automatically generated by pegomock. DO NOT EDIT!
|
||||
// Source: github.com/atlantisnorth/atlantis/server/events/webhooks (interfaces: Sender)
|
||||
// Source: github.com/runatlantis/atlantis/server/events/webhooks (interfaces: Sender)
|
||||
|
||||
package mocks
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
webhooks "github.com/atlantisnorth/atlantis/server/events/webhooks"
|
||||
logging "github.com/atlantisnorth/atlantis/server/logging"
|
||||
pegomock "github.com/petergtz/pegomock"
|
||||
webhooks "github.com/runatlantis/atlantis/server/events/webhooks"
|
||||
logging "github.com/runatlantis/atlantis/server/logging"
|
||||
)
|
||||
|
||||
type MockSender struct {
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
// Automatically generated by pegomock. DO NOT EDIT!
|
||||
// Source: github.com/atlantisnorth/atlantis/server/events/webhooks (interfaces: SlackClient)
|
||||
// Source: github.com/runatlantis/atlantis/server/events/webhooks (interfaces: SlackClient)
|
||||
|
||||
package mocks
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
webhooks "github.com/atlantisnorth/atlantis/server/events/webhooks"
|
||||
pegomock "github.com/petergtz/pegomock"
|
||||
webhooks "github.com/runatlantis/atlantis/server/events/webhooks"
|
||||
)
|
||||
|
||||
type MockSlackClient struct {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Automatically generated by pegomock. DO NOT EDIT!
|
||||
// Source: github.com/atlantisnorth/atlantis/server/events/webhooks (interfaces: UnderlyingSlackClient)
|
||||
// Source: github.com/runatlantis/atlantis/server/events/webhooks (interfaces: UnderlyingSlackClient)
|
||||
|
||||
package mocks
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user