milvus/pkg/util/paramtable/http_param_test.go
PowderLi 50a78b682e
fix: set proxy.http.acceptTypeAllowInt64: true as default (#30720)
issue: #30680

also let the parameter item to be refreshable

Signed-off-by: PowderLi <min.li@zilliz.com>
2024-02-29 09:59:07 +08:00

19 lines
477 B
Go

package paramtable
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestHTTPConfig_Init(t *testing.T) {
params := ComponentParam{}
params.Init(NewBaseTable(SkipRemote(true)))
cfg := &params.HTTPCfg
assert.Equal(t, cfg.Enabled.GetAsBool(), true)
assert.Equal(t, cfg.DebugMode.GetAsBool(), false)
assert.Equal(t, cfg.Port.GetValue(), "")
assert.Equal(t, cfg.AcceptTypeAllowInt64.GetValue(), "true")
assert.Equal(t, cfg.EnablePprof.GetAsBool(), true)
}