Skip to content

Commit 36b4302

Browse files
committed
tests: fix CLIClushTest.test_012_diff_null() for travis (#415)
The $SSH_CONNECTION trick cannot be used anymore with Travis. Use ExecWorker to differenciate outputs in this clush --diff test. Closes #415. Change-Id: I087ed0465636622fe0a002c325cd05835b351f88
1 parent bb49024 commit 36b4302

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tests/CLIClushTest.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,9 +232,8 @@ def test_011_diff_tty(self):
232232
def test_012_diff_null(self):
233233
"""test clush (diff w/o output)"""
234234
rxs = r"^--- %s\n\+\+\+ localhost\n@@ -1(,1)? \+[01],0 @@\n-ok\n$" % HOSTNAME
235-
self._clush_t(["-w", "%s,localhost" % HOSTNAME, "--diff",
236-
'echo $SSH_CONNECTION | cut -d " " -f 3 |'
237-
'egrep "^(127.0.0.1|::1)$" >/dev/null || echo ok'],
235+
self._clush_t(["-R", "exec", "-w", "%s,localhost" % HOSTNAME, "--diff",
236+
'echo %h | egrep -q "^localhost$" || echo ok'],
238237
None, re.compile(rxs.encode()))
239238

240239
def test_013_stdin(self):

0 commit comments

Comments
 (0)