From febd5501c4efa785c7c8770609fb32d0a0c49772 Mon Sep 17 00:00:00 2001 From: Sodesnei <1452401269@qq.com> Date: Sun, 10 Oct 2021 14:05:01 +0800 Subject: [PATCH] feat(conf): updata conf test --- conf/public_conf_test.go | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/conf/public_conf_test.go b/conf/public_conf_test.go index 263f438..9c519d2 100644 --- a/conf/public_conf_test.go +++ b/conf/public_conf_test.go @@ -1,7 +1,6 @@ package conf import ( - "fmt" "testing" "github.com/spf13/viper" @@ -26,18 +25,11 @@ func TestConf(t *testing.T) { } func TestMiddleConf(t *testing.T) { - ct := viper.GetStringMap("plugins-control") - - fmt.Println(ct) + ct := viper.GetStringSlice("plugins-control.logcontext") + require.Equal(t, ct, []string{"logMiddle"}) d := viper.GetInt("middleware-driver.driverCount") require.Equal(t, d, 1000) c := viper.GetInt("middleware-driver.middleConsumerCount") require.Equal(t, c, 5) - - p := viper.GetStringMap("plugins-control") - for key, val := range p { - fmt.Println(key, val) - } - // fmt.Println(p) }