MCPcopy
hub / github.com/rclone/rclone / Check

Method Check

fstest/fstest.go:148–152  ·  view source on GitHub ↗

Check checks all the attributes of the object are correct

(t *testing.T, obj fs.Object, precision time.Duration)

Source from the content-addressed store, hash-verified

146
147// Check checks all the attributes of the object are correct
148func (i *Item) Check(t *testing.T, obj fs.Object, precision time.Duration) {
149 i.CheckHashes(t, obj)
150 assert.Equal(t, i.Size, obj.Size(), fmt.Sprintf("%s: size incorrect file=%d vs obj=%d", i.Path, i.Size, obj.Size()))
151 i.CheckModTime(t, obj, obj.ModTime(context.Background()), precision)
152}
153
154// Normalize runs a utf8 normalization on the string if running on OS
155// X. This is because OS X denormalizes file names it writes to the

Callers 7

testNoChunkMethod · 0.95
RunFunction · 0.95
WhichEqualMethod · 0.45
FindMethod · 0.45
PutTestContentsMetadataFunction · 0.45
testPutLargeFunction · 0.45
checkIdenticalMethod · 0.45

Calls 5

CheckHashesMethod · 0.95
CheckModTimeMethod · 0.95
SizeMethod · 0.65
ModTimeMethod · 0.65
EqualMethod · 0.45

Tested by 1

testNoChunkMethod · 0.76