python-sensor
python-sensor copied to clipboard
[INSTA-3039] Ensure locally executable UT
This PR consists of two commits:
- Improved confluent-kafka's global context variable.
- Improved docker-compose file to integrate unittests.
You can run infra as before using this command:
-
docker compose --profile infra-general up -d
Unittests in the docker-compose file currently supports up to Python version 3.14.
Run tests for all Python versions:
-
docker compose --profile infra-general --profile tests-general up --build --abort-on-container-exit | grep python-sensor-test
To run tests for a specific Python version using Docker, 3.12 for example:
-
docker compose --profile infra-general --profile py312 up --build --abort-on-container-exit | grep python-sensor-test
Cassandra Tests:
-
docker compose --profile infra-cassandra --profile tests-cassandra up --build --abort-on-container-exit | grep python-sensor-test
Kafka Tests:
-
docker compose --profile infra-kafka --profile tests-kafka up --build --abort-on-container-exit | grep python-sensor-test
Gevent Tests:
-
docker compose --profile tests-gevent up --build --abort-on-container-exit | grep python-sensor-test
AWS Tests:
-
docker compose --profile tests-aws up --build --abort-on-container-exit | grep python-sensor-test