git p4 test: display unresolvable host error
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>
Pete Wyckoff committed
Nov 23, 2012 at 17:35 UTC
e6777fde8d0ede84202ed1cc5ec0a175e0e52ab0
1 file changed
+12
t/t9800-git-p4-basic.sh
+12
@@ -183,6 +183,18 @@ test_expect_success 'initial import time from top change time' '
183
)
184
'
185
186
+test_expect_success 'unresolvable host in P4PORT should display error' '
187
+ test_when_finished cleanup_git &&
188
+ git p4 clone --dest="$git" //depot &&
189
+ (
190
+ cd "$git" &&
191
+ P4PORT=nosuchhost:65537 &&
192
+ export P4PORT &&
193
+ test_expect_code 1 git p4 sync >out 2>err &&
194
+ grep "connect to nosuchhost" err
195
+ )
196
+'
197
+
198
test_expect_success 'kill p4d' '
199
kill_p4d
200
'