- Have Docker installed
- Be able to run docker without sudo.
You may need to run
newgrp docker
after the instructions in the link if you are getting still getting apermission denied
error. - Have git clone access to the Marqo repo (everyone should as it's public)
- Have Python3.8 installed
- Have pip installed
- Have the requirements found in
requirements.txt
installed - For Arm64 Machines (ignore if you have an amd64/intel chip):
- Install QEMU (this allows you to emulate the x86 instruction set on the ARM processor, needed for marqo-os).
These integration tests (especially when run with tox
) will mutate clusters it has access to.
Tox also runs scripts which remove Marqo, Marqo-os, OpenSearch containers and build images.
It is recommended for the full tests suite to run on a machine with lots of storage but no access to prod instances.
- Clone this repo
- Make a copy of
conf_sample
calledconf
in the same directory. Fill in the environment variables/credentials inconf
as appropriate. Theconf
file will be read by the startup scripts in order to populate environment variables.
- Have Marqo instance running
- Export the
TESTING_CONFIGURATION
variable toCUSTOM
. This tells the integration tests what configuration is currently being tested. Enter this command in a terminal:export TESTING_CONFIGURATION="CUSTOM"
- Then, in the same terminal, run
pytest tests/
This runs the tox tests including startup and cleanup scripts. This can mutate clusters it has access to.
This removes Marqo and Marqo-os containers found on the machine and will build Marqo images from the cloned repo.
cd
into the api testing repo home directory and run tox
, to test all environments.
To run a specific environment do tox -e <TOX ENVIRONMENT NAME>
Run the following if you are on Ubuntu:
sudo apt-get install -y qemu-user-static
If you are going to make a new test environment, make sure you set the TESTING_CONFIGURATION
environment variable so
that the test suite knows if whether or not to modify certain tests for the current configuration
You do this by creating a setenv
section in tox.ini
:
setenv =
TESTING_CONFIGURATION = YOUR_TEST_ENV_NAME
- Have a tox var to specify the image name. This allows for remote images to be tested, in addition to local builds
marqo_image_name = marqo_docker_0