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

Function TestGetEventIDNoLabelFailure

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

Source from the content-addressed store, hash-verified

272}
273
274func TestGetEventIDNoLabelFailure(t *testing.T) {
275 client := fake.NewSimpleClientset()
276 _, err := client.CoreV1().Nodes().Create(
277 context.Background(),
278 &v1.Node{
279 ObjectMeta: metav1.ObjectMeta{Name: nodeName},
280 },
281 metav1.CreateOptions{})
282 h.Ok(t, err)
283 tNode := getNode(t, getDrainHelper(client))
284 _, err = tNode.GetEventID(nodeName)
285 h.Assert(t, err != nil, "Failed to return error on GetEventID failed to find label")
286}
287
288func TestMarkForUncordonAfterRebootAddActionLabelFailure(t *testing.T) {
289 tNode := getNode(t, getDrainHelper(fake.NewSimpleClientset()))

Callers

nothing calls this directly

Calls 3

GetEventIDMethod · 0.80
getNodeFunction · 0.70
getDrainHelperFunction · 0.70

Tested by

no test coverage detected