| 1 | From: Shengjing Zhu <[email protected]> |
| 2 | Date: Tue, 18 Jul 2023 12:43:38 +0800 |
| 3 | Subject: Disable network tests |
| 4 | |
| 5 | Forwarded: not-needed |
| 6 | Last-Update: 2024-12-01 |
| 7 | --- |
| 8 | ping_test.go | 6 ++++++ |
| 9 | 1 file changed, 6 insertions(+) |
| 10 | |
| 11 | diff --git a/ping_test.go b/ping_test.go |
| 12 | index ef93196..a67c1e8 100644 |
| 13 | --- a/ping_test.go |
| 14 | +++ b/ping_test.go |
| 15 | @@ -234,6 +234,7 @@ func TestProcessPacket_PacketTooSmall(t *testing.T) { |
| 16 | } |
| 17 | |
| 18 | func TestNewPingerValid(t *testing.T) { |
| 19 | + t.Skip("Skipping network test") |
| 20 | p := New("www.google.com") |
| 21 | err := p.Resolve() |
| 22 | AssertNoError(t, err) |
| 23 | @@ -337,6 +338,7 @@ func TestNewPingerValid(t *testing.T) { |
| 24 | } |
| 25 | |
| 26 | func TestNewPingerInvalid(t *testing.T) { |
| 27 | + t.Skip("Skipping network test") |
| 28 | _, err := NewPinger("127.0.0.0.1") |
| 29 | AssertError(t, err, "127.0.0.0.1") |
| 30 | |
| 31 | @@ -355,6 +357,7 @@ func TestNewPingerInvalid(t *testing.T) { |
| 32 | } |
| 33 | |
| 34 | func TestSetIPAddr(t *testing.T) { |
| 35 | + t.Skip("Skipping network test") |
| 36 | googleaddr, err := net.ResolveIPAddr("ip", "www.google.com") |
| 37 | if err != nil { |
| 38 | t.Fatal("Can't resolve www.google.com, can't run tests") |
| 39 | @@ -479,6 +482,7 @@ func TestStatisticsZeroDivision(t *testing.T) { |
| 40 | } |
| 41 | |
| 42 | func TestSetInterfaceName(t *testing.T) { |
| 43 | + t.Skip("Skipping network test") |
| 44 | pinger := New("localhost") |
| 45 | pinger.Count = 1 |
| 46 | pinger.Timeout = time.Second |
| 47 | @@ -499,6 +503,7 @@ func TestSetInterfaceName(t *testing.T) { |
| 48 | } |
| 49 | |
| 50 | func TestSetSource(t *testing.T) { |
| 51 | + t.Skip("Skipping network test") |
| 52 | pinger := New("localhost") |
| 53 | pinger.Count = 1 |
| 54 | pinger.Timeout = time.Second |
| 55 | @@ -871,6 +876,7 @@ func TestRunWithBackgroundContext(t *testing.T) { |
| 56 | } |
| 57 | |
| 58 | func TestSetResolveTimeout(t *testing.T) { |
| 59 | + t.Skip("Skipping network test") |
| 60 | p := New("www.google.com") |
| 61 | p.Count = 3 |
| 62 | p.Timeout = 5 * time.Second |