From c9d3543f99b06794e7e7958fc5c77d5df205a871 Mon Sep 17 00:00:00 2001 From: Kunal Karmakar Date: Mon, 23 Mar 2026 02:23:22 +0000 Subject: [PATCH] Fix unit test --- pkg/config/config_test.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkg/config/config_test.go b/pkg/config/config_test.go index 88ab1ed51..f1e94afbc 100644 --- a/pkg/config/config_test.go +++ b/pkg/config/config_test.go @@ -488,8 +488,8 @@ func TestDefaultConfig_HooksDefaults(t *testing.T) { func TestDefaultConfig_LogLevel(t *testing.T) { cfg := DefaultConfig() - if cfg.Agents.Defaults.LogLevel != "fatal" { - t.Errorf("LogLevel = %q, want \"fatal\"", cfg.Agents.Defaults.LogLevel) + if cfg.Gateway.LogLevel != "fatal" { + t.Errorf("LogLevel = %q, want \"fatal\"", cfg.Gateway.LogLevel) } } @@ -1166,7 +1166,7 @@ func TestLoadConfig_UsesPassphraseProvider(t *testing.T) { func TestConfigParsesLogLevel(t *testing.T) { dir := t.TempDir() cfgPath := filepath.Join(dir, "config.json") - data := `{"agents":{"defaults":{"log_level":"debug"}}}` + data := `{"gateway":{"log_level":"debug"}}` if err := os.WriteFile(cfgPath, []byte(data), 0o600); err != nil { t.Fatalf("setup: %v", err) } @@ -1175,8 +1175,8 @@ func TestConfigParsesLogLevel(t *testing.T) { if err != nil { t.Fatalf("LoadConfig: %v", err) } - if cfg.Agents.Defaults.LogLevel != "debug" { - t.Errorf("LogLevel = %q, want \"debug\"", cfg.Agents.Defaults.LogLevel) + if cfg.Gateway.LogLevel != "debug" { + t.Errorf("LogLevel = %q, want \"debug\"", cfg.Gateway.LogLevel) } } @@ -1193,7 +1193,7 @@ func TestConfigLogLevelEmpty(t *testing.T) { t.Fatalf("LoadConfig: %v", err) } // When config omits log_level, the DefaultConfig value ("fatal") is preserved. - if cfg.Agents.Defaults.LogLevel != "fatal" { - t.Errorf("LogLevel = %q, want \"fatal\"", cfg.Agents.Defaults.LogLevel) + if cfg.Gateway.LogLevel != "fatal" { + t.Errorf("LogLevel = %q, want \"fatal\"", cfg.Gateway.LogLevel) } }