Skip to content

Commit aa6c681

Browse files
Fixes for running integration tests on Ubuntu 22.04+ (#1327)
* Update integration-tests.sh to use mongosh * Disable legacy-shell for the releng variant
1 parent 6b43e37 commit aa6c681

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

.evergreen/generated_configs/legacy-config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9228,6 +9228,8 @@ buildvariants:
92289228
- abi-compliance-check
92299229
- name: releng
92309230
display_name: '**Release Archive Creator'
9231+
expansions:
9232+
SKIP_LEGACY_SHELL: '1'
92319233
run_on: ubuntu2204-small
92329234
tasks:
92339235
- make-release-archive

.evergreen/legacy_config_generator/evergreen_config_lib/variants.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,10 @@ def days(n: int) -> int:
7272
"debug-compile-with-warnings",
7373
OD([("name", "build-and-test-with-toolchain"), ("distros", ["debian10-small"])]),
7474
],
75-
{},
75+
{
76+
# Disable the MongoDB legacy shell download, which is not available in 5.0 for u22
77+
"SKIP_LEGACY_SHELL": "1"
78+
},
7679
),
7780
Variant(
7881
"clang34ubuntu",

.evergreen/scripts/integration-tests.sh

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ DIR=$(dirname $0)
3030

3131
get_distro
3232
get_mongodb_download_url_for "$DISTRO" "$MONGODB_VERSION"
33-
DRIVERS_TOOLS=./ download_and_extract "$MONGODB_DOWNLOAD_URL" "$EXTRACT"
34-
33+
DRIVERS_TOOLS=./ download_and_extract "$MONGODB_DOWNLOAD_URL" "$EXTRACT" "$MONGOSH_DOWNLOAD_URL" "$EXTRACT_MONGOSH"
3534

3635
OS=$(uname -s | tr '[:upper:]' '[:lower:]')
3736

@@ -115,7 +114,6 @@ case "$OS" in
115114
cd mongo-orchestration
116115
python -m pip install .
117116
cd ../..
118-
ls `pwd`/mongodb/bin/mongo* || true
119117
nohup mongo-orchestration -f orchestration.config -e default --socket-timeout-ms=60000 --bind=127.0.0.1 --enable-majority-read-concern -s wsgiref start > $MONGO_ORCHESTRATION_HOME/out.log 2> $MONGO_ORCHESTRATION_HOME/err.log < /dev/null &
120118
;;
121119
*)
@@ -162,7 +160,7 @@ python -m json.tool curl_mo.txt
162160
sleep 15
163161

164162
if [ "$AUTH" = "auth" ]; then
165-
MONGO_SHELL_CONNECTION_FLAGS="-ubob -ppwd123"
163+
MONGO_SHELL_CONNECTION_FLAGS="--username bob --password pwd123"
166164
fi
167165

168166
if [ -n "$AUTHSOURCE" ]; then
@@ -178,14 +176,11 @@ fi
178176
if [ ! -z "$REQUIRE_API_VERSION" ]; then
179177
MONGO_SHELL_CONNECTION_FLAGS="${MONGO_SHELL_CONNECTION_FLAGS} --apiVersion=1"
180178
# Set the requireApiVersion parameter.
181-
`pwd`/mongodb/bin/mongo $MONGO_SHELL_CONNECTION_FLAGS $DIR/../etc/require-api-version.js
179+
./mongodb/bin/mongosh $MONGO_SHELL_CONNECTION_FLAGS $DIR/../etc/require-api-version.js
182180
fi
183181

184182
echo $MONGO_SHELL_CONNECTION_FLAGS
185183

186-
`pwd`/mongodb/bin/mongo $MONGO_SHELL_CONNECTION_FLAGS --eval 'printjson(db.serverBuildInfo())' admin
187-
`pwd`/mongodb/bin/mongo $MONGO_SHELL_CONNECTION_FLAGS --eval 'printjson(db.isMaster())' admin
188-
189184
# Create mo-expansion.yml. expansions.update expects the file to exist.
190185
touch mo-expansion.yml
191186

@@ -199,7 +194,7 @@ else
199194
echo "CRYPT_SHARED_LIB_PATH must be assigned, but wasn't" 1>&2 # write to stderr"
200195
exit 1
201196
fi
202-
cat >>mo-expansion.yml <<EOT
197+
cat >>mo-expansion.yml <<EOT
203198
CRYPT_SHARED_LIB_PATH: "$CRYPT_SHARED_LIB_PATH"
204199
EOT
205200

0 commit comments

Comments
 (0)