MCPcopy Index your code
hub / github.com/kopia/kopia / TestStreamingFileModTime

Function TestStreamingFileModTime

fs/virtualfs/virtualfs_test.go:78–85  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

76}
77
78func TestStreamingFileModTime(t *testing.T) {
79 data := []byte("data")
80 f1 := StreamingFileFromReader("f1", io.NopCloser(bytes.NewReader(data)))
81 mt := time.Date(2021, 1, 2, 3, 4, 5, 0, time.UTC)
82 f2 := StreamingFileWithModTimeFromReader("f2", mt, io.NopCloser(bytes.NewReader(data)))
83
84 assert.True(t, f1.ModTime().After(f2.ModTime()))
85}
86
87func TestStreamingFileGetReader(t *testing.T) {
88 // Create a temporary file with test data

Callers

nothing calls this directly

Calls 4

StreamingFileFromReaderFunction · 0.85
AfterMethod · 0.80
ModTimeMethod · 0.45

Tested by

no test coverage detected