(t *testing.T)
| 941 | } |
| 942 | |
| 943 | func TestSyncIgnoreErrors(t *testing.T) { |
| 944 | ctx := context.Background() |
| 945 | ctx, ci := fs.AddConfig(ctx) |
| 946 | r := fstest.NewRun(t) |
| 947 | ci.IgnoreErrors = true |
| 948 | file1 := r.WriteFile("a/potato2", "------------------------------------------------------------", t1) |
| 949 | file2 := r.WriteObject(ctx, "b/potato", "SMALLER BUT SAME DATE", t2) |
| 950 | file3 := r.WriteBoth(ctx, "c/non empty space", "AhHa!", t2) |
| 951 | require.NoError(t, operations.Mkdir(ctx, r.Fremote, "d")) |
| 952 | |
| 953 | r.CheckLocalListing( |
| 954 | t, |
| 955 | []fstest.Item{ |
| 956 | file1, |
| 957 | file3, |
| 958 | }, |
| 959 | []string{ |
| 960 | "a", |
| 961 | "c", |
| 962 | }, |
| 963 | ) |
| 964 | r.CheckRemoteListing( |
| 965 | t, |
| 966 | []fstest.Item{ |
| 967 | file2, |
| 968 | file3, |
| 969 | }, |
| 970 | []string{ |
| 971 | "b", |
| 972 | "c", |
| 973 | "d", |
| 974 | }, |
| 975 | ) |
| 976 | |
| 977 | accounting.GlobalStats().ResetCounters() |
| 978 | ctx = predictDstFromLogger(ctx) |
| 979 | _ = fs.CountError(ctx, errors.New("boom")) |
| 980 | assert.NoError(t, Sync(ctx, r.Fremote, r.Flocal, false)) |
| 981 | testLoggerVsLsf(ctx, r.Fremote, r.Flocal, operations.GetLoggerOpt(ctx).JSON, t) |
| 982 | |
| 983 | r.CheckLocalListing( |
| 984 | t, |
| 985 | []fstest.Item{ |
| 986 | file1, |
| 987 | file3, |
| 988 | }, |
| 989 | []string{ |
| 990 | "a", |
| 991 | "c", |
| 992 | }, |
| 993 | ) |
| 994 | r.CheckRemoteListing( |
| 995 | t, |
| 996 | []fstest.Item{ |
| 997 | file1, |
| 998 | file3, |
| 999 | }, |
| 1000 | []string{ |
nothing calls this directly
no test coverage detected
searching dependent graphs…