fix typo in predicates_test.go

pull/58/head
zhangmingld 2018-10-26 09:59:40 +08:00
parent 0ba00ec3a3
commit cbfaf3856f
1 changed files with 21 additions and 21 deletions

View File

@ -2368,7 +2368,7 @@ func TestInterPodAffinity(t *testing.T) {
pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabel}}},
node: &node1,
fits: false,
name: "satisfies the PodAffinity but doesn't satisfies the PodAntiAffinity with the existing pod",
name: "satisfies the PodAffinity but doesn't satisfy the PodAntiAffinity with the existing pod",
expectFailureReasons: []algorithm.PredicateFailureReason{ErrPodAffinityNotMatch, ErrPodAntiAffinityRulesNotMatch},
},
{
@ -2441,7 +2441,7 @@ func TestInterPodAffinity(t *testing.T) {
},
node: &node1,
fits: false,
name: "satisfies the PodAffinity and PodAntiAffinity but doesn't satisfies PodAntiAffinity symmetry with the existing pod",
name: "satisfies the PodAffinity and PodAntiAffinity but doesn't satisfy PodAntiAffinity symmetry with the existing pod",
expectFailureReasons: []algorithm.PredicateFailureReason{ErrPodAffinityNotMatch, ErrExistingPodsAntiAffinityRulesNotMatch},
},
{
@ -2984,7 +2984,7 @@ func TestInterPodAffinityWithMultipleNodes(t *testing.T) {
"machine3": false,
},
nodesExpectAffinityFailureReasons: [][]algorithm.PredicateFailureReason{nil, nil, {ErrPodAffinityNotMatch, ErrPodAffinityRulesNotMatch}},
name: "A pod can be scheduled onto all the nodes that have the same topology key & label value with one of them has an existing pod that match the affinity rules",
name: "A pod can be scheduled onto all the nodes that have the same topology key & label value with one of them has an existing pod that matches the affinity rules",
},
{
pod: &v1.Pod{
@ -3037,7 +3037,7 @@ func TestInterPodAffinityWithMultipleNodes(t *testing.T) {
"nodeA": false,
"nodeB": true,
},
name: "NodeA and nodeB have same topologyKey and label value. NodeA does not satisfy node affinity rule, but has an existing pod that match the inter pod affinity rule. The pod can be scheduled onto nodeB.",
name: "NodeA and nodeB have same topologyKey and label value. NodeA does not satisfy node affinity rule, but has an existing pod that matches the inter pod affinity rule. The pod can be scheduled onto nodeB.",
},
{
pod: &v1.Pod{
@ -3091,7 +3091,7 @@ func TestInterPodAffinityWithMultipleNodes(t *testing.T) {
"nodeB": true,
},
name: "The affinity rule is to schedule all of the pods of this collection to the same zone. The first pod of the collection " +
"should not be blocked from being scheduled onto any node, even there's no existing pod that match the rule anywhere.",
"should not be blocked from being scheduled onto any node, even there's no existing pod that matches the rule anywhere.",
},
{
pod: &v1.Pod{
@ -3128,7 +3128,7 @@ func TestInterPodAffinityWithMultipleNodes(t *testing.T) {
"nodeA": false,
"nodeB": false,
},
name: "NodeA and nodeB have same topologyKey and label value. NodeA has an existing pod that match the inter pod affinity rule. The pod can not be scheduled onto nodeA and nodeB.",
name: "NodeA and nodeB have same topologyKey and label value. NodeA has an existing pod that matches the inter pod affinity rule. The pod can not be scheduled onto nodeA and nodeB.",
},
{
pod: &v1.Pod{
@ -3219,7 +3219,7 @@ func TestInterPodAffinityWithMultipleNodes(t *testing.T) {
"nodeB": false,
"nodeC": true,
},
name: "NodeA and nodeB have same topologyKey and label value. NodeA has an existing pod that match the inter pod affinity rule. The pod can not be scheduled onto nodeA and nodeB but can be scheduled onto nodeC",
name: "NodeA and nodeB have same topologyKey and label value. NodeA has an existing pod that matches the inter pod affinity rule. The pod can not be scheduled onto nodeA and nodeB but can be scheduled onto nodeC",
},
{
pod: &v1.Pod{
@ -3289,7 +3289,7 @@ func TestInterPodAffinityWithMultipleNodes(t *testing.T) {
"nodeC": false,
"nodeD": true,
},
name: "NodeA and nodeB have same topologyKey and label value. NodeA has an existing pod that match the inter pod affinity rule. NodeC has an existing pod that match the inter pod affinity rule. The pod can not be scheduled onto nodeA, nodeB and nodeC but can be schedulerd onto nodeD",
name: "NodeA and nodeB have same topologyKey and label value. NodeA has an existing pod that matches the inter pod affinity rule. NodeC has an existing pod that match the inter pod affinity rule. The pod can not be scheduled onto nodeA, nodeB and nodeC but can be schedulerd onto nodeD",
nometa: true,
},
{
@ -3367,7 +3367,7 @@ func TestInterPodAffinityWithMultipleNodes(t *testing.T) {
"nodeB": false,
"nodeC": true,
},
name: "NodeA and nodeB have same topologyKey and label value. NodeA has an existing pod that match the inter pod affinity rule. The pod can not be scheduled onto nodeA, nodeB, but can be scheduled onto nodeC (NodeC has an existing pod that match the inter pod affinity rule but in different namespace)",
name: "NodeA and nodeB have same topologyKey and label value. NodeA has an existing pod that matches the inter pod affinity rule. The pod can not be scheduled onto nodeA, nodeB, but can be scheduled onto nodeC (NodeC has an existing pod that match the inter pod affinity rule but in different namespace)",
},
{
pod: &v1.Pod{
@ -3626,7 +3626,7 @@ func TestInterPodAffinityWithMultipleNodes(t *testing.T) {
"nodeA": false,
"nodeB": true,
},
name: "Test existing pod's anti-affinity: only when labelSelector and topologyKey both matches, it's counted as a single term match - case when one term has invalid topologyKey",
name: "Test existing pod's anti-affinity: only when labelSelector and topologyKey both match, it's counted as a single term match - case when one term has invalid topologyKey",
},
{
pod: &v1.Pod{
@ -3680,7 +3680,7 @@ func TestInterPodAffinityWithMultipleNodes(t *testing.T) {
"nodeA": false,
"nodeB": true,
},
name: "Test incoming pod's anti-affinity: only when labelSelector and topologyKey both matches, it's counted as a single term match - case when one term has invalid topologyKey",
name: "Test incoming pod's anti-affinity: only when labelSelector and topologyKey both match, it's counted as a single term match - case when one term has invalid topologyKey",
},
{
pod: &v1.Pod{
@ -3733,7 +3733,7 @@ func TestInterPodAffinityWithMultipleNodes(t *testing.T) {
"nodeA": false,
"nodeB": false,
},
name: "Test existing pod's anti-affinity: only when labelSelector and topologyKey both matches, it's counted as a single term match - case when all terms have valid topologyKey",
name: "Test existing pod's anti-affinity: only when labelSelector and topologyKey both match, it's counted as a single term match - case when all terms have valid topologyKey",
},
{
pod: &v1.Pod{
@ -3788,7 +3788,7 @@ func TestInterPodAffinityWithMultipleNodes(t *testing.T) {
"nodeA": false,
"nodeB": false,
},
name: "Test incoming pod's anti-affinity: only when labelSelector and topologyKey both matches, it's counted as a single term match - case when all terms have valid topologyKey",
name: "Test incoming pod's anti-affinity: only when labelSelector and topologyKey both match, it's counted as a single term match - case when all terms have valid topologyKey",
},
{
pod: &v1.Pod{
@ -3931,7 +3931,7 @@ func TestInterPodAffinityWithMultipleNodes(t *testing.T) {
"nodeA": true,
"nodeB": true,
},
name: "Test incoming pod's affinity: firstly check if all affinityTerms matches, and then check if all topologyKeys match",
name: "Test incoming pod's affinity: firstly check if all affinityTerms match, and then check if all topologyKeys match",
},
{
pod: &v1.Pod{
@ -3992,7 +3992,7 @@ func TestInterPodAffinityWithMultipleNodes(t *testing.T) {
"nodeA": false,
"nodeB": false,
},
name: "Test incoming pod's affinity: firstly check if all affinityTerms matches, and then check if all topologyKeys match, and the match logic should be satified on the same pod",
name: "Test incoming pod's affinity: firstly check if all affinityTerms match, and then check if all topologyKeys match, and the match logic should be satified on the same pod",
},
}
@ -4072,7 +4072,7 @@ func TestPodToleratesTaints(t *testing.T) {
},
},
fits: false,
name: "a pod having no tolerations can't be scheduled onto a node with nonempty taints",
name: "A pod having no tolerations can't be scheduled onto a node with nonempty taints",
},
{
pod: &v1.Pod{
@ -4090,7 +4090,7 @@ func TestPodToleratesTaints(t *testing.T) {
},
},
fits: true,
name: "a pod which can be scheduled on a dedicated node assigned to user1 with effect NoSchedule",
name: "A pod which can be scheduled on a dedicated node assigned to user1 with effect NoSchedule",
},
{
pod: &v1.Pod{
@ -4108,7 +4108,7 @@ func TestPodToleratesTaints(t *testing.T) {
},
},
fits: false,
name: "a pod which can't be scheduled on a dedicated node assigned to user2 with effect NoSchedule",
name: "A pod which can't be scheduled on a dedicated node assigned to user2 with effect NoSchedule",
},
{
pod: &v1.Pod{
@ -4126,7 +4126,7 @@ func TestPodToleratesTaints(t *testing.T) {
},
},
fits: true,
name: "a pod can be scheduled onto the node, with a toleration uses operator Exists that tolerates the taints on the node",
name: "A pod can be scheduled onto the node, with a toleration uses operator Exists that tolerates the taints on the node",
},
{
pod: &v1.Pod{
@ -4150,7 +4150,7 @@ func TestPodToleratesTaints(t *testing.T) {
},
},
fits: true,
name: "a pod has multiple tolerations, node has multiple taints, all the taints are tolerated, pod can be scheduled onto the node",
name: "A pod has multiple tolerations, node has multiple taints, all the taints are tolerated, pod can be scheduled onto the node",
},
{
pod: &v1.Pod{
@ -4170,7 +4170,7 @@ func TestPodToleratesTaints(t *testing.T) {
},
},
fits: false,
name: "a pod has a toleration that keys and values match the taint on the node, but (non-empty) effect doesn't match, " +
name: "A pod has a toleration that keys and values match the taint on the node, but (non-empty) effect doesn't match, " +
"can't be scheduled onto the node",
},
{