MCPcopy Index your code
hub / github.com/containerd/containerd / dumpFileContent

Function dumpFileContent

integration/release_upgrade_linux_test.go:1046–1063  ·  view source on GitHub ↗

dumpFileContent dumps file content into t.Log.

(t *testing.T, filePath string)

Source from the content-addressed store, hash-verified

1044
1045// dumpFileContent dumps file content into t.Log.
1046func dumpFileContent(t *testing.T, filePath string) {
1047 f, err := os.Open(filePath)
1048 require.NoError(t, err)
1049 defer f.Close()
1050
1051 r := bufio.NewReader(f)
1052 for {
1053 line, err := r.ReadString('\n')
1054 switch err {
1055 case nil:
1056 t.Log(strings.TrimSuffix(line, "\n"))
1057 case io.EOF:
1058 return
1059 default:
1060 require.NoError(t, err)
1061 }
1062 }
1063}

Callers 5

TestIssue10467Function · 0.85
TestOOMEventMonitorFunction · 0.85
TestReload100PodsFunction · 0.85

Calls 3

LogMethod · 0.80
CloseMethod · 0.65
OpenMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…