vfs: fix integration test failures

In this commit

ceef78ce44 vfs: fix directory cache serving stale data

We added a new test which caused lots of integration test failures.

This fixes the problem by disabling the test unless the feature flag
DirModTimeUpdatesOnWrite is present on the remote.
This commit is contained in:
Nick Craig-Wood 2025-02-26 12:21:35 +00:00
parent b7f26937f1
commit 0010090d05
1 changed files with 6 additions and 2 deletions

View File

@ -658,10 +658,14 @@ func TestDirFileOpen(t *testing.T) {
} }
func TestDirEntryModTimeInvalidation(t *testing.T) { func TestDirEntryModTimeInvalidation(t *testing.T) {
if runtime.GOOS == "windows" { r, vfs := newTestVFS(t)
features := r.Fremote.Features()
if !features.DirModTimeUpdatesOnWrite {
t.Skip("Need DirModTimeUpdatesOnWrite")
}
if features.IsLocal && runtime.GOOS == "windows" {
t.Skip("dirent modtime is unreliable on Windows filesystems") t.Skip("dirent modtime is unreliable on Windows filesystems")
} }
r, vfs := newTestVFS(t)
// Needs to be less than 2x the wait time below, othewrwise the entry // Needs to be less than 2x the wait time below, othewrwise the entry
// gets cleared out before it had a chance to be updated. // gets cleared out before it had a chance to be updated.