forked from toolshed/abra
test: tag/git helpers & refactor [ci skip]
This commit is contained in:
@ -85,12 +85,11 @@ teardown(){
|
||||
|
||||
run git -C "$ABRA_DIR/recipes/$TEST_RECIPE" status
|
||||
refute_output --partial 'behind 3'
|
||||
|
||||
_reset_recipe "$TEST_RECIPE"
|
||||
}
|
||||
|
||||
@test "ensure recipe not up to date if --offline" {
|
||||
latestCommit="$(git -C "$ABRA_DIR/recipes/$TEST_RECIPE" rev-parse --short HEAD)"
|
||||
refute [ -z "$latestCommit" ];
|
||||
|
||||
run git -C "$ABRA_DIR/recipes/$TEST_RECIPE" reset --hard HEAD~3
|
||||
assert_success
|
||||
|
||||
@ -104,11 +103,7 @@ teardown(){
|
||||
run git -C "$ABRA_DIR/recipes/$TEST_RECIPE" status
|
||||
assert_output --partial 'behind 3'
|
||||
|
||||
run git -C "$ABRA_DIR/recipes/$TEST_RECIPE" checkout "$latestCommit"
|
||||
assert_success
|
||||
|
||||
run git -C "$ABRA_DIR/recipes/$TEST_RECIPE" status
|
||||
refute_output --partial 'behind 3'
|
||||
_reset_recipe "$TEST_RECIPE"
|
||||
}
|
||||
|
||||
@test "error if missing arguments without passing --local" {
|
||||
|
Reference in New Issue
Block a user