File tree 2 files changed +19
-3
lines changed
2 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -98,6 +98,10 @@ def get_options():
98
98
other_group .add_argument (
99
99
"--mongodb-binaries" , help = "The path to store the MongoDB binaries"
100
100
)
101
+ other_group .add_argument (
102
+ "--existing-binaries-dir" ,
103
+ help = "A directory containing existing mongodb binaries to use instead of downloading new ones." ,
104
+ )
101
105
102
106
# Get the options, and then allow environment variable overrides.
103
107
opts = parser .parse_args ()
@@ -197,9 +201,13 @@ def run(opts):
197
201
default_args += " -v"
198
202
args = f"{ default_args } --version { version } "
199
203
args += " --strip-path-components 2 --component archive"
200
- LOGGER .info (f"Downloading mongodb { version } ..." )
201
- mongodl (shlex .split (args ))
202
- LOGGER .info (f"Downloading mongodb { version } ... done." )
204
+ if not opts .existing_binaries_dir :
205
+ LOGGER .info (f"Downloading mongodb { version } ..." )
206
+ mongodl (shlex .split (args ))
207
+ LOGGER .info (f"Downloading mongodb { version } ... done." )
208
+ else :
209
+ LOGGER .info (f"Using existing mongod binaries dir: { opts .existing_binaries_dir } " )
210
+ shutil .copytree (opts .existing_binaries_dir , mdb_binaries )
203
211
204
212
# Download legacy shell.
205
213
if opts .install_legacy_shell :
Original file line number Diff line number Diff line change 38
38
./mongosh-dl --version 2.1.1 --out ${DOWNLOAD_DIR} --strip-path-components 1
39
39
fi
40
40
41
+ # Ensure that we can use a downloaded mongodb directory.
42
+ rm -rf ${DOWNLOAD_DIR}
43
+ bash install-cli.sh " $( pwd) /orchestration"
44
+ ./mongodl --edition enterprise --version 7.0 --component archive --out ${DOWNLOAD_DIR} --strip-path-components 2
45
+ ./orchestration/drivers-orchestration run --existing-binaries-dir=${DOWNLOAD_DIR}
46
+ ${DOWNLOAD_DIR} /mongod --version | grep v7.0
47
+ ./orchestration/drivers-orchestration stop
48
+
41
49
if [ ${1:- } == " partial" ]; then
42
50
popd
43
51
make -C ${DRIVERS_TOOLS} test
You can’t perform that action at this time.
0 commit comments