test: moar integration tests [ci skip]

This commit is contained in:
2023-09-07 18:50:25 +02:00
parent 7a9224b2b2
commit 0be532692d
112 changed files with 3412 additions and 1142 deletions

View File

@ -0,0 +1,39 @@
#!/usr/bin/env bash
setup() {
load "$PWD/tests/integration/helpers/common"
_common_setup
}
@test "allow unstaged changes" {
run $ABRA recipe fetch matrix-synapse
assert_success
run echo "unstaged changes" >> "$ABRA_DIR/recipes/matrix-synapse/foo"
assert_success
run git -C "$ABRA_DIR/recipes/matrix-synapse" status
assert_success
assert_output --partial 'foo'
run $ABRA recipe sync matrix-synapse --patch
assert_success
run rm -rf "$ABRA_DIR/recipes/matrix-synapse/foo"
assert_success
assert_not_exists "$ABRA_DIR/recipes/matrix-synapse/foo"
}
@test "detect unstaged label changes" {
run $ABRA recipe fetch matrix-synapse
assert_success
run $ABRA recipe sync matrix-synapse --patch
assert_success
run $ABRA recipe sync matrix-synapse --patch
assert_success
assert_output --partial 'is already set, nothing to do?'
}
# TODO(d1): implement