Merge pull request #91735 from gpldirk/tps-comment

fix minor comment in podtopologyspread scoring test
This commit is contained in:
Kubernetes Prow Robot 2020-06-08 21:43:48 -07:00 committed by GitHub
commit de1a277185
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -233,7 +233,6 @@ func TestPodTopologySpreadScore(t *testing.T) {
// but node2 either i) doesn't have all required topologyKeys present, or ii) doesn't match // but node2 either i) doesn't have all required topologyKeys present, or ii) doesn't match
// incoming pod's nodeSelector/nodeAffinity // incoming pod's nodeSelector/nodeAffinity
{ {
// if there is only one candidate node, it should be scored to 10
name: "one constraint on node, no existing pods", name: "one constraint on node, no existing pods",
pod: st.MakePod().Name("p").Label("foo", ""). pod: st.MakePod().Name("p").Label("foo", "").
SpreadConstraint(1, v1.LabelHostname, v1.ScheduleAnyway, st.MakeLabelSelector().Exists("foo").Obj()). SpreadConstraint(1, v1.LabelHostname, v1.ScheduleAnyway, st.MakeLabelSelector().Exists("foo").Obj()).
@ -248,7 +247,7 @@ func TestPodTopologySpreadScore(t *testing.T) {
}, },
}, },
{ {
// if there is only one candidate node, it should be scored to 10 // if there is only one candidate node, it should be scored to 100
name: "one constraint on node, only one node is candidate", name: "one constraint on node, only one node is candidate",
pod: st.MakePod().Name("p").Label("foo", ""). pod: st.MakePod().Name("p").Label("foo", "").
SpreadConstraint(1, v1.LabelHostname, v1.ScheduleAnyway, st.MakeLabelSelector().Exists("foo").Obj()). SpreadConstraint(1, v1.LabelHostname, v1.ScheduleAnyway, st.MakeLabelSelector().Exists("foo").Obj()).