(t *testing.T)
| 79 | } |
| 80 | |
| 81 | func TestLoadConfig_AuthToken(t *testing.T) { |
| 82 | os.Setenv("GOSQLX_MCP_AUTH_TOKEN", "supersecret") |
| 83 | defer os.Unsetenv("GOSQLX_MCP_AUTH_TOKEN") |
| 84 | |
| 85 | cfg, err := LoadConfig() |
| 86 | if err != nil { |
| 87 | t.Fatalf("unexpected error: %v", err) |
| 88 | } |
| 89 | if !cfg.AuthEnabled() { |
| 90 | t.Error("AuthEnabled() = false, want true") |
| 91 | } |
| 92 | if cfg.AuthToken != "supersecret" { |
| 93 | t.Errorf("AuthToken = %q, want %q", cfg.AuthToken, "supersecret") |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | func TestLoadConfig_CustomHost(t *testing.T) { |
| 98 | os.Setenv("GOSQLX_MCP_HOST", "0.0.0.0") |
nothing calls this directly
no test coverage detected