summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/prometheus/procfs/ipvs_test.go
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2017-05-17 16:51:25 -0400
committerGitHub <noreply@github.com>2017-05-17 16:51:25 -0400
commitd103ed6ca97ca5a2669f6cf5fe4b3d2a9c945f26 (patch)
treedbde13123c6add150448f7b75753ac022d862475 /vendor/github.com/prometheus/procfs/ipvs_test.go
parentcd23b8139a9463b67e3096744321f6f4eb0ca40a (diff)
downloadchat-d103ed6ca97ca5a2669f6cf5fe4b3d2a9c945f26.tar.gz
chat-d103ed6ca97ca5a2669f6cf5fe4b3d2a9c945f26.tar.bz2
chat-d103ed6ca97ca5a2669f6cf5fe4b3d2a9c945f26.zip
Upgrading server dependancies (#6431)
Diffstat (limited to 'vendor/github.com/prometheus/procfs/ipvs_test.go')
-rw-r--r--vendor/github.com/prometheus/procfs/ipvs_test.go51
1 files changed, 49 insertions, 2 deletions
diff --git a/vendor/github.com/prometheus/procfs/ipvs_test.go b/vendor/github.com/prometheus/procfs/ipvs_test.go
index 796ee5b88..13ceab80e 100644
--- a/vendor/github.com/prometheus/procfs/ipvs_test.go
+++ b/vendor/github.com/prometheus/procfs/ipvs_test.go
@@ -94,6 +94,54 @@ var (
ActiveConn: 0,
InactConn: 0,
},
+ {
+ LocalAddress: net.ParseIP("2620::1"),
+ LocalPort: 80,
+ RemoteAddress: net.ParseIP("2620::2"),
+ RemotePort: 80,
+ Proto: "TCP",
+ Weight: 1,
+ ActiveConn: 0,
+ InactConn: 0,
+ },
+ {
+ LocalAddress: net.ParseIP("2620::1"),
+ LocalPort: 80,
+ RemoteAddress: net.ParseIP("2620::3"),
+ RemotePort: 80,
+ Proto: "TCP",
+ Weight: 1,
+ ActiveConn: 0,
+ InactConn: 0,
+ },
+ {
+ LocalAddress: net.ParseIP("2620::1"),
+ LocalPort: 80,
+ RemoteAddress: net.ParseIP("2620::4"),
+ RemotePort: 80,
+ Proto: "TCP",
+ Weight: 1,
+ ActiveConn: 1,
+ InactConn: 1,
+ },
+ {
+ LocalMark: "10001000",
+ RemoteAddress: net.ParseIP("192.168.50.26"),
+ RemotePort: 3306,
+ Proto: "FWM",
+ Weight: 0,
+ ActiveConn: 0,
+ InactConn: 1,
+ },
+ {
+ LocalMark: "10001000",
+ RemoteAddress: net.ParseIP("192.168.50.21"),
+ RemotePort: 3306,
+ Proto: "FWM",
+ Weight: 0,
+ ActiveConn: 0,
+ InactConn: 2,
+ },
}
)
@@ -142,14 +190,13 @@ func TestParseIPPortIPv6(t *testing.T) {
ip := net.ParseIP("dead:beef::1")
port := uint16(8080)
- gotIP, gotPort, err := parseIPPort("DEADBEEF000000000000000000000001:1F90")
+ gotIP, gotPort, err := parseIPPort("[DEAD:BEEF:0000:0000:0000:0000:0000:0001]:1F90")
if err != nil {
t.Fatal(err)
}
if !(gotIP.Equal(ip) && port == gotPort) {
t.Errorf("want %s:%d, have %s:%d", ip, port, gotIP, gotPort)
}
-
}
func TestIPVSBackendStatus(t *testing.T) {