To run the tests you need to install the emaj database extension. This extensions enables rollbacks on the database without using database-level transactions. If the following instructions don't work, follow the instructions on the emaj Github Readme or the emaj documentation.
Go to the extension download page and find the version number of the latest release of E-Maj. Run the following commands in your bash or zsh (and adjust the version in the first line):
# Adjust the version
VERSION="2.2.1"
SHAREDIR="$(pg_config --sharedir)"
curl -L http://api.pgxn.org/dist/e-maj/${VERSION}/e-maj-${VERSION}.zip > $TMPDIR/e-maj-${VERSION}.zip
tar xf e-maj-${VERSION}.zip
cd e-maj-${VERSION}
cp sql/emaj--${VERSION}.sql emaj.control $SHAREDIR/extension
Otherwise, you can do this manually with these steps:
- Download the package from PGXN and unzip it
- Copy latest emaj version sql file (e.g.
sql/emaj--2.2.1.sql
in unzipped folder) andemaj.control
file in theSHAREDIR
directory (check withpg_config --sharedir
). On e.g. Arch Linux it's/usr/share/postgresql
, maybe you have to copy the files to/usr/share/postgresql/extension
. Alternatively, you can leave theemaj--2.2.1.sql
file where it is and just adjust the directory parameter in theemaj.control
file to reflect the location of it. - The rest of the steps will be executed when you run
cucumber
(seefeatures/support/emaj.sql
)
- Run
cucumber
to start the test suite. This also sets up the ontohub-specifics for E-Maj. - The first execution could take a while, because all the sub-projects' repositories need to be cloned. Everything is fine if all the tests are green in the end.
- If you want the tests to run on specific commits you can run
ONTOHUB_BACKEND_VERSION='12345678abcdefg' ONTOHUB_FRONTED_VERSION='12345678abcdefg' HETS_RABBITMQ_WRAPPER_VERSION='12345678abcdefg' cucumber
. If you want e.g. just the backend in a specific revision, only useONTOHUB_BACKEND_VERSION
. Remember that the tests may fail depending on the commits that you check out.