forked from cerc-io/plugeth
p2p/nat: skip TestUPNP in non-CI environments if discover fails (#22877)
Fixes #21476
This commit is contained in:
parent
51b32cc7e4
commit
750115ff39
@ -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 {
|
||||
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)
|
||||
if upnp.service != "IGDv1-IP1" {
|
||||
|
Loading…
Reference in New Issue
Block a user