test: ensure catalogue --chaos works [ci skip]
Closes coop-cloud/organising#462.
This commit is contained in:
parent
d5593b69e0
commit
e116148c49
|
@ -11,6 +11,32 @@ setup(){
|
||||||
assert_success
|
assert_success
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@test "error if unstaged changes" {
|
||||||
|
run bash -c "echo foo >> $ABRA_DIR/catalogue/foo"
|
||||||
|
assert_success
|
||||||
|
assert_exists "$ABRA_DIR/catalogue/foo"
|
||||||
|
|
||||||
|
run $ABRA catalogue generate
|
||||||
|
assert_failure
|
||||||
|
assert_output --partial 'locally unstaged changes'
|
||||||
|
|
||||||
|
run rm -rf "$ABRA_DIR/catalogue/foo"
|
||||||
|
assert_not_exists "$ABRA_DIR/catalogue/foo"
|
||||||
|
}
|
||||||
|
|
||||||
|
# bats test_tags=slow
|
||||||
|
@test "no error if unstaged and --chaos" {
|
||||||
|
run bash -c "echo foo >> $ABRA_DIR/catalogue/foo"
|
||||||
|
assert_success
|
||||||
|
assert_exists "$ABRA_DIR/catalogue/foo"
|
||||||
|
|
||||||
|
run $ABRA catalogue generate gitea --chaos
|
||||||
|
assert_success
|
||||||
|
|
||||||
|
run rm -rf "$ABRA_DIR/catalogue/foo"
|
||||||
|
assert_not_exists "$ABRA_DIR/catalogue/foo"
|
||||||
|
}
|
||||||
|
|
||||||
# bats test_tags=slow
|
# bats test_tags=slow
|
||||||
@test "generate only specific recipe" {
|
@test "generate only specific recipe" {
|
||||||
run $ABRA catalogue generate gitea
|
run $ABRA catalogue generate gitea
|
||||||
|
|
Loading…
Reference in New Issue