Skip to content

fix: add argument validation - MCP-188 #1961

fix: add argument validation - MCP-188

fix: add argument validation - MCP-188 #1961

Triggered via pull request September 11, 2025 15:31
@blvablva
synchronize #542
MCP-188
Status Failure
Total duration 8m 15s
Artifacts 3

code_health.yaml

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

Annotations

13 errors, 9 warnings, and 1 notice
Run MongoDB tests (macos-latest)
Process completed with exit code 1.
tests/unit/args.test.ts > Tool args > Error Messages > should provide clear error messages for validation failures: tests/unit/args.test.ts#L397
AssertionError: expected [Function] to throw error including 'Cluster name Cluster names can only c…' but got '[\n {\n "validation": "regex",\n …' - Expected + Received - Cluster name Cluster names can only contain ASCII letters, numbers, and hyphens. + [ + { + "validation": "regex", + "code": "invalid_string", + "message": "Cluster names can only contain ASCII letters, numbers, and hyphens.", + "path": [] + } + ] ❯ tests/unit/args.test.ts:397:73
tests/unit/args.test.ts > Tool args > AtlasArgs > username > should reject invalid usernames: tests/unit/args.test.ts#L198
AssertionError: expected [Function] to throw error including 'Username Username can only contain le…' but got '[\n {\n "validation": "regex",\n …' - Expected + Received - Username Username can only contain letters, numbers, dots, hyphens, and underscores + [ + { + "validation": "regex", + "code": "invalid_string", + "message": "Username can only contain letters, numbers, dots, hyphens, and underscores", + "path": [] + } + ] ❯ tests/unit/args.test.ts:198:57
tests/unit/args.test.ts > Tool args > AtlasArgs > clusterName > should reject invalid cluster names: tests/unit/args.test.ts#L155
AssertionError: expected [Function] to throw error including 'Cluster name Cluster names can only c…' but got '[\n {\n "validation": "regex",\n …' - Expected + Received - Cluster name Cluster names can only contain ASCII letters, numbers, and hyphens. + [ + { + "validation": "regex", + "code": "invalid_string", + "message": "Cluster names can only contain ASCII letters, numbers, and hyphens.", + "path": [] + } + ] ❯ tests/unit/args.test.ts:155:60
Run MongoDB tests (ubuntu-latest)
Process completed with exit code 1.
tests/unit/args.test.ts > Tool args > Error Messages > should provide clear error messages for validation failures: tests/unit/args.test.ts#L397
AssertionError: expected [Function] to throw error including 'Cluster name Cluster names can only c…' but got '[\n {\n "validation": "regex",\n …' - Expected + Received - Cluster name Cluster names can only contain ASCII letters, numbers, and hyphens. + [ + { + "validation": "regex", + "code": "invalid_string", + "message": "Cluster names can only contain ASCII letters, numbers, and hyphens.", + "path": [] + } + ] ❯ tests/unit/args.test.ts:397:73
tests/unit/args.test.ts > Tool args > AtlasArgs > username > should reject invalid usernames: tests/unit/args.test.ts#L198
AssertionError: expected [Function] to throw error including 'Username Username can only contain le…' but got '[\n {\n "validation": "regex",\n …' - Expected + Received - Username Username can only contain letters, numbers, dots, hyphens, and underscores + [ + { + "validation": "regex", + "code": "invalid_string", + "message": "Username can only contain letters, numbers, dots, hyphens, and underscores", + "path": [] + } + ] ❯ tests/unit/args.test.ts:198:57
tests/unit/args.test.ts > Tool args > AtlasArgs > clusterName > should reject invalid cluster names: tests/unit/args.test.ts#L155
AssertionError: expected [Function] to throw error including 'Cluster name Cluster names can only c…' but got '[\n {\n "validation": "regex",\n …' - Expected + Received - Cluster name Cluster names can only contain ASCII letters, numbers, and hyphens. + [ + { + "validation": "regex", + "code": "invalid_string", + "message": "Cluster names can only contain ASCII letters, numbers, and hyphens.", + "path": [] + } + ] ❯ tests/unit/args.test.ts:155:60
Run MongoDB tests (windows-latest)
Process completed with exit code 1.
tests/unit/args.test.ts > Tool args > Error Messages > should provide clear error messages for validation failures: tests/unit/args.test.ts#L397
AssertionError: expected [Function] to throw error including 'Cluster name Cluster names can only c…' but got '[\n {\n "validation": "regex",\n …' - Expected + Received - Cluster name Cluster names can only contain ASCII letters, numbers, and hyphens. + [ + { + "validation": "regex", + "code": "invalid_string", + "message": "Cluster names can only contain ASCII letters, numbers, and hyphens.", + "path": [] + } + ] ❯ tests/unit/args.test.ts:397:73
tests/unit/args.test.ts > Tool args > AtlasArgs > username > should reject invalid usernames: tests/unit/args.test.ts#L198
AssertionError: expected [Function] to throw error including 'Username Username can only contain le…' but got '[\n {\n "validation": "regex",\n …' - Expected + Received - Username Username can only contain letters, numbers, dots, hyphens, and underscores + [ + { + "validation": "regex", + "code": "invalid_string", + "message": "Username can only contain letters, numbers, dots, hyphens, and underscores", + "path": [] + } + ] ❯ tests/unit/args.test.ts:198:57
tests/unit/args.test.ts > Tool args > AtlasArgs > clusterName > should reject invalid cluster names: tests/unit/args.test.ts#L155
AssertionError: expected [Function] to throw error including 'Cluster name Cluster names can only c…' but got '[\n {\n "validation": "regex",\n …' - Expected + Received - Cluster name Cluster names can only contain ASCII letters, numbers, and hyphens. + [ + { + "validation": "regex", + "code": "invalid_string", + "message": "Cluster names can only contain ASCII letters, numbers, and hyphens.", + "path": [] + } + ] ❯ tests/unit/args.test.ts:155:60
Report Coverage
Unable to download artifact(s): Artifact not found for name: 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 MongoDB tests (ubuntu-latest)
No files were found with the provided path: coverage/lcov.info. No artifacts will be uploaded.
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...
Run MongoDB tests (ubuntu-latest)
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
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 Atlas tests
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Run MongoDB tests (windows-latest)
The windows-latest label will migrate from Windows Server 2022 to Windows Server 2025 beginning September 2, 2025. For more information see https://github.com/actions/runner-images/issues/12677

Artifacts

Produced during runtime
Name Size Digest
atlas-test-results
15.7 KB
sha256:a1bfda58c0462f38bed4adb8e160300b62e5105c83ba214f2c40cb7b39b696c8
run-atlas-tests-permissions-8698e7cc9d02f4ae1d785f6b0f8cf651
140 Bytes
sha256:cf8ab801b414f50126e587f3f4d5820e0034527d3615fa5556d4140fbc39c7d8
run-tests-permissions-2c3b3f531482c84edd4ec9109c1fba67
140 Bytes
sha256:427bbdb284c5c9b89782a40c61ecd1312c32997c5d8d40aa018457d1a18e4f57