Skip to content

Commit

Permalink
Merge pull request #8 from hvuhsg/development
Browse files Browse the repository at this point in the history
Parallel tests and remove debug print
  • Loading branch information
hvuhsg authored Oct 17, 2024
2 parents c5ba9d9 + aec3adf commit 71308d8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 0 additions & 2 deletions middlewares/cache.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package middlewares

import (
"fmt"
"net/http"
"strconv"
"strings"
Expand Down Expand Up @@ -33,7 +32,6 @@ func NewCacheMiddleware() Middleware {
}
w.WriteHeader(response.statusCode)
w.Write(response.body)
fmt.Println("Returning cached")
return
}

Expand Down
4 changes: 4 additions & 0 deletions middlewares/cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
)

func TestCacheMiddleware(t *testing.T) {
t.Parallel()
// Reset cache before each test
responseCache.Flush()

Expand Down Expand Up @@ -166,6 +167,7 @@ func TestCacheMiddleware(t *testing.T) {
}

func TestGetCacheMaxAge(t *testing.T) {
t.Parallel()
tests := []struct {
name string
cacheControl string
Expand All @@ -189,6 +191,8 @@ func TestGetCacheMaxAge(t *testing.T) {
}

func TestGetCacheExpires(t *testing.T) {
t.Parallel()

now := time.Now()
tests := []struct {
name string
Expand Down

0 comments on commit 71308d8

Please sign in to comment.