Skip to content

Commit c597774

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

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 0 deletions
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 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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
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("LIVE_SSH_HOST", default="bash_completion")
89

910

1011
class TestScp:
@@ -76,7 +77,7 @@ def test_live(self, live_pwd, completion):
7677
Connection to it must open sufficiently quickly for the
7778
ConnectTimeout and sleep_after_tab settings.
7879
"""
79-
assert completion == f"{LIVE_HOST}:{live_pwd}/"
80+
assert completion == f"{live_pwd}/"
8081

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

0 commit comments

Comments
 (0)