Skip to content

Commit d935c01

Browse files
committed
ci: Make scp tests use localhost as LIVE_HOST
Also fix the live_host test
1 parent cfd143b commit d935c01

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.github/workflows/ci.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ jobs:
7171
--env BSD=${{matrix.bsd}}
7272
--env PYTESTFLAGS="--verbose -p no:cacheprovider"
7373
--env NETWORK=$NETWORK
74+
--env BASH_COMPLETION_TEST_LIVE_SSH_HOST=localhost
7475
${NETWORK:+--network $NETWORK}
7576
--volume $PWD:/usr/src/bash-completion
7677
--workdir /usr/src/bash-completion

test/t/test_scp.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1+
import os
12
from itertools import chain
23

34
import pytest
45

56
from conftest import assert_bash_exec, assert_complete, bash_env_saved
67

7-
LIVE_HOST = "bash_completion"
8+
LIVE_HOST = os.environ.get(
9+
"BASH_COMPLETION_TEST_LIVE_SSH_HOST", default="bash_completion"
10+
)
811

912

1013
class TestScp:
@@ -76,7 +79,7 @@ def test_live(self, live_pwd, completion):
7679
Connection to it must open sufficiently quickly for the
7780
ConnectTimeout and sleep_after_tab settings.
7881
"""
79-
assert completion == f"{LIVE_HOST}:{live_pwd}/"
82+
assert completion == f"{live_pwd}/"
8083

8184
@pytest.mark.complete("scp -o Foo=")
8285
def test_option_arg(self, completion):

0 commit comments

Comments
 (0)