Skip to content

Commit 4180375

Browse files
authored
DRIVERS-3357 Relax assertion constraint for search index management as the server output may change (#1871)
1 parent a6ea2eb commit 4180375

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

source/index-management/index-management.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1198,6 +1198,8 @@ from mistakenly specifying this option, drivers manually verify it is only sent
11981198

11991199
#### Changelog
12001200

1201+
- 2025-12-18: Search index tests only assert `latestDefinition.mappings.dynamic` values.
1202+
12011203
- 2025-09-09: Clarify that `rawData` is for internal use only.
12021204

12031205
- 2025-06-27: Added `rawData` option to CreateIndexOptions, DropIndexOptions and ListIndexesOptions.

source/index-management/tests/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ cluster for development.
9090
- An index with the `name` of `test-search-index` is present and the index has a field `queryable` with a value of
9191
`true`.
9292

93-
5. Assert that `index` has a property `latestDefinition` whose value is `{ 'mappings': { 'dynamic': false } }`
93+
5. Assert that `index.latestDefinition.mappings.dynamic` has the value `false`.
9494

9595
#### Case 2: Driver can successfully create multiple indexes in batch
9696

@@ -125,8 +125,8 @@ cluster for development.
125125
- An index with the `name` of `test-search-index-2` is present and index has a field `queryable` with the value of
126126
`true`. Store result in `index2`.
127127

128-
5. Assert that `index1` and `index2` have the property `latestDefinition` whose value is
129-
`{ "mappings" : { "dynamic" : false } }`
128+
5. Assert that `index1.latestDefinition.mappings.dynamic` and `index2.latestDefinition.mappings.dynamic` have the value
129+
`false`.
130130

131131
#### Case 3: Driver can successfully drop search indexes
132132

@@ -196,8 +196,8 @@ This test fails if it times out waiting for the deletion to succeed.
196196
- An index with the `name` of `test-search-index` is present. This index is referred to as `index`.
197197
- The index has a field `queryable` with a value of `true` and has a field `status` with the value of `READY`.
198198

199-
8. Assert that an index is present with the name `test-search-index` and the definition has a property
200-
`latestDefinition` whose value is `{ 'mappings': { 'dynamic': true } }`.
199+
8. Assert that an index is present with the name `test-search-index` and `index.latestDefinition.mappings.dynamic` has
200+
the value `true`.
201201

202202
#### Case 5: `dropSearchIndex` suppresses namespace not found errors
203203

@@ -230,7 +230,7 @@ This test fails if it times out waiting for the deletion to succeed.
230230
- An index with the `name` of `test-search-index-case6` is present and the index has a field `queryable` with a value
231231
of `true`.
232232

233-
6. Assert that `index` has a property `latestDefinition` whose value is `{ 'mappings': { 'dynamic': false } }`
233+
6. Assert that `index.latestDefinition.mappings.dynamic` has the value `false`.
234234

235235
#### Case 7: Driver can successfully handle search index types when creating indexes
236236

0 commit comments

Comments
 (0)