Skip to content

Commit 05be064

Browse files
committed
test: unittests are integrated to the docker-compose file
Signed-off-by: Cagri Yonca <cagri@ibm.com>
1 parent 48d16d0 commit 05be064

10 files changed

Lines changed: 424 additions & 81 deletions

File tree

Dockerfile.test

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
ARG PYTHON_VERSION=3.12
2+
FROM public.ecr.aws/docker/library/python:${PYTHON_VERSION}-slim
3+
4+
RUN apt-get update && apt-get install -y \
5+
gcc \
6+
g++ \
7+
make \
8+
git \
9+
pkg-config \
10+
default-libmysqlclient-dev \
11+
&& rm -rf /var/lib/apt/lists/*
12+
13+
WORKDIR /app
14+
15+
RUN pip install --no-cache-dir --upgrade pip
16+
17+
CMD ["echo", "Container ready..."]

README.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,29 @@ You can find more documentation covering supported components and minimum versio
5555

5656
Bug reports and pull requests are welcome on GitHub at https://github.com/instana/python-sensor.
5757

58-
## More
58+
## Run Tests with Docker
59+
Docker compose file currently supports up to Python version 3.14.
60+
61+
Run tests for all Python versions:
62+
- `docker compose --profile infra-general --profile tests-general up --build --abort-on-container-exit | grep python-sensor-test`
63+
64+
To run tests for a specific Python version using Docker, 3.12 for example:
65+
- `docker compose --profile infra-general --profile py312 up --build --abort-on-container-exit | grep python-sensor-test`
66+
67+
Cassandra Tests:
68+
- `docker compose --profile infra-cassandra --profile tests-cassandra up --build --abort-on-container-exit | grep python-sensor-test`
5969

60-
Want to instrument other languages? See our [Node.js], [Go], [Ruby] instrumentation or many other [supported technologies].
70+
Kafka Tests:
71+
- `docker compose --profile infra-kafka --profile tests-kafka up --build --abort-on-container-exit | grep python-sensor-test`
72+
73+
Gevent Tests:
74+
- `docker compose --profile tests-gevent up --build --abort-on-container-exit | grep python-sensor-test`
75+
76+
AWS Tests:
77+
- `docker compose --profile tests-aws up --build --abort-on-container-exit | grep python-sensor-test`
78+
79+
## More
80+
Want to instrument other languages? See our [Node.js], [Go], [Ruby] instrumentation or many other [supported technologies].
6181

6282
<!-- Reference links -->
6383
[Instana]: https://www.instana.com/ "IBM Instana Observability"

0 commit comments

Comments
 (0)