Skip to content

Commit

Permalink
p2p/nat: skip TestUPNP in non-CI envs if discover fails
Browse files Browse the repository at this point in the history
ethereum/go-ethereum#21476

Date: 2021-05-13 12:33:01-05:00
Signed-off-by: meows <b5c6@protonmail.com>
  • Loading branch information
meowsbits committed May 13, 2021
1 parent b8f953c commit 9448508
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion p2p/nat/natupnp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"io"
"net"
"net/http"
"os"
"runtime"
"strings"
"testing"
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 9448508

Please sign in to comment.