38 lines
829 B
Bash
38 lines
829 B
Bash
#!/usr/bin/env bash
|
|
|
|
setup() {
|
|
load "$PWD/tests/integration/helpers/common"
|
|
_common_setup
|
|
}
|
|
|
|
# bats test_tags=slow
|
|
@test "recipe fetch all" {
|
|
run rm -rf "$ABRA_DIR/recipes/matrix-synapse"
|
|
assert_success
|
|
assert_not_exists "$ABRA_DIR/recipes/matrix-synapse"
|
|
|
|
run $ABRA recipe fetch --all
|
|
assert_success
|
|
assert_exists "$ABRA_DIR/recipes/matrix-synapse"
|
|
}
|
|
|
|
@test "recipe fetch single recipe" {
|
|
run rm -rf "$ABRA_DIR/recipes/matrix-synapse"
|
|
assert_success
|
|
assert_not_exists "$ABRA_DIR/recipes/matrix-synapse"
|
|
|
|
run $ABRA recipe fetch matrix-synapse
|
|
assert_success
|
|
assert_exists "$ABRA_DIR/recipes/matrix-synapse"
|
|
}
|
|
|
|
@test "error if missing args/flags" {
|
|
run $ABRA recipe fetch
|
|
assert_failure
|
|
}
|
|
|
|
@test "error if single recipe and --all" {
|
|
run $ABRA recipe fetch matrix-synapse --all
|
|
assert_failure
|
|
}
|