From 94485083f3ad826fcc5e91fd6436f7513c129eac Mon Sep 17 00:00:00 2001 From: meows Date: Thu, 13 May 2021 12:33:01 -0500 Subject: [PATCH] p2p/nat: skip TestUPNP in non-CI envs if discover fails https://github.com/ethereum/go-ethereum/issues/21476 Date: 2021-05-13 12:33:01-05:00 Signed-off-by: meows --- p2p/nat/natupnp_test.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/p2p/nat/natupnp_test.go b/p2p/nat/natupnp_test.go index 836243e0ee..bcf6cee9a7 100644 --- a/p2p/nat/natupnp_test.go +++ b/p2p/nat/natupnp_test.go @@ -21,6 +21,7 @@ import ( "io" "net" "net/http" + "os" "runtime" "strings" "testing" @@ -162,7 +163,11 @@ func TestUPNP_DDWRT(t *testing.T) { // Attempt to discover the fake device. discovered := discoverUPnP() if discovered == nil { - t.Fatalf("not discovered") + if os.Getenv("CI") != "" { + t.Fatalf("not discovered") + } else { + t.Skipf("UPnP not discovered (known issue, see https://github.com/ethereum/go-ethereum/issues/21476)") + } } upnp, _ := discovered.(*upnp)