Skip to content

Commit

Permalink
Merge branch 'v1' of github.com:mongodb/mongo-go-driver into kmip-ser…
Browse files Browse the repository at this point in the history
…ver-scripts
  • Loading branch information
blink1073 committed Jan 12, 2024
2 parents d8c23f2 + c1b1a4f commit f92d034
Show file tree
Hide file tree
Showing 14 changed files with 445 additions and 54 deletions.
24 changes: 0 additions & 24 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2190,30 +2190,6 @@ task_groups:
script: |
${PREPARE_SHELL}
if [ -z "${SERVERLESS_MONGODB_VERSION}" ]; then
echo "expected SERVERLESS_MONGODB_VERSION to be set"
exit 1
fi
# Download the enterprise server download for current platform to $MONGODB_BINARIES.
# This is required for tests that need mongocryptd.
# $MONGODB_BINARIES is added to the $PATH in fetch-source.
${PYTHON3_BINARY} $DRIVERS_TOOLS/.evergreen/mongodl.py \
--component archive \
--version ${SERVERLESS_MONGODB_VERSION} \
--edition enterprise \
--out $MONGODB_BINARIES \
--strip-path-components 2
# Download the crypt_shared dynamic library for the current platform.
${PYTHON3_BINARY} $DRIVERS_TOOLS/.evergreen/mongodl.py \
--component crypt_shared \
--version ${SERVERLESS_MONGODB_VERSION} \
--edition enterprise \
--out . \
--only "**/mongo_crypt_v1.*" \
--strip-path-components 1
# Find the crypt_shared library file in the current directory and set the CRYPT_SHARED_LIB_PATH to
# the path of that file. Only look for .so, .dll, or .dylib files to prevent matching any other
# downloaded files.
Expand Down
7 changes: 7 additions & 0 deletions mongo/integration/unified/unified_spec_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,16 @@ var (
// GODRIVER-1773: This test runs a "find" with limit=4 and batchSize=3. It expects batchSize values of three for
// the "find" and one for the "getMore", but we send three for both.
"A successful find event with a getmore and the server kills the cursor (<= 4.4)": "See GODRIVER-1773",

// TODO(GODRIVER-2843): Fix and unskip these test cases.
"Find operation with snapshot": "Test fails frequently. See GODRIVER-2843",
"Write commands with snapshot session do not affect snapshot reads": "Test fails frequently. See GODRIVER-2843",

// TODO(GODRIVER-3043): Avoid Appending Write/Read Concern in Atlas Search
// Index Helper Commands.
"dropSearchIndex ignores read and write concern": "Sync GODRIVER-3074, but skip testing bug GODRIVER-3043",
"listSearchIndexes ignores read and write concern": "Sync GODRIVER-3074, but skip testing bug GODRIVER-3043",
"updateSearchIndex ignores the read and write concern": "Sync GODRIVER-3074, but skip testing bug GODRIVER-3043",
}

logMessageValidatorTimeout = 10 * time.Millisecond
Expand Down
6 changes: 3 additions & 3 deletions testdata/index-management/createSearchIndex.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
},
"expectError": {
"isError": true,
"errorContains": "Search index commands are only supported with Atlas"
"errorContains": "Atlas"
}
}
],
Expand Down Expand Up @@ -102,7 +102,7 @@
},
"expectError": {
"isError": true,
"errorContains": "Search index commands are only supported with Atlas"
"errorContains": "Atlas"
}
}
],
Expand Down Expand Up @@ -133,4 +133,4 @@
]
}
]
}
}
8 changes: 5 additions & 3 deletions testdata/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
8 changes: 4 additions & 4 deletions testdata/index-management/createSearchIndexes.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
},
"expectError": {
"isError": true,
"errorContains": "Search index commands are only supported with Atlas"
"errorContains": "Atlas"
}
}
],
Expand Down Expand Up @@ -89,7 +89,7 @@
},
"expectError": {
"isError": true,
"errorContains": "Search index commands are only supported with Atlas"
"errorContains": "Atlas"
}
}
],
Expand Down Expand Up @@ -138,7 +138,7 @@
},
"expectError": {
"isError": true,
"errorContains": "Search index commands are only supported with Atlas"
"errorContains": "Atlas"
}
}
],
Expand Down Expand Up @@ -169,4 +169,4 @@
]
}
]
}
}
11 changes: 7 additions & 4 deletions testdata/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
4 changes: 2 additions & 2 deletions testdata/index-management/dropSearchIndex.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
},
"expectError": {
"isError": true,
"errorContains": "Search index commands are only supported with Atlas"
"errorContains": "Atlas"
}
}
],
Expand All @@ -71,4 +71,4 @@
]
}
]
}
}
5 changes: 3 additions & 2 deletions testdata/index-management/dropSearchIndex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,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:
dropSearchIndex: *collection0
name: *indexName
$db: *database0
$db: *database0
8 changes: 4 additions & 4 deletions testdata/index-management/listSearchIndexes.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"object": "collection0",
"expectError": {
"isError": true,
"errorContains": "Search index commands are only supported with Atlas"
"errorContains": "Atlas"
}
}
],
Expand Down Expand Up @@ -81,7 +81,7 @@
},
"expectError": {
"isError": true,
"errorContains": "Search index commands are only supported with Atlas"
"errorContains": "Atlas"
}
}
],
Expand Down Expand Up @@ -122,7 +122,7 @@
},
"expectError": {
"isError": true,
"errorContains": "Search index commands are only supported with Atlas"
"errorContains": "Atlas"
}
}
],
Expand Down Expand Up @@ -153,4 +153,4 @@
]
}
]
}
}
11 changes: 7 additions & 4 deletions testdata/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
Loading

0 comments on commit f92d034

Please sign in to comment.