Skip to content

test(mcp): add image tool test and consolidate MCP test fixtures#7019

Merged
codefromthecrypt merged 1 commit intomainfrom
mcp-tests
Feb 9, 2026
Merged

test(mcp): add image tool test and consolidate MCP test fixtures#7019
codefromthecrypt merged 1 commit intomainfrom
mcp-tests

Conversation

@codefromthecrypt
Copy link
Collaborator

@codefromthecrypt codefromthecrypt commented Feb 6, 2026

Summary

Align provider-level tests (crates/goose/tests/providers.rs) and ACP integration tests (crates/goose-acp/tests/) around tool calling by sharing McpFixtureServer from goose-test-support and consolidating to the same prompts. Then add the missing image test (test_prompt_image) on the ACP side, which can assert an exact value since responses are recorded.

Type of Change

  • Tests
  • Refactor / Code quality

AI Assistance

  • This PR was created or reviewed with AI assistance

Testing

Providers tests now use the same prompt as ACP for basic tool calling:

OLLAMA_HOST=http://localhost:11434 cargo test -p goose --test providers -- test_ollama_provider --nocapture

New ACP Image test that matches the providers test:

RUST_BACKTRACE=full RUST_LOG=debug cargo test -p goose-acp --test server_test -- --nocapture test_prompt_image

Related Issues

Pulls a lot of the diff from #6972
Recording process relates to #6969

@codefromthecrypt codefromthecrypt marked this pull request as ready for review February 6, 2026 02:27
Copilot AI review requested due to automatic review settings February 6, 2026 02:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR consolidates MCP test fixtures into a new shared goose-test-support crate, aligning provider-level tests and ACP integration tests around tool calling. The changes eliminate code duplication by sharing McpFixtureServer and ExpectedSessionId, and add the previously missing image test (test_prompt_image) to the ACP test suite.

Changes:

  • Created new goose-test-support crate with shared McpFixture, McpFixtureServer, ExpectedSessionId, and test assets
  • Refactored provider tests to use shared fixtures and consolidated tool/image testing via tool_roundtrip() method
  • Renamed and reorganized ACP tests for clarity (run_prompt_basic, run_prompt_mcp, run_prompt_image, run_prompt_codemode, run_config_mcp)
  • Updated Ollama tests to use qwen3-vl:2b model which supports text, tools, and vision
  • Updated test data files to reflect server name change from lookup to mcp-fixture

Reviewed changes

Copilot reviewed 17 out of 22 changed files in this pull request and generated no comments.

