Skip to content

Latest commit

 

History

History
25 lines (18 loc) · 1.04 KB

TESTING.md

File metadata and controls

25 lines (18 loc) · 1.04 KB

Testing cloudera.exe

The collection uses ansible-test for unit and integration testing.

# Sanity tests
ansible-test sanity --docker --python 3.9

# Unit tests
ansible-test units --docker --python 3.9

# Integration tests
ansible-test integration --docker

To run the integration tests, you first need to have a running virtual environment configured with Ansible (core) and the required collections. When you run ansible-test, the program will bootstrap the [requirements|tests/integration/requirements.txt] in the Docker container and mount the ANSIBLE_COLLECTION_PATHS.

# In your favorite VENV...
pip3 install ansible-core
ansible-galaxy collection install -p collections -r galaxy.yml
export ANSIBLE_COLLECTION_PATHS="$(pwd)/collections"

You also need to provide AWS credentials and test configuration in the integration_config.yml file. This file is not included in the project, as it will contain sensitive data, but there is a template -- integration_config.yml.template -- that you can copy and update as needed.