Skip to content

test: add cloud-dev e2e test skeleton + CI wiring for mongodb-mcp-remote MCP-538#1271

Closed
maastha wants to merge 5 commits into
MCP-538from
MCP-538-e2e
Closed

test: add cloud-dev e2e test skeleton + CI wiring for mongodb-mcp-remote MCP-538#1271
maastha wants to merge 5 commits into
MCP-538from
MCP-538-e2e

Conversation

@maastha

@maastha maastha commented Jun 21, 2026

Copy link
Copy Markdown
Collaborator

Summary
Stacked on #1268. Adds the cloud-dev e2e test for the remote MCP wrapper — the skeleton and CI plumbing. The actual test will be implemented in MCP-539 (and need the wrapper from MCP-536), so this is safe to merge on its own.

Changes

  • Adds an e2e test that targets the real cloud-dev Remote MCP server, self-skips unless credentials are provided.
  • Wires CI to inject the e2e credentials from GitHub secrets (dedicated env-var names).

Out of scope: e2e test bodies (MCP-539), wrapper implementation (MCP-536).

Ticket: MCP-538

Checklist

maastha added 3 commits June 21, 2026 15:03
Stand up the wrapper package's offline test tiers, reusing the repo's Vitest
setup (auto-discovered by the existing run-tests CI job, no workflow change):

- Unit scaffold (tokenManager.test.ts) — network-mocked, it.todo for MCP-539.
- Integration harness: an in-process fake remote MCP server
  (src/testHelpers/fakeRemote.ts, excluded from dist) driven via the MCP SDK
  client over a spawned wrapper (WRAPPER_CLI_PATH override); one live sanity
  test plus it.todo scenarios for MCP-539.
- Add @modelcontextprotocol/sdk, express, @types/express devDeps + pretest
  compile so dist/cli.js exists for the harness.
- Document wrapper unit/integration testing in CONTRIBUTING.md.

Builds and runs green without any wrapper logic (cli.ts is still a stub).
…upport SSE+JSON (MCP-538)

- Rename the test double from 'fake' to 'mock' (file, type, function, literals).
- Rewrite comments in plain language; add a reason to the eslint-disable.
- Mock remote now defaults to SSE (matching cloud-dev per MCP-542) with a
  responseMode: 'json' option; notifications return 202.
Replace the ASCII diagram with a short verbal description of how the
integration tests are wired.
…MCP-538)

Stack the real cloud-dev e2e tier on the unit/integration setup:

- wrapper.e2e.test.ts: runs in the normal suite but self-skips via describe.skipIf
  unless MDB_MCP_REMOTE_E2E_CLIENT_ID is set (and on SKIP_REMOTE_MCP_E2E=true).
  Bodies are it.todo for MCP-539 against the real wrapper (MCP-536).
- code-health.yml run-tests: inject MDB_MCP_REMOTE_E2E_* from dedicated
  TEST_REMOTE_MCP_* secrets/var (kept separate from MDB_MCP_API_* so cloud-dev
  creds don't leak into other tests). Until the secrets exist, e2e self-skips.
- scripts/path-b-smoke-test.sh: one-time provisioning of the ingress credentials
  via the group-level mcpConfig flow.
- Document e2e testing, provisioning, and secret rotation in CONTRIBUTING.md.
…MCP-538)

MDB_MCP_REMOTE_E2E_* env vars were picked up by yargs-parser's envPrefix
scan and injected as remoteE2e* fields into the parsed config object,
breaking config unit tests. Renamed to REMOTE_MCP_E2E_* (no MDB_MCP_ prefix).
@maastha maastha marked this pull request as ready for review June 24, 2026 22:41
@maastha maastha requested a review from a team as a code owner June 24, 2026 22:41
@maastha maastha requested review from blva and removed request for a team June 24, 2026 22:41
@maastha maastha changed the title test: add cloud-dev e2e test skeleton + CI wiring for mongodb-mcp-remote (MCP-538) test: add cloud-dev e2e test skeleton + CI wiring for mongodb-mcp-remote MCP-538 Jun 24, 2026
name: test-results
path: coverage/lcov.info

run-atlas-tests:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Would it make more sense to run the e2e tests in this group since they hit the Atlas MCP server?
I would also consider independent groups for wrapper tests, lets see what other reviewers say.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants