forked from mongodb/mongo-java-driver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run-plain-auth-test.sh
executable file
·23 lines (16 loc) · 1.02 KB
/
run-plain-auth-test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
# Don't trace since the URI contains a password that shouldn't show up in the logs
set -o errexit # Exit the script with error if any of the commands fail
# Supported/used environment variables:
# MONGODB_URI Set the URI, including username/password to use to connect to the server via PLAIN authentication mechanism
# JDK Set the version of java to be used. Java versions can be set from the java toolchain /opt/java
# "jdk5", "jdk6", "jdk7", "jdk8", "jdk9"
############################################
# Main Program #
############################################
RELATIVE_DIR_PATH="$(dirname "${BASH_SOURCE:-$0}")"
. "${RELATIVE_DIR_PATH}/javaConfig.bash"
echo "Running PLAIN authentication tests"
echo "Running tests with Java ${JAVA_VERSION}"
./gradlew -version
./gradlew -PjavaVersion=${JAVA_VERSION} -Dorg.mongodb.test.uri=${MONGODB_URI} --stacktrace --info driver-core:test --tests PlainAuthenticationSpecification