mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-06 07:57:35 +00:00
Part 1 of plural ports: Add protocol to Endpoints
This makes it easier to make the second step, which is moving endpoints to a struct instead of a string.
This commit is contained in:
@@ -102,3 +102,13 @@ func TestSetDefaultSecret(t *testing.T) {
|
||||
t.Errorf("Expected secret type %v, got %v", current.SecretTypeOpaque, s2.Type)
|
||||
}
|
||||
}
|
||||
|
||||
func TestSetDefaulEndpointsProtocol(t *testing.T) {
|
||||
in := ¤t.Endpoints{}
|
||||
obj := roundTrip(t, runtime.Object(in))
|
||||
out := obj.(*current.Endpoints)
|
||||
|
||||
if out.Protocol != current.ProtocolTCP {
|
||||
t.Errorf("Expected protocol %s, got %s", current.ProtocolTCP, out.Protocol)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user