Skip to content

Commit

Permalink
RUBY-3362 sync specs to fix failing tests on server version 7.3 (#2819)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamis authored Jan 9, 2024
1 parent d75a422 commit f18c409
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 13 deletions.
8 changes: 5 additions & 3 deletions spec/spec_tests/data/index_management/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
11 changes: 7 additions & 4 deletions spec/spec_tests/data/index_management/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
3 changes: 2 additions & 1 deletion spec/spec_tests/data/index_management/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
11 changes: 7 additions & 4 deletions spec/spec_tests/data/index_management/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
3 changes: 2 additions & 1 deletion spec/spec_tests/data/index_management/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

0 comments on commit f18c409

Please sign in to comment.