Skip to content

Commit 0a55551

Browse files
committed
fix: correct GitHub Actions workflow test failures
- Restore production cache TTL to 5 minutes (was 10 seconds for debug) - Update TestExportsHandler to expect HTTP 200 status after template fixes - Tests now properly reflect the corrected template behavior
1 parent 487dfc5 commit 0a55551

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pkg/web/handlers/exports.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ func NewExportsHandler(cfg *config.Config, log logger.Logger, tokenManager *auth
8989
templates: templates,
9090
exportsDir: exportsDir,
9191
cache: &ExportCache{
92-
cacheTTL: 10 * time.Second, // Cache très court pour debug
92+
cacheTTL: 5 * time.Minute, // Cache pendant 5 minutes
9393
},
9494
}
9595
}

pkg/web/handlers/handlers_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@ func TestExportsHandler(t *testing.T) {
117117
rec := httptest.NewRecorder()
118118
handler.ServeHTTP(rec, req)
119119

120-
// Check response (it will be an error due to missing template, but that's expected)
121-
if rec.Code != http.StatusInternalServerError {
122-
t.Errorf("Expected status %d, got %d", http.StatusInternalServerError, rec.Code)
120+
// Check response - should now work correctly after template fixes
121+
if rec.Code != http.StatusOK {
122+
t.Errorf("Expected status %d, got %d", http.StatusOK, rec.Code)
123123
}
124124
}
125125

0 commit comments

Comments
 (0)