Skip to content

Commit

Permalink
git p4 test: display unresolvable host error
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Pete Wyckoff authored and Junio C Hamano committed Nov 26, 2012
1 parent 78189be commit e6777fd
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions t/t9800-git-p4-basic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
'
Expand Down

0 comments on commit e6777fd

Please sign in to comment.