git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 4/6] git p4 test: display unresolvable host error

From
PWPete Wyckoff <pw@padd.com>
Date
Nov 23, 2012, 22:35 UTC
Message-ID
<1353710139-16207-5-git-send-email-pw@padd.com>
In-Reply-To
<1353710139-16207-1-git-send-email-pw@padd.com>
This test passes already.  Make sure p4 diagnostic errors are displayed.
Signed-off-by: Pete Wyckoff <pw@padd.com>
---
 t/t9800-git-p4-basic.sh | 12 ++++++++++++
 1 file changed, 12 insertions(+)
diff --git a/t/t9800-git-p4-basic.sh b/t/t9800-git-p4-basic.sh
index 05797c3..8c59796 100755
--- a/t/t9800-git-p4-basic.sh
+++ b/t/t9800-git-p4-basic.sh
@@ -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
 '
-- 
1.8.0.276.gd9397fc
Previous: Pete WyckoffNext: Pete Wyckoff
Message 5 of 7 in “git p4 error handling”
  1. 0/6 git p4 error handlingPete Wyckoff, Nov 23, 2012
  2. 1/6 git p4: catch p4 describe errorsPete Wyckoff, Nov 23, 2012
  3. 2/6 git p4: handle servers without move supportPete Wyckoff, Nov 23, 2012
  4. 3/6 git p4: catch p4 errors when streaming file contentsPete Wyckoff, Nov 23, 2012
  5. 4/6 git p4 test: display unresolvable host errorPete Wyckoff, Nov 23, 2012
  6. 5/6 git p4: fix labelDetails typo in exceptionPete Wyckoff, Nov 23, 2012
  7. 6/6 git p4: remove unneeded cmd initializationPete Wyckoff, Nov 23, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.