Show a summary per file
File Description
crates/goose-test-support/Cargo.toml New crate with dependencies on axum, rmcp, base64, etc.
crates/goose-test-support/src/lib.rs Exports shared test utilities
crates/goose-test-support/src/session.rs ExpectedSessionId for session validation across tests
crates/goose-test-support/src/mcp.rs McpFixtureServer with get_code and get_screenshot tools
crates/goose-test-support/src/test_assets/test_image.png Test image asset for vision tests
crates/goose-test-support/examples/mcp_fixture_server.rs Standalone example for running fixture server
crates/goose/tests/providers.rs Refactored to use shared fixtures and tool_roundtrip() method
crates/goose/src/providers/ollama.rs Added qwen3-vl to known models list
crates/goose/Cargo.toml Added goose-test-support dev dependency
crates/goose-acp/tests/fixtures/mod.rs Removed duplicate code, now uses shared fixtures
crates/goose-acp/tests/common_tests/mod.rs Renamed and reorganized test functions
crates/goose-acp/tests/server_test.rs Updated test function names
crates/goose-acp/tests/test_data/*.txt Updated tool names from lookup__* to mcp-fixture__*
crates/goose-acp/Cargo.toml Added goose-test-support dev dependency
Cargo.lock Updated dependencies

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 17 out of 22 changed files in this pull request and generated 2 comments.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 21 out of 26 changed files in this pull request and generated 1 comment.

Copy link
Collaborator

@michaelneale michaelneale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense- need to untangle conflicts unfortunately now!

Signed-off-by: Adrian Cole <adrian@tetrate.io>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 21 out of 26 changed files in this pull request and generated 1 comment.

@codefromthecrypt codefromthecrypt added this pull request to the merge queue Feb 9, 2026
Merged via the queue into main with commit 1371f5d Feb 9, 2026
26 checks passed
@codefromthecrypt codefromthecrypt deleted the mcp-tests branch February 9, 2026 01:21
tlongwell-block added a commit that referenced this pull request Feb 9, 2026
* origin/main: (55 commits)
  test(mcp): add image tool test and consolidate MCP test fixtures (#7019)
  fix: remove Option from model listing return types, propagate errors (#7074)
  fix: lazy provider creation for goose acp (#7026) (#7066)
  Smoke tests: split compaction test and use debug build (#6984)
  fix(deps): trim bat to resolve RUSTSEC-2024-0320 (#7061)
  feat: expose AGENT_SESSION_ID env var to extension child processes (#7072)
  fix: add XML tool call parsing fallback for Qwen3-coder via Ollama (#6882)
  Remove clippy too_many_lines lint and decompose long functions (#7064)
  refactor: move disable_session_naming into AgentConfig (#7062)
  Add global config switch to disable automatic session naming (#7052)
  docs: add blog post - 8 Things You Didn't Know About Code Mode (#7059)
  fix: ensure animated elements are visible when prefers-reduced-motion is enabled (#7047)
  Show recommended model on failture (#7040)
  feat(ui): add session content search via API (#7050)
  docs: fix img url (#7053)
  Desktop UI for deleting custom providers (#7042)
  Add blog post: How I Used RPI to Build an OpenClaw Alternative (#7051)
  Remove build-dependencies section from Cargo.toml (#6946)
  add /rp-why skill blog post (#6997)
  fix: fix snake_case function names in code_execution instructions (#7035)
  ...

# Conflicts:
#	scripts/test_subrecipes.sh
lifeizhou-ap added a commit that referenced this pull request Feb 9, 2026
* main:
  added build notify (#6891)
  test(mcp): add image tool test and consolidate MCP test fixtures (#7019)
  fix: remove Option from model listing return types, propagate errors (#7074)
jh-block added a commit that referenced this pull request Feb 9, 2026
* origin/main: (54 commits)
  chore: strip posthog for sessions/models/daily only (#7079)
  tidy: clean up old benchmark and add gym (#7081)
  fix: use command.process_group(0) for CLI providers, not just MCP (#7083)
  added build notify (#6891)
  test(mcp): add image tool test and consolidate MCP test fixtures (#7019)
  fix: remove Option from model listing return types, propagate errors (#7074)
  fix: lazy provider creation for goose acp (#7026) (#7066)
  Smoke tests: split compaction test and use debug build (#6984)
  fix(deps): trim bat to resolve RUSTSEC-2024-0320 (#7061)
  feat: expose AGENT_SESSION_ID env var to extension child processes (#7072)
  fix: add XML tool call parsing fallback for Qwen3-coder via Ollama (#6882)
  Remove clippy too_many_lines lint and decompose long functions (#7064)
  refactor: move disable_session_naming into AgentConfig (#7062)
  Add global config switch to disable automatic session naming (#7052)
  docs: add blog post - 8 Things You Didn't Know About Code Mode (#7059)
  fix: ensure animated elements are visible when prefers-reduced-motion is enabled (#7047)
  Show recommended model on failture (#7040)
  feat(ui): add session content search via API (#7050)
  docs: fix img url (#7053)
  Desktop UI for deleting custom providers (#7042)
  ...
michaelneale added a commit that referenced this pull request Feb 10, 2026
* main: (125 commits)
  chore: add a new scenario (#7107)
  fix: Goose Desktop missing Calendar and Reminders entitlements (#7100)
  Fix 'Edit In Place' and 'Fork Session' features (#6970)
  Fix: Only send command content to command injection classifier (excluding part of tool call dict) (#7082)
  Docs: require auth optional for custom providers (#7098)
  fix: improve text-muted contrast for better readability (#7095)
  Always sync bundled extensions (#7057)
  feat: Add tom (Top Of Mind) platform extension (#7073)
  chore(docs): update GOOSE_SESSION_ID -> AGENT_SESSION_ID (#6669)
  fix(ci): switch from cargo-audit to cargo-deny for advisory scanning (#7032)
  chore(deps): bump @isaacs/brace-expansion from 5.0.0 to 5.0.1 in /evals/open-model-gym/suite (#7085)
  chore(deps): bump @modelcontextprotocol/sdk from 1.25.3 to 1.26.0 in /evals/open-model-gym/mcp-harness (#7086)
  fix: switch to windows msvc (#7080)
  fix: allow unlisted models for CLI providers (#7090)
  Use goose port (#7089)
  chore: strip posthog for sessions/models/daily only (#7079)
  tidy: clean up old benchmark and add gym (#7081)
  fix: use command.process_group(0) for CLI providers, not just MCP (#7083)
  added build notify (#6891)
  test(mcp): add image tool test and consolidate MCP test fixtures (#7019)
  ...
lifeizhou-ap added a commit that referenced this pull request Feb 11, 2026
* main: (85 commits)
  Fix 'Edit In Place' and 'Fork Session' features (#6970)
  Fix: Only send command content to command injection classifier (excluding part of tool call dict) (#7082)
  Docs: require auth optional for custom providers (#7098)
  fix: improve text-muted contrast for better readability (#7095)
  Always sync bundled extensions (#7057)
  feat: Add tom (Top Of Mind) platform extension (#7073)
  chore(docs): update GOOSE_SESSION_ID -> AGENT_SESSION_ID (#6669)
  fix(ci): switch from cargo-audit to cargo-deny for advisory scanning (#7032)
  chore(deps): bump @isaacs/brace-expansion from 5.0.0 to 5.0.1 in /evals/open-model-gym/suite (#7085)
  chore(deps): bump @modelcontextprotocol/sdk from 1.25.3 to 1.26.0 in /evals/open-model-gym/mcp-harness (#7086)
  fix: switch to windows msvc (#7080)
  fix: allow unlisted models for CLI providers (#7090)
  Use goose port (#7089)
  chore: strip posthog for sessions/models/daily only (#7079)
  tidy: clean up old benchmark and add gym (#7081)
  fix: use command.process_group(0) for CLI providers, not just MCP (#7083)
  added build notify (#6891)
  test(mcp): add image tool test and consolidate MCP test fixtures (#7019)
  fix: remove Option from model listing return types, propagate errors (#7074)
  fix: lazy provider creation for goose acp (#7026) (#7066)
  ...
Tyler-Hardin pushed a commit to Tyler-Hardin/goose that referenced this pull request Feb 11, 2026
Tyler-Hardin pushed a commit to Tyler-Hardin/goose that referenced this pull request Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants