Skip to content

Commit

Permalink
Fix test when ssh command is unavailable
Browse files Browse the repository at this point in the history
  • Loading branch information
Seb-MCaw committed Aug 13, 2024
1 parent 4186694 commit 8672e86
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions testsuite/tests/with/ssh-origins/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,16 @@


# We expect attempts to get crates from these origins to fail, but it should be
# due to the invalid host, not because of the scheme
# because the git clone command fails, not because Alire rejects the origin URL.
init_local_crate(update=False)
for lib_name in ["libfoo", "libbar", "libbaz"]:
p = run_alr("with", lib_name, complain_on_error=False)
assert_match(
r".*Could not resolve hostname host.invalid.*",
(
r'.*Command \["git", "clone", "--recursive", "-q", '
r'"ssh://host\.invalid/path/to/repo.git", ".*"\] '
r'exited with code 128'
),
p.out
)

Expand Down

0 comments on commit 8672e86

Please sign in to comment.