Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaslopezf committed Apr 19, 2024
1 parent 3fdbf11 commit 0bccf80
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/zrouter/zmiddlewares/zcache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ func TestCacheMiddleware(t *testing.T) {
"/cached-path": 5 * time.Minute,
}}

r.Use(CacheMiddleware(metrics.NewTaskMetrics("", "", "appName"), mockCache, cacheConfig))
ms := metrics.NewTaskMetrics("", "", "appName")
RegisterRequestMetrics(ms)
r.Use(CacheMiddleware(ms, mockCache, cacheConfig))

// Simulate a response that should be cached
r.Get("/cached-path", func(w http.ResponseWriter, r *http.Request) {
Expand Down

0 comments on commit 0bccf80

Please sign in to comment.