Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NH-34752 Add calculate_tracing_mode tests and fixture #138

Merged
merged 4 commits into from
Apr 27, 2023

Conversation

tammy-baylis-swi
Copy link
Contributor

@tammy-baylis-swi tammy-baylis-swi commented Apr 25, 2023

Adds unit tests for calculate_tracing_mode and construct_url, with a new fixture for a sampler with some transaction filters set.

The source code was introduced in https://github.com/solarwindscloud/solarwinds-apm-python/pull/136/files and https://github.com/solarwindscloud/solarwinds-apm-python/pull/137/files.

EDIT: In b7180d5 I've renamed both sampler fixtures for general clarity and to try to make CodeQL happy.

@tammy-baylis-swi tammy-baylis-swi requested a review from a team April 25, 2023 22:09
Comment on lines +12 to +15
from .fixtures.sampler import (
fixture_swsampler,
fixture_swsampler_txnfilters,
)

Check notice

Code scanning / CodeQL

Unused import

Import of 'fixture_swsampler' is not used. Import of 'fixture_swsampler_txnfilters' is not used.
Copy link
Contributor Author

@tammy-baylis-swi tammy-baylis-swi Apr 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dismissing this because they're actually used. pytest needs these imports for the below tests to use the fixtures via method args.

tests/unit/test_sampler/fixtures/sampler.py Fixed Show fixed Hide fixed
tests/unit/test_sampler/fixtures/sampler.py Fixed Show fixed Hide fixed
@tammy-baylis-swi tammy-baylis-swi merged commit 3cd9609 into main Apr 27, 2023
@tammy-baylis-swi tammy-baylis-swi deleted the NH-34752-sampler-unit-tests branch April 27, 2023 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants