Skip to content

Commit

Permalink
Fix tests, bump version (#312)
Browse files Browse the repository at this point in the history
  • Loading branch information
n0vad3v authored Feb 11, 2024
1 parent 123c96d commit 9be1a6b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ var (
ProxyMode bool
Prefetch bool
Config = NewWebPConfig()
Version = "0.10.6"
Version = "0.10.7"
WriteLock = cache.New(5*time.Minute, 10*time.Minute)
ConvertLock = cache.New(5*time.Minute, 10*time.Minute)
RemoteRaw = "./remote-raw"
Expand Down Expand Up @@ -75,7 +75,7 @@ type WebpConfig struct {
ReadBufferSize int `json:"READ_BUFFER_SIZE"`
Concurrency int `json:"CONCURRENCY"`
DisableKeepalive bool `json:"DISABLE_KEEPALIVE"`
CacheTTL int `json:"CACHE_TTL"`
CacheTTL int `json:"CACHE_TTL"`
}

func NewWebPConfig() *WebpConfig {
Expand Down
3 changes: 3 additions & 0 deletions handler/router_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ import (
"net/url"
"os"
"testing"
"time"
"webp_server_go/config"
"webp_server_go/helper"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/etag"
"github.com/patrickmn/go-cache"
"github.com/stretchr/testify/assert"
)

Expand All @@ -35,6 +37,7 @@ func setupParam() {
config.Config.EnableAVIF = false
config.Config.Quality = 80
config.Config.ImageMap = map[string]string{}
config.RemoteCache = cache.New(cache.NoExpiration, 10*time.Minute)
}

func requestToServer(reqUrl string, app *fiber.App, ua, accept string) (*http.Response, []byte) {
Expand Down

0 comments on commit 9be1a6b

Please sign in to comment.