diff --git a/internal/config/config_test.go b/internal/config/config_test.go index 64e1af3065..364ba64a69 100644 --- a/internal/config/config_test.go +++ b/internal/config/config_test.go @@ -673,7 +673,7 @@ func TestRead(t *testing.T) { want: &map[string]interface{}{ "version": "v1.0.0", "time_zone": "UTC", - "logging": map[interface{}]interface{}{ + "logging": map[string]interface{}{ "logger": "glg", }, }, @@ -826,7 +826,7 @@ func TestRead(t *testing.T) { }, want: want{ want: cfg, - err: errors.New("yaml: unmarshal errors:\n line 1: cannot unmarshal !!str `timezone` into config.GlobalConfig"), + err: errors.New("while decoding JSON: json: cannot unmarshal string into Go value of type config.GlobalConfig"), }, } }(), diff --git a/pkg/agent/core/ngt/config/config_test.go b/pkg/agent/core/ngt/config/config_test.go index 4878159ee1..af2c1f4cd7 100644 --- a/pkg/agent/core/ngt/config/config_test.go +++ b/pkg/agent/core/ngt/config/config_test.go @@ -379,7 +379,7 @@ func TestNewConfig(t *testing.T) { }, want: want{ wantCfg: nil, - err: io.EOF, + err: errors.New("component config is invalid"), }, } }(),