From ef8fedeed70cdbaf6bf291e6b8ecd614c3ccff3b Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Fri, 6 Mar 2026 11:09:45 -0500 Subject: [PATCH] test(worker): fix set folders job test to properly register folder The TestWorker_SetFoldersJob test was submitting a set folders job without first registering the folder with the library through the HTTP API. This caused the job to fail because the folder wasn't properly tracked. Changes: - Call addFolderToLibrary before submitting the set folders job - Ensures the temporary test directory is properly registered with the library - Aligns test behavior with actual API workflow where folders must be added first --- cmd/server/tests/worker_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/server/tests/worker_test.go b/cmd/server/tests/worker_test.go index b8b9af7..5e394aa 100644 --- a/cmd/server/tests/worker_test.go +++ b/cmd/server/tests/worker_test.go @@ -153,6 +153,9 @@ func TestWorker_SetFoldersJob(t *testing.T) { // Create temporary directory tmpDir := t.TempDir() + // Add folder to library via HTTP API + addFolderToLibrary(t, setup, libraryID, tmpDir) + // Submit set folders job through WorkerInstance job := &services.Job{ ID: uuid.New().String(),