test: pin scan_extractor_version at the start of ev-sensitive tests
Release / build-and-push (push) Successful in 3m20s

The extractor/force-rescan tests assert manifest stamps against the
default version (1), but the setting lives in the SHARED dev DB — any
prior run (or a manual admin-UI bump) can leave it at 2, failing every
stamp assertion through no fault of the code. Each ev-sensitive test
now pins the setting to 1 at start and restores 1 on cleanup; proven
against a deliberately bumped setting (tests pass, row restored).
This commit is contained in:
John O'Keefe committed 2026-10-20 22:19:29 -04:00
1 parent a42c6d4f75
commit dd4cf1235c
2 files changed
+15

No files matched your search

@@ -74,6 +74,7 @@ func TestExtractorVersionReextract(t *testing.T) {
ctx := context.Background()
admin, _ := moveTestAdminID(t, setup)
pinExtractorVersionOne(t, setup)
libID, folder := createTypedTestLibrary(t, setup, fmt.Sprintf("Test EV Library %d", time.Now().UnixNano()), "ebooks")
t.Cleanup(func() { deleteLibraries(t, setup, libID) })
@@ -142,6 +143,7 @@ func TestExtractorVersionMultifile(t *testing.T) {
t.Cleanup(func() { _ = setup.Close() })
admin, _ := moveTestAdminID(t, setup)
pinExtractorVersionOne(t, setup)
libID, folder := audioTestLibrary(t, setup, fmt.Sprintf("Test EV Audio %d", time.Now().UnixNano()))
t.Cleanup(func() { deleteLibraries(t, setup, libID) })