MCPcopy Create free account
hub / github.com/aws/aws-node-termination-handler / TestUptimeFromFileBadData

Function TestUptimeFromFileBadData

pkg/uptime/common_test.go:41–49  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

39}
40
41func TestUptimeFromFileBadData(t *testing.T) {
42 d1 := []byte("Something not time")
43 err := os.WriteFile(testFile, d1, 0644)
44 h.Ok(t, err)
45
46 _, err = UptimeFromFile(testFile)
47 _ = os.Remove(testFile)
48 h.Assert(t, err != nil, "Failed to return error for int64 parse")
49}

Callers

nothing calls this directly

Calls 1

UptimeFromFileFunction · 0.85

Tested by

no test coverage detected