Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1a004e8dbb |
@@ -32,9 +32,6 @@
|
|||||||
- a test fails when either walk cancellation check in `scan.go` is
|
- a test fails when either walk cancellation check in `scan.go` is
|
||||||
removed (2026-10-04, https://git.eeqj.de/sneak/sfdupes/issues/81)
|
removed (2026-10-04, https://git.eeqj.de/sneak/sfdupes/issues/81)
|
||||||
|
|
||||||
- test that `scan` refuses a database with another schema version
|
|
||||||
(2026-10-04, https://git.eeqj.de/sneak/sfdupes/issues/64)
|
|
||||||
|
|
||||||
- correct four inaccurate comments in `cancel_test.go` and rename
|
- correct four inaccurate comments in `cancel_test.go` and rename
|
||||||
`walkCancelInFlightDirs` to `walkCancelInFlightFiles` (2026-10-04,
|
`walkCancelInFlightDirs` to `walkCancelInFlightFiles` (2026-10-04,
|
||||||
https://git.eeqj.de/sneak/sfdupes/issues/33)
|
https://git.eeqj.de/sneak/sfdupes/issues/33)
|
||||||
|
|||||||
+2
-9
@@ -157,11 +157,9 @@ func TestOpenReportDatabaseMissing(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestOpenDatabaseVersionMismatch(t *testing.T) {
|
func TestOpenReportDatabaseVersionMismatch(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
|
|
||||||
// A database stamped with a schema version other than 0 and
|
|
||||||
// schemaVersion. report, trees and scan must all refuse it.
|
|
||||||
path := testDBPath(t)
|
path := testDBPath(t)
|
||||||
|
|
||||||
db, err := openScanDatabase(t.Context(), path)
|
db, err := openScanDatabase(t.Context(), path)
|
||||||
@@ -178,12 +176,7 @@ func TestOpenDatabaseVersionMismatch(t *testing.T) {
|
|||||||
|
|
||||||
_, err = openReportDatabase(t.Context(), path)
|
_, err = openReportDatabase(t.Context(), path)
|
||||||
if !errors.Is(err, errSchemaVersion) {
|
if !errors.Is(err, errSchemaVersion) {
|
||||||
t.Fatalf("report: err = %v, want errSchemaVersion", err)
|
t.Fatalf("err = %v, want errSchemaVersion", err)
|
||||||
}
|
|
||||||
|
|
||||||
_, err = openScanDatabase(t.Context(), path)
|
|
||||||
if !errors.Is(err, errSchemaVersion) {
|
|
||||||
t.Fatalf("scan: err = %v, want errSchemaVersion", err)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user