Skip to content

tui3 credit tests read the real OPENROUTER_API_KEY and fail when it is set #1489

Description

@santoshkumarradha

Since the OpenRouter balance work (#1440), TestAFreeCatalogPriceClearsTheWarningWhenTheListArrives and about nine sibling credit tests in internal/tui3 fail whenever a real OPENROUTER_API_KEY is in the environment, and pass without it.

Repro on santos/dev2 plus #1485's branch:

  • env -u OPENROUTER_API_KEY go test -count=1 -run TestAFreeCatalogPriceClearsTheWarningWhenTheListArrives ./internal/tui3 → ok
  • the same test with a real key exported → FAIL

A test run from a shell or agent that has the key set (common on dev machines and in live-check rigs) goes red for reasons unrelated to the change under test. The tests should pin their own key/balance source instead of reading the process environment.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions