MCPcopy
hub / github.com/rclone/rclone / TestTouchUpdateTimestampWithCFlag

Function TestTouchUpdateTimestampWithCFlag

cmd/touch/touch_test.go:83–97  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

81}
82
83func TestTouchUpdateTimestampWithCFlag(t *testing.T) {
84 r := fstest.NewRun(t)
85
86 srcFileName := "a"
87 content := "aaa"
88 file1 := r.WriteObject(context.Background(), srcFileName, content, t1)
89 r.CheckRemoteItems(t, file1)
90
91 notCreateNewFile = true
92 timeAsArgument = "121212"
93 err := Touch(context.Background(), r.Fremote, "a")
94 require.NoError(t, err)
95 checkFile(t, r.Fremote, srcFileName, content)
96 notCreateNewFile = false
97}
98
99func TestTouchCreateMultipleDirAndFile(t *testing.T) {
100 r := fstest.NewRun(t)

Callers

nothing calls this directly

Calls 5

WriteObjectMethod · 0.95
CheckRemoteItemsMethod · 0.95
NewRunFunction · 0.92
TouchFunction · 0.85
checkFileFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…