From 1b91f2492e332276f4a6c67d8d676de4934187e1 Mon Sep 17 00:00:00 2001 From: ykadowak Date: Thu, 14 Mar 2024 15:11:40 +0000 Subject: [PATCH] Fix config test --- internal/config/config_test.go | 4 ++-- pkg/agent/core/ngt/config/config_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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"), }, } }(),