-
Notifications
You must be signed in to change notification settings - Fork 602
Running the Tests
This page describes how to run any of the tests included in this project.
There are a few influential environment variables that you may want to set before running the tests. These are:
-
MONGO_INPUT_URI
is the value formongo.input.uri
to use when running any of the examples. -
MONGO_AUTH_URI
is the value formongo.auth.uri
to use when running any of the examples. -
MONGO_USER
is the username to use when trying to authenticate against the "admin" database. This is currently only used formongorestore
when importing the Enron emails data set for the "enronEmails" example. -
MONGO_PASSWORD
is the password for the above user.
MongoDB not included. Make sure to start MongoDB on port 27017 listening on "localhost" before running the tests. The test suite will automatically download, install, and run a Hadoop cluster, however.
You can run this entire test suite with Gradle:
./gradlew test
This will also start a Hadoop cluster and a Hive server automatically. It does not start MongoDB, so make sure that there is a mongod
running on 27017 before running the tests.
You can also run tests for each module individually:
./gradlew hive:test
will run all the tests for Hive, for example.
Some of the tests need to connect to MongoDB to run. The test suite does not automatically start MongoDB, so make sure to start MongoDB on port 27017 before running the tests.
The tests assume that you have mongoimport
and mongoexport
installed, and that these tools live in /usr/local/bin
. If this is not where they live, then you can edit the ext.mongoimport
and ext.mongoexport
variables in build.gradle to point to the right location.