mirror of https://github.com/k3s-io/k3s
api/endpoints/util: Add some IPv6 address testcases
Signed-off-by: Thomas Graf <tgraf@suug.ch>pull/6/head
parent
865d233aba
commit
44eaf33056
|
@ -66,6 +66,16 @@ func TestPackSubsets(t *testing.T) {
|
||||||
Addresses: []api.EndpointAddress{{IP: "1.2.3.4"}},
|
Addresses: []api.EndpointAddress{{IP: "1.2.3.4"}},
|
||||||
Ports: []api.EndpointPort{{Port: 111}},
|
Ports: []api.EndpointPort{{Port: 111}},
|
||||||
}},
|
}},
|
||||||
|
}, {
|
||||||
|
name: "one set, one ip, one port (IPv6)",
|
||||||
|
given: []api.EndpointSubset{{
|
||||||
|
Addresses: []api.EndpointAddress{{IP: "beef::1:2:3:4"}},
|
||||||
|
Ports: []api.EndpointPort{{Port: 111}},
|
||||||
|
}},
|
||||||
|
expect: []api.EndpointSubset{{
|
||||||
|
Addresses: []api.EndpointAddress{{IP: "beef::1:2:3:4"}},
|
||||||
|
Ports: []api.EndpointPort{{Port: 111}},
|
||||||
|
}},
|
||||||
}, {
|
}, {
|
||||||
name: "one set, one notReady ip, one port",
|
name: "one set, one notReady ip, one port",
|
||||||
given: []api.EndpointSubset{{
|
given: []api.EndpointSubset{{
|
||||||
|
@ -169,6 +179,16 @@ func TestPackSubsets(t *testing.T) {
|
||||||
Addresses: []api.EndpointAddress{{IP: "1.2.3.4"}},
|
Addresses: []api.EndpointAddress{{IP: "1.2.3.4"}},
|
||||||
Ports: []api.EndpointPort{{Port: 111}},
|
Ports: []api.EndpointPort{{Port: 111}},
|
||||||
}},
|
}},
|
||||||
|
}, {
|
||||||
|
name: "one set, dup ips, one port (IPv6)",
|
||||||
|
given: []api.EndpointSubset{{
|
||||||
|
Addresses: []api.EndpointAddress{{IP: "beef::1"}, {IP: "beef::1"}},
|
||||||
|
Ports: []api.EndpointPort{{Port: 111}},
|
||||||
|
}},
|
||||||
|
expect: []api.EndpointSubset{{
|
||||||
|
Addresses: []api.EndpointAddress{{IP: "beef::1"}},
|
||||||
|
Ports: []api.EndpointPort{{Port: 111}},
|
||||||
|
}},
|
||||||
}, {
|
}, {
|
||||||
name: "one set, dup ips with target-refs, one port",
|
name: "one set, dup ips with target-refs, one port",
|
||||||
given: []api.EndpointSubset{{
|
given: []api.EndpointSubset{{
|
||||||
|
|
Loading…
Reference in New Issue