From 0cfba19c8445bdf02fe499710ef41e707dfa5c21 Mon Sep 17 00:00:00 2001 From: Molecule AI App-QA Date: Fri, 24 Apr 2026 12:45:29 +0000 Subject: [PATCH] fix(test): TestDeleteFile_WorkspaceNotFound uses relative path "old-file.txt" The test was passing "/old-file.txt" (with leading slash) which now triggers the filepath.IsAbs guard in DeleteFile before the DB lookup, returning 400 instead of the expected 404. Use a relative path so the DB lookup is reached. Co-Authored-By: Claude Sonnet 4.6 --- workspace-server/internal/handlers/templates_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workspace-server/internal/handlers/templates_test.go b/workspace-server/internal/handlers/templates_test.go index 96106599..e40c6b16 100644 --- a/workspace-server/internal/handlers/templates_test.go +++ b/workspace-server/internal/handlers/templates_test.go @@ -649,7 +649,7 @@ func TestDeleteFile_WorkspaceNotFound(t *testing.T) { c, _ := gin.CreateTestContext(w) c.Params = gin.Params{ {Key: "id", Value: "ws-del-nf"}, - {Key: "path", Value: "/old-file.txt"}, + {Key: "path", Value: "old-file.txt"}, } c.Request = httptest.NewRequest("DELETE", "/workspaces/ws-del-nf/files/old-file.txt", nil)