// CreateNamespaceOrDie creates a namespace. func CreateNamespaceOrDie(c clientset.Interface, baseName string, t testing.TB) *v1.Namespace { … } // DeleteNamespaceOrDie deletes a namespace. func DeleteNamespaceOrDie(c clientset.Interface, ns *v1.Namespace, t testing.TB) { … } // Filter filters nodes in NodeList in place, removing nodes that do not // satisfy the given condition func Filter(nodeList *v1.NodeList, fn func(node v1.Node) bool) { … } // IsNodeSchedulable returns true if: // 1) doesn't have "unschedulable" field set // 2) it also returns true from IsNodeReady func IsNodeSchedulable(node *v1.Node) bool { … } // IsNodeReady returns true if: // 1) it's Ready condition is set to true // 2) doesn't have NetworkUnavailable condition set to true func IsNodeReady(node *v1.Node) bool { … } // IsConditionSetAsExpected returns a wantTrue value if the node has a match to the conditionType, otherwise returns an opposite value of the wantTrue with detailed logging. func IsConditionSetAsExpected(node *v1.Node, conditionType v1.NodeConditionType, wantTrue bool) bool { … } // IsConditionSetAsExpectedSilent returns a wantTrue value if the node has a match to the conditionType, otherwise returns an opposite value of the wantTrue. func IsConditionSetAsExpectedSilent(node *v1.Node, conditionType v1.NodeConditionType, wantTrue bool) bool { … } // isConditionUnset returns true if conditions of the given node do not have a match to the given conditionType, otherwise false. func isConditionUnset(node *v1.Node, conditionType v1.NodeConditionType) bool { … } // isNodeConditionSetAsExpected checks a node for a condition, and returns 'true' if the wanted value is the same as the condition value, useful for polling until a condition on a node is met. func isNodeConditionSetAsExpected(node *v1.Node, conditionType v1.NodeConditionType, wantTrue, silent bool) bool { … }