StatefulSet controller no longer attempts to mutate v1.PodSpec.Hostname or v1.PodSpec.Subdomain
This commit is contained in:
@@ -78,16 +78,6 @@ func TestIdentityMatches(t *testing.T) {
|
||||
if identityMatches(set, pod) {
|
||||
t.Error("identity matches for a Pod with the wrong namespace")
|
||||
}
|
||||
pod = newStatefulSetPod(set, 1)
|
||||
pod.Spec.Hostname = ""
|
||||
if identityMatches(set, pod) {
|
||||
t.Error("identity matches for a Pod with no hostname")
|
||||
}
|
||||
pod = newStatefulSetPod(set, 1)
|
||||
pod.Spec.Subdomain = ""
|
||||
if identityMatches(set, pod) {
|
||||
t.Error("identity matches for a Pod with no subdomain")
|
||||
}
|
||||
}
|
||||
|
||||
func TestStorageMatches(t *testing.T) {
|
||||
@@ -137,24 +127,6 @@ func TestUpdateIdentity(t *testing.T) {
|
||||
if !identityMatches(set, pod) {
|
||||
t.Error("updateIdentity failed to update the Pods namespace")
|
||||
}
|
||||
pod = newStatefulSetPod(set, 1)
|
||||
pod.Spec.Hostname = ""
|
||||
if identityMatches(set, pod) {
|
||||
t.Error("identity matches for a Pod with no hostname")
|
||||
}
|
||||
updateIdentity(set, pod)
|
||||
if !identityMatches(set, pod) {
|
||||
t.Error("updateIdentity failed to update the Pod's hostname")
|
||||
}
|
||||
pod = newStatefulSetPod(set, 1)
|
||||
pod.Spec.Subdomain = ""
|
||||
if identityMatches(set, pod) {
|
||||
t.Error("identity matches for a Pod with no subdomain")
|
||||
}
|
||||
updateIdentity(set, pod)
|
||||
if !identityMatches(set, pod) {
|
||||
t.Error("updateIdentity failed to update the Pod's subdomain")
|
||||
}
|
||||
}
|
||||
|
||||
func TestUpdateStorage(t *testing.T) {
|
||||
|
Reference in New Issue
Block a user