ports/databases/mongodb60/files/make.test.sh
Ronald Klop edda5a64b6
databases/mongodb60: update to 6.0.17
Changes:
https://www.mongodb.com/docs/manual/release-notes/6.0/#6.0.17---aug-21--2024

Sync with improvements in mongodb80:
commit b44fe228ca :
Removed SSL from OPTIONS. It was inherited from the first versions
of databases/mongodb, long before I became maintainer.
Currently disabling the SSL option does not disable ssl as ssl is
auto-detected and disabling ssl needs explicit --ssl=off which is
not implemented in the port. I never had a request for this in years
so I decided to just remove the option and have ssl enabled always.

commit 5d8274d264 :
Also found some manual pages in the src tree.

commit f2c9ba7c53 :
add pre-configure check if downloaded mozjs version matches
get-sources.sh.
2024-08-24 22:19:40 +02:00

31 lines
606 B
Bash
Executable file

#! /bin/sh
set -e
usage() {
echo "Usage: $0 <path>"
echo "<path> path to the executables"
}
test "$#" -eq 1 || ( usage && exit 1 )
set -x
PATH="$1:$PATH"
DBDIR=$( mktemp -d -t tmp.mongodb )
trap 'rm -rf "$DBDIR"' EXIT
# Trivial check if the binaries execute at all.
mongod --version
mongos --version
# Check if an empty database can be created.
mkdir "$DBDIR/db"
tail -F "$DBDIR/log" | ( grep -qFe "Waiting for connections" && kill $(cat "$DBDIR/pid") ) &
script -eF "$DBDIR/log" \
timeout -s TERM -k 30s 60s \
mongod --dbpath "$DBDIR/db" --pidfilepath "$DBDIR/pid"
echo "Test successful"