Skip to content

Fix stale Gemini CLI e2e test assertions after removing /env/* keys #5178

@yrobla

Description

@yrobla

Context

Identified in PR #5142 review by @JAORMX (comment on test/e2e/cli_llm_all_clients_test.go line 452).

Problem

After PR #5142 dropped /env/GOOGLE_GEMINI_BASE_URL from Gemini CLI's LLMGatewayKeys, the e2e test still asserts that pointer is present:

geminiURL, found := jsonPointerGet(geminiAfter, "/env/GOOGLE_GEMINI_BASE_URL")
Expect(found).To(BeTrue(), ...)
Expect(geminiURL).To(Equal(...))

This assertion will fail when the e2e suite runs because we no longer write that key.

Fix

Replace with an assertion on the only key we still patch — /security/auth/selectedType:

selectedType, found := jsonPointerGet(geminiAfter, "/security/auth/selectedType")
Expect(found).To(BeTrue(),
    "gemini-cli /security/auth/selectedType should still be present after claude-code teardown")
Expect(selectedType).To(Equal("gemini-api-key"),
    "gemini-cli selectedType should still be 'gemini-api-key' after claude-code teardown")

Also update any other e2e expectations that reference GOOGLE_GEMINI_BASE_URL for Gemini CLI.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcliChanges that impact CLI functionalitygoPull requests that update go code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions