Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Atlantis 0.4 #152

Merged
merged 69 commits into from
Jul 3, 2018
Merged
Changes from 1 commit
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
8ee16a0
By default atlantis plan will run in root dir.
lkysow Mar 22, 2018
6dc0e3c
Implement apply step.
lkysow Mar 22, 2018
692e414
Implement init step.
lkysow Mar 22, 2018
464cd51
Implement plan step.
lkysow Mar 22, 2018
06f68b8
Add TF_WORKSPACE env var when execing terraform
lkysow Mar 22, 2018
a22e237
Improve test helpers.
lkysow Mar 25, 2018
42b6646
Implement config reader and parser
lkysow Mar 25, 2018
75a55dd
Moved into new package
lkysow Mar 25, 2018
7dfab21
Parse config and build execution plan.
lkysow Jun 5, 2018
2175b50
Use new steps in plan/apply
lkysow Jun 5, 2018
aef8a63
Make tests more readable
lkysow Jun 6, 2018
d06f3ca
Implement custom run step
lkysow Jun 6, 2018
69c788e
Rename package repoconfig to yaml
lkysow Jun 7, 2018
b531705
Split out config elements into separate files
lkysow Jun 8, 2018
d6883e8
Move runtime elements to the runtime package
lkysow Jun 8, 2018
437b625
Test execution_planner
lkysow Jun 8, 2018
9839e0d
Move execution planner. Don't plan in deleted dirs
lkysow Jun 11, 2018
3525ab3
WIP
lkysow Jun 12, 2018
f59fe33
Parse YAML without defaults/validation.
lkysow Jun 12, 2018
d70e57e
Yaml parsing and validation.
lkysow Jun 13, 2018
b5e2a73
WIP Add operators and get compiled.
lkysow Jun 15, 2018
8ab4857
Fix all tests
lkysow Jun 15, 2018
e97b98e
Add first e2e test with mocks.
lkysow Jun 15, 2018
a9e9e18
Enable multiple cases for e2e testing
lkysow Jun 16, 2018
a162b36
Remove need for .git in test fixtures.
lkysow Jun 16, 2018
de5c406
Add -var test.
lkysow Jun 18, 2018
d9a4736
Implement when_modified.
lkysow Jun 18, 2018
e7d5bf5
Implement not deleting repo when same sha
lkysow Jun 18, 2018
6b507eb
Add -p flag.
lkysow Jun 19, 2018
45d80fc
Fix gometalint errors.
lkysow Jun 19, 2018
21694c9
Run dep ensure
lkysow Jun 19, 2018
3c9188b
Add unit test image
lkysow Jun 20, 2018
07ff697
Vendor docker
lkysow Jun 20, 2018
1824717
Use correct case for sirupsen.
lkysow Jun 20, 2018
c6b18e3
Fix tests
lkysow Jun 20, 2018
856c0d0
Use atlantisbot
lkysow Jun 20, 2018
c98d104
Update e2e for new version.
lkysow Jun 20, 2018
0c966d5
GitlabRequestParser -> GitlabRequestParserValidator
lkysow Jun 20, 2018
d359131
RepoWhitelist -> RepoWhitelistChecker
lkysow Jun 20, 2018
d3ec832
WIP
lkysow Jun 21, 2018
124a016
WIP
lkysow Jun 21, 2018
17a9c7f
Regen mocks
lkysow Jun 21, 2018
9e1d92b
WIP
lkysow Jun 21, 2018
cf3e654
Start on tests
lkysow Jun 21, 2018
dd12ce1
Create docs with VuePress
lkysow Jun 22, 2018
860cdb8
Delete old website
lkysow Jun 22, 2018
a564c7e
Docs
lkysow Jun 25, 2018
1d2f33a
Docs
lkysow Jun 25, 2018
ba833bf
Move terraform/ under runatlantis.io
lkysow Jun 25, 2018
0e71ccc
Finish docs
lkysow Jun 25, 2018
542a109
Fix locking
lkysow Jun 26, 2018
7c927a4
Update docs with changes from README
lkysow Jun 27, 2018
12f071b
Rename atlantisworkspace to workingdir.
lkysow Jun 27, 2018
6f8401d
Test BuildAutoplanCommands
lkysow Jun 29, 2018
507ce43
Rename Spec -> Config
lkysow Jun 29, 2018
3339dcd
Dir/Path -> RepoRelDir, path (in templates) -> dir
lkysow Jun 29, 2018
9e7509a
Test command runner
lkysow Jun 29, 2018
71716a6
Cleanup unused code.
lkysow Jun 29, 2018
f019158
Add env vars to run step
lkysow Jun 29, 2018
f29dc00
Warn if not using version 2
lkysow Jun 29, 2018
13a70c7
Add new --allow-repo-config flag.
lkysow Jun 30, 2018
6d87664
Test GitHub client.
lkysow Jul 1, 2018
f067818
Test project command runner.
lkysow Jul 1, 2018
502c626
Fix doc todos
lkysow Jul 2, 2018
ef728de
Change testdrive docs for autoplan
lkysow Jul 2, 2018
85a775b
Fix todos. Remove TF_WORKSPACE.
lkysow Jul 2, 2018
8effd01
Test new allow-repo-config flag
lkysow Jul 2, 2018
b2bd90d
Various fixes
lkysow Jul 3, 2018
573491f
Bring README back for now
lkysow Jul 3, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Improve test helpers.
  • Loading branch information
