Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplified local ahoy imports. #1401

Merged
merged 2 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions .ahoy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -262,13 +262,9 @@ commands:

local:
usage: Custom local commands. See `ahoy local help`.
cmd: |
if [ -f .ahoy.local.yml ]; then
ahoy -f ".ahoy.local.yml" "$@"
else
echo ".ahoy.local.yml does not exist."
echo "Copy .ahoy.local.example.yml to .ahoy.local.yml and rerun this command.";
fi
optional: true
imports:
- .ahoy.local.yml

# ----------------------------------------------------------------------------
# Utilities.
Expand Down
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ aliases:
# This container has all the necessary tools to run a dockerized environment.
# @see https://github.com/drevops/ci-runner
# @see https://hub.docker.com/repository/docker/drevops/ci-runner/tags
- image: drevops/ci-runner:24.8.0
- image: drevops/ci-runner:24.9.0
auth:
username: ${VORTEX_CONTAINER_REGISTRY_USER}
password: ${VORTEX_CONTAINER_REGISTRY_PASS}
Expand Down
8 changes: 1 addition & 7 deletions .vortex/tests/bats/workflow.utilities.bats
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,16 @@ load _helper.workflow.bash
step "Run ahoy local commands"

substep "Assert calling local commands without local file does not throw error"
run ahoy local
run ahoy --version
assert_success
assert_output_not_contains "[fatal]"
assert_output_contains ".ahoy.local.yml does not exist."
assert_output_contains "Copy .ahoy.local.example.yml to .ahoy.local.yml and rerun this command."

substep "Assert calling local commands with local file path specified and file is present works correctly"
cp ".ahoy.local.example.yml" ".ahoy.local.yml"
run ahoy local help
assert_success
assert_output_contains "Custom local commands"
assert_output_not_contains "[fatal]"
assert_output_not_contains ".ahoy.local.yml does not exist."
assert_output_not_contains "Copy .ahoy.local.example.yml to .ahoy.local.yml and rerun this command."

substep "Assert calling local commands with local file path specified and file is present and file return non-zero exit code"

Expand All @@ -41,8 +37,6 @@ load _helper.workflow.bash
assert_failure
assert_output_contains "expected failure"
assert_output_not_contains "[fatal]"
assert_output_not_contains ".ahoy.local.yml does not exist."
assert_output_not_contains "Copy .ahoy.local.example.yml to .ahoy.local.yml and rerun this command."
}

@test "Doctor info" {
Expand Down
Loading