StatefulSet controller no longer attempts to mutate v1.PodSpec.Hostname or v1.PodSpec.Subdomain

This commit is contained in:
Kenneth Owens
2017-08-21 11:48:56 -07:00
parent baf2f85e73
commit a6473d82dc
3 changed files with 10 additions and 62 deletions

View File

@@ -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) {