Setup e2e test for no admit

This commit is contained in:
Harry Zhang
2016-08-29 10:02:53 +08:00
parent c735921b6f
commit c2cf5bbaf6
5 changed files with 167 additions and 2 deletions

View File

@@ -1093,7 +1093,7 @@ func PodToleratesNodeTaints(pod *api.Pod, meta interface{}, nodeInfo *schedulerc
// tolerationsToleratesTaints checks if given tolerations can live with given taints.
// It returns:
// 1. whether tolerated or not;
// 2. whether kubelet should be aware of (1).
// 2. whether kubelet should be aware if it's unfit.
func tolerationsToleratesTaints(tolerations []api.Toleration, taints []api.Taint) (bool, bool) {
// If the taint list is nil/empty, it is tolerated by all tolerations by default.
if len(taints) == 0 {

View File

@@ -2886,7 +2886,7 @@ func TestPodToleratesTaints(t *testing.T) {
},
fits: false,
expectedFailureReasons: []algorithm.PredicateFailureReason{newErrTaintsTolerationsNotMatch(true)},
test: "node should aware that a pod which can't be scheduled or start on a dedicated node assgined to user2 with effect NoScheduleNoAdmit",
test: "node should aware that a pod which can't be scheduled or start on a dedicated node assigned to user2 with effect NoScheduleNoAdmit",
},
}