Add debugging for tests
This commit is contained in:
parent
9815230eba
commit
e0b185b5ef
@ -9,44 +9,48 @@ teardown() {
|
||||
rm -rf "$ABRA_DIR"
|
||||
}
|
||||
|
||||
abra() {
|
||||
./abra -d $@
|
||||
}
|
||||
|
||||
@test "abra server (add|rm)" {
|
||||
./abra server add swarm.test.com
|
||||
abra server add swarm.test.com
|
||||
docker context ls | grep swarm.test.com
|
||||
[ -d $ABRA_DIR/servers/swarm.test.com ]
|
||||
./abra server swarm.test.com rm
|
||||
abra server swarm.test.com rm
|
||||
|
||||
./abra server add swarm.test.com foobar 12345
|
||||
abra server add swarm.test.com foobar 12345
|
||||
[ -d $ABRA_DIR/servers/swarm.test.com ]
|
||||
./abra server swarm.test.com rm
|
||||
abra server swarm.test.com rm
|
||||
}
|
||||
|
||||
@test "abra server init" {
|
||||
./abra server default init
|
||||
abra server default init
|
||||
}
|
||||
|
||||
@test "abra app (new|rm)" {
|
||||
./abra app new --server default --domain traefik.test.com --app-name traefik_test_com traefik
|
||||
abra app new --server default --domain traefik.test.com --app-name traefik_test_com traefik
|
||||
[ -f $ABRA_DIR/servers/default/traefik_test_com.env ]
|
||||
|
||||
# interactive prompt
|
||||
echo "y" | ./abra app traefik_test_com delete
|
||||
echo "y" | abra app traefik_test_com delete
|
||||
[ ! -f $ABRA_DIR/servers/default/traefik_test_com.env ]
|
||||
|
||||
# --no-prompt
|
||||
./abra app new --server default --domain traefik_test_com --app-name traefik_test_com traefik
|
||||
./abra --no-prompt app traefik_test_com delete
|
||||
abra app new --server default --domain traefik_test_com --app-name traefik_test_com traefik
|
||||
abra --no-prompt app traefik_test_com delete
|
||||
[ ! -f $ABRA_DIR/servers/default/traefik_test_com.env ]
|
||||
}
|
||||
|
||||
@test "abra app <domain> secret (insert|generate|rm)" {
|
||||
./abra app new --server default --domain traefik_test_com --app-name traefik_test_com traefik
|
||||
abra app new --server default --domain traefik_test_com --app-name traefik_test_com traefik
|
||||
|
||||
./abra app traefik_test_com secret insert foobar v1 "foobar"
|
||||
abra app traefik_test_com secret insert foobar v1 "foobar"
|
||||
|
||||
# interactive prompt
|
||||
echo "y" | ./abra app traefik_test_com secret rm foobar
|
||||
echo "y" | abra app traefik_test_com secret rm foobar
|
||||
|
||||
./abra app traefik_test_com secret insert foobar v1 "foobar"
|
||||
abra app traefik_test_com secret insert foobar v1 "foobar"
|
||||
# prompt
|
||||
./abra --no-prompt app traefik_test_com secret rm foobar
|
||||
abra --no-prompt app traefik_test_com secret rm foobar
|
||||
}
|
||||
|
Reference in New Issue
Block a user