Skip to content

Commit 96af8f4

Browse files
committed
tests/template: Make scripts for curl, wget, fetch
Turns out the 'fail to find tar uses git clone' test would fail on systems that don't have `curl` installed, since `create_forwarding_script` now only creates a script if a program is present. This fixes the breakage by trying to create a forwarding script for all three programs; at least one should be guaranteed to be present.
1 parent fc55a10 commit 96af8f4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/template.bats

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,10 @@ run_with_download_program() {
335335
}
336336

337337
@test "$SUITE: fail to find tar uses git clone" {
338+
# If none of these are installed on the system, the test will fail.
338339
create_forwarding_script 'curl'
340+
create_forwarding_script 'wget'
341+
create_forwarding_script 'fetch'
339342
PATH="$BATS_TEST_BINDIR" run "$BASH" "$TEST_GO_ROOTDIR/go-template"
340343

341344
assert_output_matches "Failed to find tar"

0 commit comments

Comments
 (0)