mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-13 21:25:09 +00:00
Implement multi-port Endpoints
This is a part of multi-port services.
This commit is contained in:
@@ -250,8 +250,11 @@ var _ = Describe("Services", func() {
|
||||
func validateIPsOrFail(c *client.Client, ns string, expectedPort int, expectedEndpoints []string, endpoints *api.Endpoints) {
|
||||
ips := util.StringSet{}
|
||||
for _, ep := range endpoints.Endpoints {
|
||||
if ep.Port != expectedPort {
|
||||
Fail(fmt.Sprintf("invalid port, expected %d, got %d", expectedPort, ep.Port))
|
||||
if len(ep.Ports) == 0 {
|
||||
Fail(fmt.Sprintf("invalid endpoint, no ports"))
|
||||
}
|
||||
if ep.Ports[0].Port != expectedPort {
|
||||
Fail(fmt.Sprintf("invalid port, expected %d, got %d", expectedPort, ep.Ports[0].Port))
|
||||
}
|
||||
ips.Insert(ep.IP)
|
||||
}
|
||||
|
Reference in New Issue
Block a user