Skip to content

Commit 6943ba1

Browse files
authored
DRIVERS-2797 Check for substring in Index Management error asserts (#1485)
1 parent 1c40a03 commit 6943ba1

12 files changed

+48
-33
lines changed

source/index-management/tests/createSearchIndex.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

source/index-management/tests/createSearchIndex.yml

+5-3
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ tests:
3030
expectError:
3131
# This test always errors in a non-Atlas environment. The test functions as a unit test by asserting
3232
# that the driver constructs and sends the correct command.
33+
# The expected error message was changed in SERVER-83003. Check for the substring "Atlas" shared by both error messages.
3334
isError: true
34-
errorContains: Search index commands are only supported with Atlas
35+
errorContains: Atlas
3536
expectEvents:
3637
- client: *client0
3738
events:
@@ -50,13 +51,14 @@ tests:
5051
expectError:
5152
# This test always errors in a non-Atlas environment. The test functions as a unit test by asserting
5253
# that the driver constructs and sends the correct command.
54+
# The expected error message was changed in SERVER-83003. Check for the substring "Atlas" shared by both error messages.
5355
isError: true
54-
errorContains: Search index commands are only supported with Atlas
56+
errorContains: Atlas
5557
expectEvents:
5658
- client: *client0
5759
events:
5860
- commandStartedEvent:
5961
command:
6062
createSearchIndexes: *collection0
6163
indexes: [ { definition: *definition, name: 'test index' } ]
62-
$db: *database0
64+
$db: *database0

source/index-management/tests/createSearchIndexes.json

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

source/index-management/tests/createSearchIndexes.yml

+7-4
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ tests:
3030
expectError:
3131
# This test always errors in a non-Atlas environment. The test functions as a unit test by asserting
3232
# that the driver constructs and sends the correct command.
33+
# The expected error message was changed in SERVER-83003. Check for the substring "Atlas" shared by both error messages.
3334
isError: true
34-
errorContains: Search index commands are only supported with Atlas
35+
errorContains: Atlas
3536
expectEvents:
3637
- client: *client0
3738
events:
@@ -51,8 +52,9 @@ tests:
5152
expectError:
5253
# This test always errors in a non-Atlas environment. The test functions as a unit test by asserting
5354
# that the driver constructs and sends the correct command.
55+
# The expected error message was changed in SERVER-83003. Check for the substring "Atlas" shared by both error messages.
5456
isError: true
55-
errorContains: Search index commands are only supported with Atlas
57+
errorContains: Atlas
5658
expectEvents:
5759
- client: *client0
5860
events:
@@ -71,13 +73,14 @@ tests:
7173
expectError:
7274
# This test always errors in a non-Atlas environment. The test functions as a unit test by asserting
7375
# that the driver constructs and sends the correct command.
76+
# The expected error message was changed in SERVER-83003. Check for the substring "Atlas" shared by both error messages.
7477
isError: true
75-
errorContains: Search index commands are only supported with Atlas
78+
errorContains: Atlas
7679
expectEvents:
7780
- client: *client0
7881
events:
7982
- commandStartedEvent:
8083
command:
8184
createSearchIndexes: *collection0
8285
indexes: [ { definition: *definition, name: 'test index' } ]
83-
$db: *database0
86+
$db: *database0

source/index-management/tests/dropSearchIndex.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

source/index-management/tests/dropSearchIndex.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ tests:
3030
expectError:
3131
# This test always errors in a non-Atlas environment. The test functions as a unit test by asserting
3232
# that the driver constructs and sends the correct command.
33+
# The expected error message was changed in SERVER-83003. Check for the substring "Atlas" shared by both error messages.
3334
isError: true
34-
errorContains: Search index commands are only supported with Atlas
35+
errorContains: Atlas
3536
expectEvents:
3637
- client: *client0
3738
events:

source/index-management/tests/listSearchIndexes.json

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

source/index-management/tests/listSearchIndexes.yml

+7-4
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ tests:
2828
expectError:
2929
# This test always errors in a non-Atlas environment. The test functions as a unit test by asserting
3030
# that the driver constructs and sends the correct command.
31+
# The expected error message was changed in SERVER-83003. Check for the substring "Atlas" shared by both error messages.
3132
isError: true
32-
errorContains: Search index commands are only supported with Atlas
33+
errorContains: Atlas
3334
expectEvents:
3435
- client: *client0
3536
events:
@@ -48,8 +49,9 @@ tests:
4849
expectError:
4950
# This test always errors in a non-Atlas environment. The test functions as a unit test by asserting
5051
# that the driver constructs and sends the correct command.
52+
# The expected error message was changed in SERVER-83003. Check for the substring "Atlas" shared by both error messages.
5153
isError: true
52-
errorContains: Search index commands are only supported with Atlas
54+
errorContains: Atlas
5355
expectEvents:
5456
- client: *client0
5557
events:
@@ -71,8 +73,9 @@ tests:
7173
expectError:
7274
# This test always errors in a non-Atlas environment. The test functions as a unit test by asserting
7375
# that the driver constructs and sends the correct command.
76+
# The expected error message was changed in SERVER-83003. Check for the substring "Atlas" shared by both error messages.
7477
isError: true
75-
errorContains: Search index commands are only supported with Atlas
78+
errorContains: Atlas
7679
expectEvents:
7780
- client: *client0
7881
events:
@@ -82,4 +85,4 @@ tests:
8285
cursor: { batchSize: 10 }
8386
pipeline:
8487
- $listSearchIndexes: { name: *indexName }
85-
$db: *database0
88+
$db: *database0

source/index-management/tests/searchIndexIgnoresReadWriteConcern.json

+5-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

source/index-management/tests/searchIndexIgnoresReadWriteConcern.yml

+10-5
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@ tests:
3434
expectError:
3535
# This test always errors in a non-Atlas environment. The test functions as a unit test by asserting
3636
# that the driver constructs and sends the correct command.
37+
# The expected error message was changed in SERVER-83003. Check for the substring "Atlas" shared by both error messages.
3738
isError: true
38-
errorContains: Search index commands are only supported with Atlas
39+
errorContains: Atlas
3940
expectEvents:
4041
- client: *client0
4142
events:
@@ -57,8 +58,9 @@ tests:
5758
expectError:
5859
# This test always errors in a non-Atlas environment. The test functions as a unit test by asserting
5960
# that the driver constructs and sends the correct command.
61+
# The expected error message was changed in SERVER-83003. Check for the substring "Atlas" shared by both error messages.
6062
isError: true
61-
errorContains: Search index commands are only supported with Atlas
63+
errorContains: Atlas
6264
expectEvents:
6365
- client: *client0
6466
events:
@@ -80,8 +82,9 @@ tests:
8082
expectError:
8183
# This test always errors in a non-Atlas environment. The test functions as a unit test by asserting
8284
# that the driver constructs and sends the correct command.
85+
# The expected error message was changed in SERVER-83003. Check for the substring "Atlas" shared by both error messages.
8386
isError: true
84-
errorContains: Search index commands are only supported with Atlas
87+
errorContains: Atlas
8588
expectEvents:
8689
- client: *client0
8790
events:
@@ -101,8 +104,9 @@ tests:
101104
expectError:
102105
# This test always errors in a non-Atlas environment. The test functions as a unit test by asserting
103106
# that the driver constructs and sends the correct command.
107+
# The expected error message was changed in SERVER-83003. Check for the substring "Atlas" shared by both error messages.
104108
isError: true
105-
errorContains: Search index commands are only supported with Atlas
109+
errorContains: Atlas
106110
expectEvents:
107111
- client: *client0
108112
events:
@@ -125,8 +129,9 @@ tests:
125129
expectError:
126130
# This test always errors in a non-Atlas environment. The test functions as a unit test by asserting
127131
# that the driver constructs and sends the correct command.
132+
# The expected error message was changed in SERVER-83003. Check for the substring "Atlas" shared by both error messages.
128133
isError: true
129-
errorContains: Search index commands are only supported with Atlas
134+
errorContains: Atlas
130135
expectEvents:
131136
- client: *client0
132137
events:

source/index-management/tests/updateSearchIndex.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

source/index-management/tests/updateSearchIndex.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ tests:
3131
expectError:
3232
# This test always errors in a non-Atlas environment. The test functions as a unit test by asserting
3333
# that the driver constructs and sends the correct command.
34+
# The expected error message was changed in SERVER-83003. Check for the substring "Atlas" shared by both error messages.
3435
isError: true
35-
errorContains: Search index commands are only supported with Atlas
36+
errorContains: Atlas
3637
expectEvents:
3738
- client: *client0
3839
events:

0 commit comments

Comments
 (0)