lkysow committed Jun 5, 2018
commit a22e23718c4ea4190a01c9c722b54134c1f7029d
8 changes: 7 additions & 1 deletion Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Gopkg.toml
Original file line number Diff line number Diff line change
@@ -88,3 +88,7 @@
[[constraint]]
branch = "master"
name = "github.com/lkysow/go-gitlab"

[[constraint]]
name = "github.com/go-test/deep"
version = "1.0.1"
25 changes: 20 additions & 5 deletions testing/assertions.go
Original file line number Diff line number Diff line change
@@ -16,9 +16,11 @@ package testing
import (
"fmt"
"path/filepath"
"reflect"
"runtime"
"strings"
"testing"

"github.com/go-test/deep"
)

// Assert fails the test if the condition is false.
@@ -44,21 +46,34 @@ func Ok(tb testing.TB, err error) {
// Equals fails the test if exp is not equal to act.
// Taken from https://github.com/benbjohnson/testing.
func Equals(tb testing.TB, exp, act interface{}) {
if !reflect.DeepEqual(exp, act) {
tb.Helper()
if diff := deep.Equal(exp, act); diff != nil {
_, file, line, _ := runtime.Caller(1)
fmt.Printf("\033[31m%s:%d:\n\n\texp: %#v\n\n\tgot: %#v\033[39m\n\n", filepath.Base(file), line, exp, act)
tb.FailNow()
tb.Fatal(diff)
}
}

// ErrEquals fails the test if act is nil or act.Error() != exp
func ErrEquals(tb testing.TB, exp string, act error) {
tb.Helper()
if act == nil {
tb.Errorf("exp err %q but err was nil", exp)
tb.Fatalf("exp err %q but err was nil", exp)
}
if act.Error() != exp {
tb.Errorf("exp err: %q but got: %q", exp, act.Error())
tb.Fatalf("exp err: %q but got: %q", exp, act.Error())
}
}

// ErrContains fails the test if act is nil or act.Error() does not contain
// substr.
func ErrContains(tb testing.TB, substr string, act error) {
tb.Helper()
if act == nil {
tb.Fatalf("exp err to contain %q but err was nil", substr)
}
if !strings.Contains(act.Error(), substr) {
tb.Fatalf("exp err %q to contain $q", act.Error(), substr)
}
}

15 changes: 15 additions & 0 deletions testing/temp_files.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package testing

import (
"io/ioutil"
"os"
"testing"
)

// TempDir creates a temporary directory and returns its path along
// with a cleanup function to be called via defer.
func TempDir(t *testing.T) (string, func()) {
tmpDir, err := ioutil.TempDir("", "")
Ok(t, err)
return tmpDir, func() { os.RemoveAll(tmpDir) }
}
2 changes: 2 additions & 0 deletions vendor/github.com/go-test/deep/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions vendor/github.com/go-test/deep/.travis.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions vendor/github.com/go-test/deep/CHANGES.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions vendor/github.com/go-test/deep/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

51 changes: 51 additions & 0 deletions vendor/github.com/go-test/deep/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading