(t *testing.T)
| 1066 | } |
| 1067 | |
| 1068 | func TestSyncDoesntUpdateModtime(t *testing.T) { |
| 1069 | ctx := context.Background() |
| 1070 | r := fstest.NewRun(t) |
| 1071 | if fs.GetModifyWindow(ctx, r.Fremote) == fs.ModTimeNotSupported { |
| 1072 | t.Skip("Can't run this test on fs which doesn't support mod time") |
| 1073 | } |
| 1074 | |
| 1075 | file1 := r.WriteFile("foo", "foo", t2) |
| 1076 | file2 := r.WriteObject(ctx, "foo", "bar", t1) |
| 1077 | |
| 1078 | r.CheckLocalItems(t, file1) |
| 1079 | r.CheckRemoteItems(t, file2) |
| 1080 | |
| 1081 | accounting.GlobalStats().ResetCounters() |
| 1082 | ctx = predictDstFromLogger(ctx) |
| 1083 | err := Sync(ctx, r.Fremote, r.Flocal, false) |
| 1084 | require.NoError(t, err) |
| 1085 | testLoggerVsLsf(ctx, r.Fremote, r.Flocal, operations.GetLoggerOpt(ctx).JSON, t) |
| 1086 | |
| 1087 | r.CheckLocalItems(t, file1) |
| 1088 | r.CheckRemoteItems(t, file1) |
| 1089 | |
| 1090 | // We should have transferred exactly one file, not set the mod time |
| 1091 | assert.Equal(t, toyFileTransfers(r), accounting.GlobalStats().GetTransfers()) |
| 1092 | } |
| 1093 | |
| 1094 | func TestSyncAfterAddingAFile(t *testing.T) { |
| 1095 | ctx := context.Background() |
nothing calls this directly
no test coverage detected
searching dependent graphs…