1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-15 11:05:09 +00:00

refactor(analyze): remove unused volume mount helper

This commit is contained in:
tw93
2026-02-10 16:33:10 +08:00
parent 1a559f8563
commit 878dfa1bde
2 changed files with 0 additions and 51 deletions

View File

@@ -329,29 +329,6 @@ func TestIsCleanableDir(t *testing.T) {
}
}
func TestHasUsefulVolumeMounts(t *testing.T) {
root := t.TempDir()
if hasUsefulVolumeMounts(root) {
t.Fatalf("empty directory should not report useful mounts")
}
hidden := filepath.Join(root, ".hidden")
if err := os.Mkdir(hidden, 0o755); err != nil {
t.Fatalf("create hidden dir: %v", err)
}
if hasUsefulVolumeMounts(root) {
t.Fatalf("hidden entries should not count as useful mounts")
}
mount := filepath.Join(root, "ExternalDrive")
if err := os.Mkdir(mount, 0o755); err != nil {
t.Fatalf("create mount dir: %v", err)
}
if !hasUsefulVolumeMounts(root) {
t.Fatalf("expected useful mount when real directory exists")
}
}
func TestLoadCacheExpiresWhenDirectoryChanges(t *testing.T) {
home := t.TempDir()
t.Setenv("HOME", home)