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

test: added debug config bats test #119

Merged
merged 1 commit into from
Jan 20, 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
1 change: 1 addition & 0 deletions test/Giltfile.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
debug: false
repositories:
- git: https://github.com/retr0h/ansible-etcd.git
version: 77a95b7
Expand Down
10 changes: 10 additions & 0 deletions test/integration/test_cli.bats
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,16 @@ teardown() {
echo "${output}" | grep -E ".*Preparing worktree.*HEAD is now at 77a95b7"
}

@test "invoke gilt overlay subcommand with debug config" {
os=$(case $(uname) in Darwin*) echo x;; esac)
sed -Ei ${os:+""} -e 's/(^debug:)(.*)/\1 true/' ${GILT_TEST_BASE_TMP_DIR}/Giltfile.yaml
run bash -c "cd ${GILT_TEST_BASE_TMP_DIR}; go run ${GILT_PROGRAM} overlay"

[ "$status" -eq 0 ]
echo "${output}" | grep "[https://github.com/retr0h/ansible-etcd.git@77a95b7]"
echo "${output}" | grep -E ".*Preparing worktree.*HEAD is now at 77a95b7"
}

@test "invoke gilt overlay when already cloned" {
run bash -c "cd ${GILT_TEST_BASE_TMP_DIR}; go run ${GILT_PROGRAM} overlay"
run bash -c "cd ${GILT_TEST_BASE_TMP_DIR}; go run ${GILT_PROGRAM} overlay"
Expand Down
Loading