git p4 test: display unresolvable host error
authorPete Wyckoff <pw@padd.com>
Fri, 23 Nov 2012 22:35:37 +0000 (17:35 -0500)
committerJunio C Hamano <gitster@pobox.com>
Mon, 26 Nov 2012 19:00:49 +0000 (11:00 -0800)
This test passes already.  Make sure p4 diagnostic errors are displayed.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t9800-git-p4-basic.sh

index 05797c31d14e135c28cae476485483183c6fabd8..8c5979647ffceeb6614f0cdb58ae06170afac7c4 100755 (executable)
@@ -183,6 +183,18 @@ test_expect_success 'initial import time from top change time' '
        )
 '
 
+test_expect_success 'unresolvable host in P4PORT should display error' '
+       test_when_finished cleanup_git &&
+       git p4 clone --dest="$git" //depot &&
+       (
+               cd "$git" &&
+               P4PORT=nosuchhost:65537 &&
+               export P4PORT &&
+               test_expect_code 1 git p4 sync >out 2>err &&
+               grep "connect to nosuchhost" err
+       )
+'
+
 test_expect_success 'kill p4d' '
        kill_p4d
 '