Skip to content

Commit e6777fd

Browse files
Pete Wyckoffgitster
authored andcommitted
git p4 test: display unresolvable host error
This test passes already. Make sure p4 diagnostic errors are displayed. Signed-off-by: Pete Wyckoff <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 78189be commit e6777fd

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

t/t9800-git-p4-basic.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,18 @@ test_expect_success 'initial import time from top change time' '
183183
)
184184
'
185185

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+
186198
test_expect_success 'kill p4d' '
187199
kill_p4d
188200
'

0 commit comments

Comments
 (0)