milvus/pkg/util/paramtable/http_param_test.go
PowderLi 7029797452
Improve HTTP server include metrics and RESTful API (#28045)
/kind improvement
issue: #27653

Signed-off-by: PowderLi <min.li@zilliz.com>
2023-11-19 17:14:20 +08:00

19 lines
478 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(), "false")
assert.Equal(t, cfg.EnablePprof.GetAsBool(), true)
}