The cross-harness, self-improving memory layer for AI agents. Join our community: https://discord.com/invite/zdNChS2fBu
Go agent-ai-cliagent-harnessesagent-securitybrowser-extensionciclaude-codecloudcodexcursordetection-engineeringjevknowledge-basememorymobile-device-managementobservabilitysecuritysecurity-information-and-event-managementsecurity-toolstelemetrytraces
test(pricing): compare the default overrides path after decoding the JSON report
Claude08d698f5911d
diff --git a/cli/beacon/cmd/pricing_test.go b/cli/beacon/cmd/pricing_test.goindex e19760e2..6618bd40 100644--- a/cli/beacon/cmd/pricing_test.go+++ b/cli/beacon/cmd/pricing_test.go@@ -386,7 +386,15 @@ func TestTokenUsagePricesWithOverrides(t *testing.T) {if err := os.WriteFile(defaultPath, []byte(testOverridesDoc), 0o600); err != nil {t.Fatal(err)}- if out := runTokenUsageCommand(t, "--log-path", logPath, "--json"); !strings.Contains(out, defaultPath) {+ // Compared after decoding: JSON escapes the backslashes in a Windows path, so a substring+ // search of the raw output never finds it there.+ out := runTokenUsageCommand(t, "--log-path", logPath, "--json")+ var defaultReport map[string]interface{}+ if err := json.Unmarshal([]byte(out), &defaultReport); err != nil {+ t.Fatal(err)+ }+ defaultOverrides, _ := defaultReport["pricing"].(map[string]interface{})["overrides"].(map[string]interface{})+ if defaultOverrides == nil || defaultOverrides["path"] != defaultPath {t.Fatalf("default overrides file not used:\n%s", out)}