feat: add ability to create atlas search indexes MCP-275 #788
code-health.yml
on: pull_request
Matrix: Run MongoDB tests
Run git secrets
1m 19s
Report Coverage
23s
Annotations
8 errors and 1 warning
|
Run MongoDB tests (ubuntu-latest)
Process completed with exit code 1.
|
|
tests/integration/tools/mongodb/create/createIndex.test.ts > createIndex tool with Atlas search indexes > when the collection exists > can create classic and Atlas search indexes with the same name:
tests/integration/tools/mongodb/create/createIndex.test.ts#L909
AssertionError: expected 'MCP error -32602: Input validation er…' to deeply equal 'Created the index "my-search-index" o…'
- Expected
+ Received
- Created the index "my-search-index" on collection "692ec7048a31f96be0291e9c" in database "692ec7048a31f96be0291e9a". Since this is a search index, it may take a while for the index to build. Use the `list-indexes` tool to check the index status.
+ MCP error -32602: Input validation error: Invalid arguments for tool create-index: [
+ {
+ "code": "invalid_union_discriminator",
+ "options": [
+ "classic"
+ ],
+ "path": [
+ "definition",
+ 0,
+ "type"
+ ],
+ "message": "Invalid discriminator value. Expected 'classic'"
+ }
+ ]
❯ tests/integration/tools/mongodb/create/createIndex.test.ts:909:33
|
|
tests/integration/tools/mongodb/create/createIndex.test.ts > createIndex tool with Atlas search indexes > when the collection exists > doesn't duplicate search indexes:
tests/integration/tools/mongodb/create/createIndex.test.ts#L861
AssertionError: expected 'MCP error -32602: Input validation er…' to deeply equal 'Created the index "search_index" on c…'
- Expected
+ Received
- Created the index "search_index" on collection "692ec7048a31f96be0291e99" in database "692ec7038a31f96be0291e97". Since this is a search index, it may take a while for the index to build. Use the `list-indexes` tool to check the index status.
+ MCP error -32602: Input validation error: Invalid arguments for tool create-index: [
+ {
+ "code": "invalid_union_discriminator",
+ "options": [
+ "classic"
+ ],
+ "path": [
+ "definition",
+ 0,
+ "type"
+ ],
+ "message": "Invalid discriminator value. Expected 'classic'"
+ }
+ ]
❯ tests/integration/tools/mongodb/create/createIndex.test.ts:861:33
|
|
tests/integration/tools/mongodb/create/createIndex.test.ts > createIndex tool with Atlas search indexes > when the collection exists > creates the index with dynamic mappings:
tests/integration/tools/mongodb/create/createIndex.test.ts#L820
AssertionError: expected 'MCP error -32602: Input validation er…' to deeply equal 'Created the index "dynamic_search_ind…'
- Expected
+ Received
- Created the index "dynamic_search_index" on collection "692ec7038a31f96be0291e96" in database "692ec7038a31f96be0291e94". Since this is a search index, it may take a while for the index to build. Use the `list-indexes` tool to check the index status.
+ MCP error -32602: Input validation error: Invalid arguments for tool create-index: [
+ {
+ "code": "invalid_union_discriminator",
+ "options": [
+ "classic"
+ ],
+ "path": [
+ "definition",
+ 0,
+ "type"
+ ],
+ "message": "Invalid discriminator value. Expected 'classic'"
+ }
+ ]
❯ tests/integration/tools/mongodb/create/createIndex.test.ts:820:33
|
|
tests/integration/tools/mongodb/create/createIndex.test.ts > createIndex tool with Atlas search indexes > when the collection exists > creates the index with explicit field mappings:
tests/integration/tools/mongodb/create/createIndex.test.ts#L778
AssertionError: expected 'MCP error -32602: Input validation er…' to deeply equal 'Created the index "search_index" on c…'
- Expected
+ Received
- Created the index "search_index" on collection "692ec7038a31f96be0291e93" in database "692ec7038a31f96be0291e91". Since this is a search index, it may take a while for the index to build. Use the `list-indexes` tool to check the index status.
+ MCP error -32602: Input validation error: Invalid arguments for tool create-index: [
+ {
+ "code": "invalid_union_discriminator",
+ "options": [
+ "classic"
+ ],
+ "path": [
+ "definition",
+ 0,
+ "type"
+ ],
+ "message": "Invalid discriminator value. Expected 'classic'"
+ }
+ ]
❯ tests/integration/tools/mongodb/create/createIndex.test.ts:778:33
|
|
tests/integration/tools/mongodb/create/createIndex.test.ts > createIndex tool with Atlas search indexes > when the database does not exist > throws an error:
tests/integration/tools/mongodb/create/createIndex.test.ts#L733
AssertionError: expected 'MCP error -32602: Input validation er…' to contain 'Collection \'nonexistent_db.foo\' doe…'
- Expected
+ Received
- Collection 'nonexistent_db.foo' does not exist
+ MCP error -32602: Input validation error: Invalid arguments for tool create-index: [
+ {
+ "code": "invalid_union_discriminator",
+ "options": [
+ "classic"
+ ],
+ "path": [
+ "definition",
+ 0,
+ "type"
+ ],
+ "message": "Invalid discriminator value. Expected 'classic'"
+ }
+ ]
❯ tests/integration/tools/mongodb/create/createIndex.test.ts:733:33
|
|
tests/integration/tools/mongodb/create/createIndex.test.ts > createIndex tool with Atlas search indexes > when the collection does not exist > throws an error:
tests/integration/tools/mongodb/create/createIndex.test.ts#L709
AssertionError: expected 'MCP error -32602: Input validation er…' to contain 'Collection \'692ec6fc8a31f96be0291e54…'
- Expected
+ Received
- Collection '692ec6fc8a31f96be0291e54.foo' does not exist
+ MCP error -32602: Input validation error: Invalid arguments for tool create-index: [
+ {
+ "code": "invalid_union_discriminator",
+ "options": [
+ "classic"
+ ],
+ "path": [
+ "definition",
+ 0,
+ "type"
+ ],
+ "message": "Invalid discriminator value. Expected 'classic'"
+ }
+ ]
❯ tests/integration/tools/mongodb/create/createIndex.test.ts:709:33
|
|
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.
|
Artifacts
Produced during runtime
| Name | Size | Digest | |
|---|---|---|---|
|
atlas-local-test-results
|
18.9 KB |
sha256:4543e2c9b20c454317e942337f6637c09f67559c7582c46e4882d20686a515b6
|
|
|
atlas-test-results
|
20.5 KB |
sha256:af10a677976aa0617fb79200cb669550db32b62386823c18a11cd2971c29faa8
|
|
|
run-atlas-local-tests-permissions-110ad4871fc7654ccc1f405a3af44b9b
|
140 Bytes |
sha256:e6bb7bcf84f68242259f3a4a50c7037ba9b4b8672bf3ea9fe639f5aab940c567
|
|
|
run-atlas-tests-permissions-7e0ba21132573749b55b92a6b6a690ef
|
140 Bytes |
sha256:671c77a3aa7319c1e1fa8678d49215dae7cbaea190765dbb6a5e8a18b3dbfcb5
|
|
|
run-git-secrets-permissions-bd93d79c179054c8fcff784204c80e49
|
140 Bytes |
sha256:6e1fb428177c363399dec769f54b7cd9b4557ff00f30ec2a8777b350a8d89307
|
|
|
run-tests-permissions-c47a09ad052c29e22ee61b1f48cf359a
|
140 Bytes |
sha256:21d5f7b75347b17b118bfd039a4e9572c3ba3e286f46f85d7f35d24e10fbde61
|
|