MCPcopy
hub / github.com/rclone/rclone / fileCheckContents

Function fileCheckContents

vfs/file_test.go:166–175  ·  view source on GitHub ↗
(t *testing.T, file *File)

Source from the content-addressed store, hash-verified

164}
165
166func fileCheckContents(t *testing.T, file *File) {
167 fd, err := file.Open(os.O_RDONLY)
168 require.NoError(t, err)
169
170 contents, err := io.ReadAll(fd)
171 require.NoError(t, err)
172 assert.Equal(t, "file1 contents", string(contents))
173
174 require.NoError(t, fd.Close())
175}
176
177func TestFileOpenRead(t *testing.T) {
178 _, _, file, _ := fileCreate(t, vfscommon.CacheModeOff)

Callers 2

TestFileOpenReadFunction · 0.85
testFileRenameFunction · 0.85

Calls 3

OpenMethod · 0.65
CloseMethod · 0.65
EqualMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…