Skip to content

Commit ecf7707

Browse files
committed
Fix gemini-cli E2E test: use GEMINI_API_KEY=dummy and --load Docker images
- gemini-cli requires auth to run `mcp list`; GOOGLE_GENAI_USE_GCA triggers an interactive OAuth flow. GEMINI_API_KEY=dummy satisfies the check without network access. - Add --load to docker build commands so images are available to the daemon when using buildx container drivers. - Pre-create /root/.gemini in the gemini-cli Dockerfile to avoid ENOENT on projects.json.
1 parent b51257c commit ecf7707

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ clean:
3737

3838
# Build Docker images for E2E tests
3939
test-e2e-build:
40-
docker build -t mcp-test-claude-code tests/docker/claude-code/
41-
docker build -t mcp-test-cursor tests/docker/cursor/
42-
docker build -t mcp-test-gemini-cli tests/docker/gemini-cli/
40+
docker build --load -t mcp-test-claude-code tests/docker/claude-code/
41+
docker build --load -t mcp-test-cursor tests/docker/cursor/
42+
docker build --load -t mcp-test-gemini-cli tests/docker/gemini-cli/
4343

4444
# Run E2E testcontainers tests (requires Docker)
4545
test-e2e: test-e2e-build

tests/docker/gemini-cli/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
FROM node:20-slim
2-
RUN npm install -g @google/gemini-cli
2+
RUN npm install -g @google/gemini-cli && mkdir -p /root/.gemini

tests/test_install_e2e.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ async fn test_e2e_gemini_cli_recognizes_config() {
100100
InstallTarget::GeminiCli,
101101
"/root/.gemini/settings.json",
102102
vec!["gemini".to_string(), "mcp".to_string(), "list".to_string()],
103-
vec![("GOOGLE_GENAI_USE_GCA", "true")],
103+
vec![("GEMINI_API_KEY", "dummy")],
104104
)
105105
.await;
106106
}

0 commit comments

Comments
 (0)