Patchwork test-ssh: do not actually look up "brokenrepository" by DNS

login
register
mail settings
Submitter Yuya Nishihara
Date Nov. 26, 2017, 2:53 a.m.
Message ID <f8b8b150d10f9c9b03b9.1511664786@mimosa>
Download mbox | patch
Permalink /patch/25754/
State Accepted
Headers show

Comments

Yuya Nishihara - Nov. 26, 2017, 2:53 a.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1511662947 -32400
#      Sun Nov 26 11:22:27 2017 +0900
# Node ID f8b8b150d10f9c9b03b9648e110990b50185ffba
# Parent  8287df8b7be545fdafa22b771012ac65f6264d12
test-ssh: do not actually look up "brokenrepository" by DNS
Augie Fackler - Nov. 30, 2017, 9:07 p.m.
On Sun, Nov 26, 2017 at 11:53:06AM +0900, Yuya Nishihara wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya@tcha.org>
> # Date 1511662947 -32400
> #      Sun Nov 26 11:22:27 2017 +0900
> # Node ID f8b8b150d10f9c9b03b9648e110990b50185ffba
> # Parent  8287df8b7be545fdafa22b771012ac65f6264d12
> test-ssh: do not actually look up "brokenrepository" by DNS

D'oh, good catch. This is a better fix than my fix in phabricator, queued!

> diff --git a/tests/test-ssh.t b/tests/test-ssh.t
> --- a/tests/test-ssh.t
> +++ b/tests/test-ssh.t
> @@ -581,17 +581,16 @@ abort during pull is properly reported a
>
>  abort with no error hint when there is a ssh problem when pulling
>
> -  $ hg pull ssh://brokenrepository
> +  $ hg pull ssh://brokenrepository -e "\"$PYTHON\" \"$TESTDIR/dummyssh\""
>    pulling from ssh://brokenrepository/
> -  remote: ssh: Could not resolve hostname brokenrepository: Name or service not known
>    abort: no suitable response from remote hg!
>    [255]
>
>  abort with configured error hint when there is a ssh problem when pulling
>
> -  $ hg pull ssh://brokenrepository --config ui.ssherrorhint="Please see http://company/internalwiki/ssh.html"
> +  $ hg pull ssh://brokenrepository -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" \
> +  > --config ui.ssherrorhint="Please see http://company/internalwiki/ssh.html"
>    pulling from ssh://brokenrepository/
> -  remote: ssh: Could not resolve hostname brokenrepository: Name or service not known
>    abort: no suitable response from remote hg!
>    (Please see http://company/internalwiki/ssh.html)
>    [255]
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Patch

diff --git a/tests/test-ssh.t b/tests/test-ssh.t
--- a/tests/test-ssh.t
+++ b/tests/test-ssh.t
@@ -581,17 +581,16 @@  abort during pull is properly reported a
 
 abort with no error hint when there is a ssh problem when pulling
 
-  $ hg pull ssh://brokenrepository
+  $ hg pull ssh://brokenrepository -e "\"$PYTHON\" \"$TESTDIR/dummyssh\""
   pulling from ssh://brokenrepository/
-  remote: ssh: Could not resolve hostname brokenrepository: Name or service not known
   abort: no suitable response from remote hg!
   [255]
 
 abort with configured error hint when there is a ssh problem when pulling
 
-  $ hg pull ssh://brokenrepository --config ui.ssherrorhint="Please see http://company/internalwiki/ssh.html"
+  $ hg pull ssh://brokenrepository -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" \
+  > --config ui.ssherrorhint="Please see http://company/internalwiki/ssh.html"
   pulling from ssh://brokenrepository/
-  remote: ssh: Could not resolve hostname brokenrepository: Name or service not known
   abort: no suitable response from remote hg!
   (Please see http://company/internalwiki/ssh.html)
   [255]