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:
@@ -211,7 +211,7 @@ func TestPhase1Integration(t *testing.T) {
|
|||||||
// Step 3: Add /app/uploads folder to the library
|
// Step 3: Add /app/uploads folder to the library
|
||||||
t.Run("Step3_AddUploadsFolder", func(t *testing.T) {
|
t.Run("Step3_AddUploadsFolder", func(t *testing.T) {
|
||||||
folderReq := map[string]interface{}{
|
folderReq := map[string]interface{}{
|
||||||
"folder_path": "/app/uploads",
|
"folder_path": getUploadPath(),
|
||||||
}
|
}
|
||||||
|
|
||||||
body, _ := json.Marshal(folderReq)
|
body, _ := json.Marshal(folderReq)
|
||||||
@@ -230,9 +230,9 @@ func TestPhase1Integration(t *testing.T) {
|
|||||||
var result map[string]interface{}
|
var result map[string]interface{}
|
||||||
json.NewDecoder(resp.Body).Decode(&result)
|
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
|
// Step 4: Scan the library
|
||||||
|
|||||||
Reference in New Issue
Block a user