mirror of
https://git.freebsd.org/ports.git
synced 2025-04-29 18:16:48 -04:00
Still release candidate, use with care. Notes: https://www.mongodb.com/docs/v8.0/release-notes/8.0/
31 lines
606 B
Bash
Executable file
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"
|