forked from toolshed/abra
Compare commits
2 Commits
a82cdbf150
...
7f40394aff
Author | SHA1 | Date | |
---|---|---|---|
7f40394aff | |||
e35f8f95c6 |
@ -15,10 +15,6 @@ func TestIsDirty(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if err := r.IsDirty(); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
assert.False(t, r.Dirty)
|
||||
|
||||
fpath := filepath.Join(r.Dir, "foo.txt")
|
||||
@ -31,9 +27,10 @@ func TestIsDirty(t *testing.T) {
|
||||
os.Remove(fpath)
|
||||
})
|
||||
|
||||
if err := r.IsDirty(); err != nil {
|
||||
dirty, err := r.IsDirty()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
assert.True(t, r.Dirty)
|
||||
assert.True(t, dirty)
|
||||
}
|
||||
|
@ -78,7 +78,6 @@ func TestGet(t *testing.T) {
|
||||
Name: "mygit.org/myorg/cool-recipe",
|
||||
EnvVersion: "1e83340e",
|
||||
EnvVersionRaw: "1e83340e+U",
|
||||
Dirty: true,
|
||||
Dir: path.Join(cfg.GetAbraDir(), "/recipes/mygit_org_myorg_cool-recipe"),
|
||||
GitURL: "https://mygit.org/myorg/cool-recipe.git",
|
||||
SSHURL: "ssh://git@mygit.org/myorg/cool-recipe.git",
|
||||
|
@ -22,6 +22,8 @@ setup(){
|
||||
teardown(){
|
||||
_reset_recipe
|
||||
_undeploy_app
|
||||
_undeploy_app2 "gitea.$TEST_SERVER"
|
||||
|
||||
_reset_app
|
||||
_reset_tags
|
||||
|
||||
@ -222,19 +224,6 @@ teardown(){
|
||||
run $ABRA app deploy "gitea.$TEST_SERVER" --no-input --no-converge-checks
|
||||
assert_success
|
||||
assert_output --partial "$latestVersion"
|
||||
|
||||
run $ABRA app undeploy "gitea.$TEST_SERVER" --no-input
|
||||
assert_success
|
||||
|
||||
run $ABRA app secret remove "gitea.$TEST_SERVER" --all --no-input
|
||||
assert_success
|
||||
|
||||
run $ABRA app volume remove "gitea.$TEST_SERVER" --no-input
|
||||
assert_success
|
||||
|
||||
run $ABRA app remove "gitea.$TEST_SERVER" --no-input
|
||||
assert_success
|
||||
assert_not_exists "$ABRA_DIR/servers/$TEST_SERVER/gitea.$TEST_SERVER.env"
|
||||
}
|
||||
|
||||
# bats test_tags=slow
|
||||
|
@ -30,6 +30,15 @@ _undeploy_app() {
|
||||
assert_output --partial 'unknown'
|
||||
}
|
||||
|
||||
_undeploy_app2() {
|
||||
run $ABRA app undeploy "$1" --no-input
|
||||
|
||||
run $ABRA app ls --server "$TEST_SERVER" --status
|
||||
assert_success
|
||||
assert_output --partial "$1"
|
||||
assert_output --partial 'unknown'
|
||||
}
|
||||
|
||||
_rm_app() {
|
||||
# NOTE(d1): not asserting outcomes on teardown here since some might fail
|
||||
# depending on what the test created. all commands run through anyway
|
||||
|
@ -38,6 +38,8 @@ _set_git_author() {
|
||||
}
|
||||
|
||||
_git_commit() {
|
||||
_set_git_author
|
||||
|
||||
run git -C "$ABRA_DIR/recipes/$TEST_RECIPE" add .
|
||||
assert_success
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user