Skip to content

Commit abb066f

Browse files
GSVarshapvital
authored andcommitted
tests(autowrapt_bootstrap): Add tests to verify activating the tracer without code changes
Signed-off-by: Varsha GS <[email protected]>
1 parent bf0fc3c commit abb066f

File tree

4 files changed

+46
-0
lines changed

4 files changed

+46
-0
lines changed

.circleci/config.yml

+36
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,38 @@ jobs:
278278
- store-pytest-results
279279
- store-coverage-report
280280

281+
py312autowrapt:
282+
docker:
283+
- image: public.ecr.aws/docker/library/python:3.12
284+
environment:
285+
AUTOWRAPT_BOOTSTRAP: instana
286+
working_directory: ~/repo
287+
steps:
288+
- checkout
289+
- check-if-tests-needed
290+
- pip-install-deps:
291+
requirements: "tests/requirements-minimal.txt"
292+
- run-tests-with-coverage-report:
293+
tests: "tests_autowrapt"
294+
- store-pytest-results
295+
- store-coverage-report
296+
297+
py313autowrapt:
298+
docker:
299+
- image: public.ecr.aws/docker/library/python:3.13
300+
environment:
301+
AUTOWRAPT_BOOTSTRAP: instana
302+
working_directory: ~/repo
303+
steps:
304+
- checkout
305+
- check-if-tests-needed
306+
- pip-install-deps:
307+
requirements: "tests/requirements-minimal.txt"
308+
- run-tests-with-coverage-report:
309+
tests: "tests_autowrapt"
310+
- store-pytest-results
311+
- store-coverage-report
312+
281313
python313:
282314
docker:
283315
- image: public.ecr.aws/docker/library/python:3.13
@@ -423,6 +455,8 @@ workflows:
423455
- py39gevent_starlette
424456
- py312aws
425457
- py312kafka
458+
- py312autowrapt
459+
- py313autowrapt
426460
- final_job:
427461
requires:
428462
- python38
@@ -436,3 +470,5 @@ workflows:
436470
- py39cassandra
437471
- py39gevent_starlette
438472
- py312aws
473+
- py312autowrapt
474+
- py313autowrapt

pytest.ini

+1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ pythonpath = src
77
testpaths =
88
tests
99
tests_aws
10+
tests_autowrapt
1011
markers =
1112
original: mark test to use the original method instead of the mocked ones under `conftest.py`

tests/requirements-minimal.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
coverage>=5.5
2+
pytest>=4.6
3+
setuptools

tests_autowrapt/test_autowrapt.py

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import os
2+
import sys
3+
4+
def test_autowrapt_bootstrap():
5+
assert os.environ.get("AUTOWRAPT_BOOTSTRAP") == "instana"
6+
assert "instana" in sys.modules

0 commit comments

Comments
 (0)