Skip to content

Commit

Permalink
improve journey test to validate handling ambiguous of ssh-hosts
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron committed Sep 24, 2023
1 parent b06a0dd commit 114e91c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/journey/gix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,12 @@ title "gix commit-graph"
}
)
)
(with "an ambiguous ssh host which could be mistaken for an argument"
it "fails without trying to pass it to command-line programs" && {
WITH_SNAPSHOT="$snapshot/fail-ambigous-host" \
expect_run $WITH_FAILURE "$exe_plumbing" free pack receive 'ssh://-oProxyCommand=open$IFS-aCalculator/foo'
}
)
fi
)
elif [[ "$kind" = "small" ]]; then
Expand All @@ -355,6 +361,17 @@ title "gix commit-graph"
fi
)
)
if test "$kind" = "max" || test "$kind" = "max-pure"; then
(with "the 'clone' sub-command"
snapshot="$snapshot/clone"
(with "an ambiguous ssh host which could be mistaken for an argument"
it "fails without trying to pass it to command-line programs" && {
WITH_SNAPSHOT="$snapshot/fail-ambigous-host" \
expect_run $WITH_FAILURE "$exe_plumbing" clone 'ssh://-oProxyCommand=open$IFS-aCalculator/foo'
}
)
)
fi
(with "the 'index' sub-command"
snapshot="$snapshot/index"
title "gix free pack index create"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Error: Host name '-oProxyCommand=open$IFS-aCalculator' could be mistaken for a command-line argument
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Error: Host name '-oProxyCommand=open$IFS-aCalculator' could be mistaken for a command-line argument

0 comments on commit 114e91c

Please sign in to comment.