sync: don't test reading metadata if we can't write it

This commit is contained in:
Nick Craig-Wood 2024-06-11 11:30:32 +01:00
parent a52e887ddd
commit 003f4531fe

View File

@ -152,10 +152,10 @@ func testCopyMetadata(t *testing.T, createEmptySrcDirs bool) {
r.CheckDirectoryModTimes(t, dirPath) r.CheckDirectoryModTimes(t, dirPath)
// Check that the metadata on the directory and file is correct // Check that the metadata on the directory and file is correct
if features.ReadMetadata { if features.WriteMetadata && features.ReadMetadata {
fstest.CheckEntryMetadata(ctx, t, r.Fremote, fstest.NewObject(ctx, t, r.Fremote, filePath), fileMetadata) fstest.CheckEntryMetadata(ctx, t, r.Fremote, fstest.NewObject(ctx, t, r.Fremote, filePath), fileMetadata)
} }
if features.ReadDirMetadata { if features.WriteDirMetadata && features.ReadDirMetadata {
fstest.CheckEntryMetadata(ctx, t, r.Fremote, fstest.NewDirectory(ctx, t, r.Fremote, dirPath), dirMetadata) fstest.CheckEntryMetadata(ctx, t, r.Fremote, fstest.NewDirectory(ctx, t, r.Fremote, dirPath), dirMetadata)
} }
if !createEmptySrcDirs { if !createEmptySrcDirs {