MCPcopy Index your code
hub / github.com/aws/aws-node-termination-handler / TestIsUnschedulableSuccess

Function TestIsUnschedulableSuccess

pkg/node/node_test.go:201–214  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

199}
200
201func TestIsUnschedulableSuccess(t *testing.T) {
202 client := fake.NewSimpleClientset()
203 _, err := client.CoreV1().Nodes().Create(
204 context.Background(),
205 &v1.Node{
206 ObjectMeta: metav1.ObjectMeta{Name: nodeName},
207 },
208 metav1.CreateOptions{})
209 h.Ok(t, err)
210 tNode := getNode(t, getDrainHelper(client))
211 value, err := tNode.IsUnschedulable(nodeName)
212 h.Ok(t, err)
213 h.Equals(t, false, value)
214}
215
216func TestIsUnschedulableFailure(t *testing.T) {
217 tNode := getNode(t, getDrainHelper(fake.NewSimpleClientset()))

Callers

nothing calls this directly

Calls 3

IsUnschedulableMethod · 0.80
getNodeFunction · 0.70
getDrainHelperFunction · 0.70

Tested by

no test coverage detected