Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DRIVERS-2797 Check for substring in Index Management error asserts #1485

Merged
merged 2 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions source/index-management/tests/createSearchIndex.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions source/index-management/tests/createSearchIndex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ tests:
expectError:
# This test always errors in a non-Atlas environment. The test functions as a unit test by asserting
# that the driver constructs and sends the correct command.
# The expected error message was changed in SERVER-83003. Check for the substring "Atlas" shared by both error messages.
isError: true
errorContains: Search index commands are only supported with Atlas
errorContains: Atlas
expectEvents:
- client: *client0
events:
Expand All @@ -50,13 +51,14 @@ tests:
expectError:
# This test always errors in a non-Atlas environment. The test functions as a unit test by asserting
# that the driver constructs and sends the correct command.
# The expected error message was changed in SERVER-83003. Check for the substring "Atlas" shared by both error messages.
isError: true
errorContains: Search index commands are only supported with Atlas
errorContains: Atlas
expectEvents:
- client: *client0
events:
- commandStartedEvent:
command:
createSearchIndexes: *collection0
indexes: [ { definition: *definition, name: 'test index' } ]
$db: *database0
$db: *database0
6 changes: 3 additions & 3 deletions source/index-management/tests/createSearchIndexes.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 7 additions & 4 deletions source/index-management/tests/createSearchIndexes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ tests:
expectError:
# This test always errors in a non-Atlas environment. The test functions as a unit test by asserting
# that the driver constructs and sends the correct command.
# The expected error message was changed in SERVER-83003. Check for the substring "Atlas" shared by both error messages.
isError: true
errorContains: Search index commands are only supported with Atlas
errorContains: Atlas
expectEvents:
- client: *client0
events:
Expand All @@ -51,8 +52,9 @@ tests:
expectError:
# This test always errors in a non-Atlas environment. The test functions as a unit test by asserting
# that the driver constructs and sends the correct command.
# The expected error message was changed in SERVER-83003. Check for the substring "Atlas" shared by both error messages.
isError: true
errorContains: Search index commands are only supported with Atlas
errorContains: Atlas
expectEvents:
- client: *client0
events:
Expand All @@ -71,13 +73,14 @@ tests:
expectError:
# This test always errors in a non-Atlas environment. The test functions as a unit test by asserting
# that the driver constructs and sends the correct command.
# The expected error message was changed in SERVER-83003. Check for the substring "Atlas" shared by both error messages.
isError: true
errorContains: Search index commands are only supported with Atlas
errorContains: Atlas
expectEvents:
- client: *client0
events:
- commandStartedEvent:
command:
createSearchIndexes: *collection0
indexes: [ { definition: *definition, name: 'test index' } ]
$db: *database0
$db: *database0
2 changes: 1 addition & 1 deletion source/index-management/tests/dropSearchIndex.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion source/index-management/tests/dropSearchIndex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ tests:
expectError:
# This test always errors in a non-Atlas environment. The test functions as a unit test by asserting
# that the driver constructs and sends the correct command.
# The expected error message was changed in SERVER-83003. Check for the substring "Atlas" shared by both error messages.
isError: true
errorContains: Search index commands are only supported with Atlas
errorContains: Atlas
expectEvents:
- client: *client0
events:
Expand Down
6 changes: 3 additions & 3 deletions source/index-management/tests/listSearchIndexes.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 7 additions & 4 deletions source/index-management/tests/listSearchIndexes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ tests:
expectError:
# This test always errors in a non-Atlas environment. The test functions as a unit test by asserting
# that the driver constructs and sends the correct command.
# The expected error message was changed in SERVER-83003. Check for the substring "Atlas" shared by both error messages.
isError: true
errorContains: Search index commands are only supported with Atlas
errorContains: Atlas
expectEvents:
- client: *client0
events:
Expand All @@ -48,8 +49,9 @@ tests:
expectError:
# This test always errors in a non-Atlas environment. The test functions as a unit test by asserting
# that the driver constructs and sends the correct command.
# The expected error message was changed in SERVER-83003. Check for the substring "Atlas" shared by both error messages.
isError: true
errorContains: Search index commands are only supported with Atlas
errorContains: Atlas
expectEvents:
- client: *client0
events:
Expand All @@ -71,8 +73,9 @@ tests:
expectError:
# This test always errors in a non-Atlas environment. The test functions as a unit test by asserting
# that the driver constructs and sends the correct command.
# The expected error message was changed in SERVER-83003. Check for the substring "Atlas" shared by both error messages.
isError: true
errorContains: Search index commands are only supported with Atlas
errorContains: Atlas
expectEvents:
- client: *client0
events:
Expand All @@ -82,4 +85,4 @@ tests:
cursor: { batchSize: 10 }
pipeline:
- $listSearchIndexes: { name: *indexName }
$db: *database0
$db: *database0

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ tests:
expectError:
# This test always errors in a non-Atlas environment. The test functions as a unit test by asserting
# that the driver constructs and sends the correct command.
# The expected error message was changed in SERVER-83003. Check for the substring "Atlas" shared by both error messages.
isError: true
errorContains: Search index commands are only supported with Atlas
errorContains: Atlas
expectEvents:
- client: *client0
events:
Expand All @@ -57,8 +58,9 @@ tests:
expectError:
# This test always errors in a non-Atlas environment. The test functions as a unit test by asserting
# that the driver constructs and sends the correct command.
# The expected error message was changed in SERVER-83003. Check for the substring "Atlas" shared by both error messages.
isError: true
errorContains: Search index commands are only supported with Atlas
errorContains: Atlas
expectEvents:
- client: *client0
events:
Expand All @@ -80,8 +82,9 @@ tests:
expectError:
# This test always errors in a non-Atlas environment. The test functions as a unit test by asserting
# that the driver constructs and sends the correct command.
# The expected error message was changed in SERVER-83003. Check for the substring "Atlas" shared by both error messages.
isError: true
errorContains: Search index commands are only supported with Atlas
errorContains: Atlas
expectEvents:
- client: *client0
events:
Expand All @@ -101,8 +104,9 @@ tests:
expectError:
# This test always errors in a non-Atlas environment. The test functions as a unit test by asserting
# that the driver constructs and sends the correct command.
# The expected error message was changed in SERVER-83003. Check for the substring "Atlas" shared by both error messages.
isError: true
errorContains: Search index commands are only supported with Atlas
errorContains: Atlas
expectEvents:
- client: *client0
events:
Expand All @@ -125,8 +129,9 @@ tests:
expectError:
# This test always errors in a non-Atlas environment. The test functions as a unit test by asserting
# that the driver constructs and sends the correct command.
# The expected error message was changed in SERVER-83003. Check for the substring "Atlas" shared by both error messages.
isError: true
errorContains: Search index commands are only supported with Atlas
errorContains: Atlas
expectEvents:
- client: *client0
events:
Expand Down
2 changes: 1 addition & 1 deletion source/index-management/tests/updateSearchIndex.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion source/index-management/tests/updateSearchIndex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ tests:
expectError:
# This test always errors in a non-Atlas environment. The test functions as a unit test by asserting
# that the driver constructs and sends the correct command.
# The expected error message was changed in SERVER-83003. Check for the substring "Atlas" shared by both error messages.
isError: true
errorContains: Search index commands are only supported with Atlas
errorContains: Atlas
expectEvents:
- client: *client0
events:
Expand Down
Loading