mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 23:47:50 +00:00
Headless Services: Adding option to specify None for PortalIP
This commit is contained in:
@@ -735,6 +735,7 @@ func TestCreate(t *testing.T) {
|
||||
&api.Service{
|
||||
Spec: api.ServiceSpec{
|
||||
Selector: map[string]string{"bar": "baz"},
|
||||
PortalIP: "None",
|
||||
Port: 6502,
|
||||
Protocol: "TCP",
|
||||
SessionAffinity: "None",
|
||||
@@ -744,5 +745,15 @@ func TestCreate(t *testing.T) {
|
||||
&api.Service{
|
||||
Spec: api.ServiceSpec{},
|
||||
},
|
||||
// invalid
|
||||
&api.Service{
|
||||
Spec: api.ServiceSpec{
|
||||
Selector: map[string]string{"bar": "baz"},
|
||||
Port: 6502,
|
||||
Protocol: "TCP",
|
||||
PortalIP: "invalid",
|
||||
SessionAffinity: "None",
|
||||
},
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user