test: use dynamic path helper for upload folder test

- Replace hardcoded /app/uploads with getUploadPath()
- Update assertions to use dynamic paths
- Improve test log message to show actual path used
- Ensures tests work in both container and host environments
This commit is contained in:
2026-02-07 21:30:22 -05:00
parent 737f01a17d
commit 8319ea2041
@@ -211,7 +211,7 @@ func TestPhase1Integration(t *testing.T) {
// Step 3: Add /app/uploads folder to the library
t.Run("Step3_AddUploadsFolder", func(t *testing.T) {
folderReq := map[string]interface{}{
"folder_path": "/app/uploads",
"folder_path": getUploadPath(),
}
body, _ := json.Marshal(folderReq)
@@ -230,9 +230,9 @@ func TestPhase1Integration(t *testing.T) {
var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
assert.Equal(t, "/app/uploads", result["folder_path"])
assert.Equal(t, getUploadPath(), result["folder_path"])
t.Logf("✅ Step 3 PASSED: /app/uploads folder added to library")
t.Logf("✅ Step 3 PASSED: %s folder added to library", getUploadPath())
})
// Step 4: Scan the library