提交代码
This commit is contained in:
parent
130cc37800
commit
cc711d9f7a
|
@ -1,9 +1,12 @@
|
|||
timeout: 10s # 连接超时
|
||||
read_timeout: 2s # 读超时
|
||||
write_timeout: 2s # 写超时
|
||||
host: 10.10.103.131 # ip地址
|
||||
port: 6379 # 端口
|
||||
password: Worktask@Redis2023
|
||||
db: 0 #db
|
||||
|
||||
|
||||
write:
|
||||
host: 10.10.103.131 # ip地址
|
||||
port: 6379 # 端口
|
||||
password: Worktask@Redis2023
|
||||
db: 0 #db
|
||||
timeout: 10s # 连接超时
|
||||
read_timeout: 2s # 读超时
|
||||
write_timeout: 2s # 写超时
|
||||
|
|
|
@ -1,18 +1,17 @@
|
|||
package ginSwagger
|
||||
|
||||
import (
|
||||
"github.com/Superdanda/hade/framework/gin"
|
||||
"github.com/Superdanda/hade/framework/middleware/gin-swagger/swaggerFiles"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/gin-contrib/gzip"
|
||||
"github.com/swaggo/swag"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/swaggo/gin-swagger/swaggerFiles"
|
||||
)
|
||||
|
||||
type mockedSwag struct{}
|
||||
|
@ -119,7 +118,7 @@ func TestWithGzipMiddleware(t *testing.T) {
|
|||
gin.SetMode(gin.TestMode)
|
||||
router := gin.New()
|
||||
|
||||
router.Use(gzip.Gzip(gzip.BestSpeed))
|
||||
//router.Use(gzip.Gzip(gzip.BestSpeed))
|
||||
|
||||
router.GET("/*any", WrapHandler(swaggerFiles.Handler))
|
||||
|
||||
|
|
Loading…
Reference in New Issue