From b5fd5d577410c090f376ac47e8a481fb5049e272 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Mon, 2 Mar 2026 15:29:49 +0000 Subject: [PATCH] fix(tests): update import handler test to use temporary directory for Caddyfile path --- backend/internal/api/routes/routes_import_contract_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/internal/api/routes/routes_import_contract_test.go b/backend/internal/api/routes/routes_import_contract_test.go index ed60e3ea..e6ee27cc 100644 --- a/backend/internal/api/routes/routes_import_contract_test.go +++ b/backend/internal/api/routes/routes_import_contract_test.go @@ -1,6 +1,7 @@ package routes_test import ( + "path/filepath" "testing" "github.com/gin-gonic/gin" @@ -12,9 +13,11 @@ import ( func TestRegisterImportHandler_StrictRouteMatrix(t *testing.T) { gin.SetMode(gin.TestMode) db := setupTestImportDB(t) + tempDir := t.TempDir() + importCaddyfilePath := filepath.Join(tempDir, "import", "Caddyfile") router := gin.New() - routes.RegisterImportHandler(router, db, config.Config{JWTSecret: "test-secret"}, "echo", "/tmp", "/import/Caddyfile") + routes.RegisterImportHandler(router, db, config.Config{JWTSecret: "test-secret"}, "echo", tempDir, importCaddyfilePath) assertStrictMethodPathMatrix(t, router.Routes(), backendImportRouteMatrix(), "import") }