forked from toolshed/abra
test: moar integration tests [ci skip]
This commit is contained in:
39
tests/integration/recipe_sync.bats
Normal file
39
tests/integration/recipe_sync.bats
Normal 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
|
Reference in New Issue
Block a user