File: 0001-Disable-network-tests.patch

package info (click to toggle)
golang-github-prometheus-community-pro-bing 0.6.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 316 kB
  • sloc: makefile: 30
file content (54 lines) | stat: -rw-r--r-- 1,504 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
From: Shengjing Zhu <zhsj@debian.org>
Date: Tue, 18 Jul 2023 12:43:38 +0800
Subject: Disable network tests

Forwarded: not-needed
Last-Update: 2024-12-01
---
 ping_test.go | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/ping_test.go b/ping_test.go
index 2b2ba9b..3c45cc7 100644
--- a/ping_test.go
+++ b/ping_test.go
@@ -234,6 +234,7 @@ func TestProcessPacket_PacketTooSmall(t *testing.T) {
 }
 
 func TestNewPingerValid(t *testing.T) {
+	t.Skip("Skipping network test")
 	p := New("www.google.com")
 	err := p.Resolve()
 	AssertNoError(t, err)
@@ -337,6 +338,7 @@ func TestNewPingerValid(t *testing.T) {
 }
 
 func TestNewPingerInvalid(t *testing.T) {
+	t.Skip("Skipping network test")
 	_, err := NewPinger("127.0.0.0.1")
 	AssertError(t, err, "127.0.0.0.1")
 
@@ -355,6 +357,7 @@ func TestNewPingerInvalid(t *testing.T) {
 }
 
 func TestSetIPAddr(t *testing.T) {
+	t.Skip("Skipping network test")
 	googleaddr, err := net.ResolveIPAddr("ip", "www.google.com")
 	if err != nil {
 		t.Fatal("Can't resolve www.google.com, can't run tests")
@@ -479,6 +482,7 @@ func TestStatisticsZeroDivision(t *testing.T) {
 }
 
 func TestSetInterfaceName(t *testing.T) {
+	t.Skip("Skipping network test")
 	pinger := New("localhost")
 	pinger.Count = 1
 	pinger.Timeout = time.Second
@@ -853,6 +857,7 @@ func TestRunWithBackgroundContext(t *testing.T) {
 }
 
 func TestSetResolveTimeout(t *testing.T) {
+	t.Skip("Skipping network test")
 	p := New("www.google.com")
 	p.Count = 3
 	p.Timeout = 5 * time.Second