Skip to content

chore: add arg validation test coverage #84

chore: add arg validation test coverage

chore: add arg validation test coverage #84

Triggered via pull request October 8, 2025 20:25
@blvablva
synchronize #570
args-tests
Status Failure
Total duration 9m 1s
Artifacts 3

code-health.yml

on: pull_request
Matrix: Run MongoDB tests
Run Atlas tests
2m 37s
Run Atlas tests
Report Coverage
41s
Report Coverage
Fit to window
Zoom out
Zoom in

Annotations

10 errors and 7 warnings
Run MongoDB tests (macos-latest)
Process completed with exit code 1.
tests/unit/common/exportsManager.test.ts > ExportsManager unit test > #cleanupExpiredExports > should cleanup expired exports: tests/unit/common/exportsManager.test.ts#L563
AssertionError: expected [] to deep equally contain ObjectContaining{…} - Expected: ObjectContaining { "exportName": "68e6c8e22fe50557ee687cf0.json", "exportURI": "exported-data://68e6c8e22fe50557ee687cf0.json", } + Received: [] ❯ tests/unit/common/exportsManager.test.ts:563:46
Run Atlas tests
Process completed with exit code 1.
tests/integration/tools/atlas/clusters.test.ts > clusters > with project > atlas-connect-cluster: src/common/atlas/apiClientError.ts#L31
ApiClientError: [404 Not Found] error calling Atlas API: Not Found; No cluster named ClusterTest-68e6c948c49781765c710e44 exists in group 68e6c9493d1eb5362b61e5c9. ❯ Function.fromError src/common/atlas/apiClientError.ts:31:16 ❯ ApiClient.getCluster src/common/atlas/apiClient.ts:427:34 ❯ waitCluster tests/integration/tools/atlas/clusters.test.ts:59:25 ❯ tests/integration/tools/atlas/clusters.test.ts:196:17 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { response: { size: +0, constructor: 'Function<Response>', type: 'default', url: 'https://cloud-dev.mongodb.com/api/atlas/v2/groups/68e6c9493d1eb5362b61e5c9/clusters/ClusterTest-68e6c948c49781765c710e44', status: 404, ok: false, redirected: false, statusText: 'Not Found', headers: { constructor: 'Function<Headers>', toString: 'Function<toString>', get: 'Function<get>', forEach: 'Function<forEach>', values: 'Function<values>', entries: 'Function<entries>', raw: 'Function<raw>', size: '<unserializable>: Value of "this" must be of type URLSearchParams', append: 'Function<anonymous>', delete: 'Function<anonymous>', getAll: 'Function<anonymous>', has: 'Function<anonymous>', set: 'Function<anonymous>', sort: 'Function<sort>', keys: 'Function<anonymous>' }, highWaterMark: 16384, clone: 'Function<clone>', body: { _events: { close: [ 'Function<anonymous>', 'Function<anonymous>', 'Function<onclose>' ], error: [ 'Function<anonymous>', 'Function<onerror>' ], prefinish: 'Function<prefinish>', finish: 'Function<onfinish>', drain: undefined, data: undefined, end: 'Function<onend>', readable: 'Function<next>', unpipe: undefined }, _readableState: { highWaterMark: 65536, buffer: [], bufferIndex: +0, length: +0, pipes: [], awaitDrainWriters: null, constructor: 'Function<ReadableState>', objectMode: false, ended: true, endEmitted: true, reading: false, constructed: true, sync: false, needReadable: false, emittedReadable: false, readableListening: true, resumeScheduled: false, errorEmitted: false, emitClose: true, autoDestroy: true, destroyed: true, closed: true, closeEmitted: true, multiAwaitDrain: false, readingMore: false, dataEmitted: true, errored: null, defaultEncoding: 'utf8', decoder: null, encoding: null, flowing: false, pipesCount: +0, paused: false }, _writableState: { highWaterMark: 65536, length: +0, corked: +0, onwrite: 'Function<bound onwrite>', writelen: +0, bufferedIndex: +0, pendingcb: +0, constructor: 'Function<WritableState>', objectMode: false, finalCalled: true, needDrain: false, ending: true, ended: true, finished: true, destroyed: true, decodeStrings: true, writing: false, sync: false, bufferProcessing: false, constructed: true, prefinished: true, errorEmitted: false, emitClose: true, autoDestroy: true, closed: true, closeEmitted: true, allBuffers: true, allNoop: true, errored: null, writable: undefined, defaultEncoding: 'utf8', writecb: 'Function<nop>', afterWriteTickInfo: null, buffered: [], getBuffer: 'Function<getBuffer>', bufferedRequestCount: +0 }, allowHalfOpen: true, _maxListeners: undefined, _eventsCount: 6, constructor: 'Function<PassThrough>', _transform: 'Function<anonymous>', _final: 'Function<final>', _write: 'Function<anonymous>', _read: 'Function<anonymous>', write: 'Function<anonymous>', cork: 'Function<anonymous>', uncork: 'Function<anonymous>', setDefaultEncoding: 'Function<setDefaultEncoding>', _writev: null, end: 'Function<anonymous>', destroy: 'Function<anonymous>', writable: false, writableHighWaterMark: 65536, writableObjectMode: false, writableBuffer: [], writableLength: +0, writableFinished: true, writableCorked: +0, writableEnded: true, writableNeedDrain: false, destroyed: true, _undestroy: 'Function<undestroy>', _destroy: 'Function<anonymous>', push: 'Function<anonymous>', unshift: 'Function<anonymous>', isPaused: 'Function<anonymous>', setEncoding: 'Function<anonymous>', read: 'Function<anonymous>', pipe: 'Function<anonymous>', unpipe: 'Function<anonymous>', on: 'Function<anonymous>', addListener: 'Function<anonymous>', removeListener: 'Function<anonymous>', off: 'Function<anonymous>', removeAllListeners: 'Function<anonymous>', resume
tests/integration/tools/atlas/clusters.test.ts > clusters > with project > atlas-list-clusters > returns clusters by project: tests/integration/tools/atlas/clusters.test.ts#L182
AssertionError: expected [ { type: 'text', …(1) } ] to have a length of 2 but got 1 - Expected + Received - 2 + 1 ❯ tests/integration/tools/atlas/clusters.test.ts:182:34
tests/integration/tools/atlas/clusters.test.ts > clusters > with project > atlas-inspect-cluster > returns cluster data: tests/integration/tools/atlas/clusters.test.ts#L157
AssertionError: expected [ { type: 'text', …(1) } ] to have a length of 2 but got 1 - Expected + Received - 2 + 1 ❯ tests/integration/tools/atlas/clusters.test.ts:157:34
tests/integration/tools/atlas/clusters.test.ts > clusters > with project > atlas-create-free-cluster > should create a free cluster and add current IP to access list: tests/integration/inMemoryTransport.ts#L24
McpError: MCP error -32602: MCP error -32602: Invalid arguments for tool atlas-create-free-cluster: [ { "code": "invalid_type", "expected": "string", "received": "undefined", "path": [ "clusterName" ], "message": "Required" } ] ❯ Client._onresponse node_modules/@modelcontextprotocol/sdk/src/shared/protocol.ts:450:27 ❯ InMemoryTransport._transport.onmessage node_modules/@modelcontextprotocol/sdk/src/shared/protocol.ts:295:22 ❯ Object.write tests/integration/inMemoryTransport.ts:24:44 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { code: -32602, data: undefined }
tests/integration/tools/atlas/clusters.test.ts > clusters > with project > atlas-create-free-cluster > should have correct metadata: tests/integration/tools/atlas/clusters.test.ts#L108
AssertionError: expected { projectId: { …(5) }, …(2) } to have property "name" ❯ tests/integration/tools/atlas/clusters.test.ts:108:66
tests/integration/tools/atlas/clusters.test.ts > clusters > with project: src/common/atlas/apiClientError.ts#L31
ApiClientError: [404 Not Found] error calling Atlas API: Not Found; No cluster named ClusterTest-68e6c948c49781765c710e44 exists in group 68e6c9493d1eb5362b61e5c9. ❯ Function.fromError src/common/atlas/apiClientError.ts:31:16 ❯ ApiClient.deleteCluster src/common/atlas/apiClient.ts:416:34 ❯ deleteCluster tests/integration/tools/atlas/clusters.test.ts:22:5 ❯ tests/integration/tools/atlas/clusters.test.ts:95:17 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { response: { size: +0, constructor: 'Function<Response>', type: 'default', url: 'https://cloud-dev.mongodb.com/api/atlas/v2/groups/68e6c9493d1eb5362b61e5c9/clusters/ClusterTest-68e6c948c49781765c710e44', status: 404, ok: false, redirected: false, statusText: 'Not Found', headers: { constructor: 'Function<Headers>', toString: 'Function<toString>', get: 'Function<get>', forEach: 'Function<forEach>', values: 'Function<values>', entries: 'Function<entries>', raw: 'Function<raw>', size: '<unserializable>: Value of "this" must be of type URLSearchParams', append: 'Function<anonymous>', delete: 'Function<anonymous>', getAll: 'Function<anonymous>', has: 'Function<anonymous>', set: 'Function<anonymous>', sort: 'Function<sort>', keys: 'Function<anonymous>' }, highWaterMark: 16384, clone: 'Function<clone>', body: { _events: { close: [ 'Function<anonymous>', 'Function<anonymous>', 'Function<onclose>' ], error: [ 'Function<anonymous>', 'Function<onerror>' ], prefinish: 'Function<prefinish>', finish: 'Function<onfinish>', drain: undefined, data: undefined, end: 'Function<onend>', readable: 'Function<next>', unpipe: undefined }, _readableState: { highWaterMark: 65536, buffer: [], bufferIndex: +0, length: +0, pipes: [], awaitDrainWriters: null, constructor: 'Function<ReadableState>', objectMode: false, ended: true, endEmitted: true, reading: false, constructed: true, sync: false, needReadable: false, emittedReadable: false, readableListening: true, resumeScheduled: false, errorEmitted: false, emitClose: true, autoDestroy: true, destroyed: true, closed: true, closeEmitted: true, multiAwaitDrain: false, readingMore: false, dataEmitted: true, errored: null, defaultEncoding: 'utf8', decoder: null, encoding: null, flowing: false, pipesCount: +0, paused: false }, _writableState: { highWaterMark: 65536, length: +0, corked: +0, onwrite: 'Function<bound onwrite>', writelen: +0, bufferedIndex: +0, pendingcb: +0, constructor: 'Function<WritableState>', objectMode: false, finalCalled: true, needDrain: false, ending: true, ended: true, finished: true, destroyed: true, decodeStrings: true, writing: false, sync: false, bufferProcessing: false, constructed: true, prefinished: true, errorEmitted: false, emitClose: true, autoDestroy: true, closed: true, closeEmitted: true, allBuffers: true, allNoop: true, errored: null, writable: undefined, defaultEncoding: 'utf8', writecb: 'Function<nop>', afterWriteTickInfo: null, buffered: [], getBuffer: 'Function<getBuffer>', bufferedRequestCount: +0 }, allowHalfOpen: true, _maxListeners: undefined, _eventsCount: 6, constructor: 'Function<PassThrough>', _transform: 'Function<anonymous>', _final: 'Function<final>', _write: 'Function<anonymous>', _read: 'Function<anonymous>', write: 'Function<anonymous>', cork: 'Function<anonymous>', uncork: 'Function<anonymous>', setDefaultEncoding: 'Function<setDefaultEncoding>', _writev: null, end: 'Function<anonymous>', destroy: 'Function<anonymous>', writable: false, writableHighWaterMark: 65536, writableObjectMode: false, writableBuffer: [], writableLength: +0, writableFinished: true, writableCorked: +0, writableEnded: true, writableNeedDrain: false, destroyed: true, _undestroy: 'Function<undestroy>', _destroy: 'Function<anonymous>', push: 'Function<anonymous>', unshift: 'Function<anonymous>', isPaused: 'Function<anonymous>', setEncoding: 'Function<anonymous>', read: 'Function<anonymous>', pipe: 'Function<anonymous>', unpipe: 'Function<anonymous>', on: 'Function<anonymous>', addListener: 'Function<anonymous>', removeListener: 'Function<anonymous>', off: 'Function<anonymous>', removeAllListeners: 'Function<anonymous>', res
Report Coverage
Unable to download artifact(s): Artifact not found for name: atlas-test-results Please ensure that your artifact is not expired and the artifact was uploaded using a compatible version of toolkit/upload-artifact. For more information, visit the GitHub Artifacts FAQ: https://github.com/actions/toolkit/blob/main/packages/artifact/docs/faq.md
Run Atlas tests
No files were found with the provided path: coverage/lcov.info. No artifacts will be uploaded.
Run Atlas tests
1 added, 0 removed; done.
Run Atlas tests
rehash: warning: skipping ca-certificates.crt,it does not contain exactly one certificate or CRL
Run Atlas tests
Updating certificates in /etc/ssl/certs...
Run MongoDB tests (ubuntu-latest)
1 added, 0 removed; done.
Run MongoDB tests (ubuntu-latest)
rehash: warning: skipping ca-certificates.crt,it does not contain exactly one certificate or CRL
Run MongoDB tests (ubuntu-latest)
Updating certificates in /etc/ssl/certs...

Artifacts

Produced during runtime
Name Size Digest
run-atlas-tests-permissions-9239ce3237e078bd9de930a00ef1ad86
140 Bytes
sha256:13a791809ffd5d7d06224a4fd23a4e8b3edaeb5cdae628b3397297fd7182ae2a
run-tests-permissions-2cc06d8c914f5d1a94b1019375b8071c
140 Bytes
sha256:fecd5b7110b0b94baaf9b6abfeb490fbf248cf0e712ef25bab3f0e64008032b2
test-results
23.9 KB
sha256:5b9138d725a4ae81b9b46cc8bab5f3394b173e7da90b2b60a31cb586677aa0e8