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

Fix not fips keyword on target tests #19816

Merged
merged 1 commit into from
Mar 12, 2025

Conversation

AAraKKe
Copy link
Contributor

@AAraKKe AAraKKe commented Mar 12, 2025

What does this PR do?

Looking at CI health I noticed that there were failures related with a typo on the tests we are running in which -- were passed twice and -k "no fips" was understood to be a folder to discovery tests. The error showed the folder does not exist.

Validation

Run tests:

ddev test azure_iot_edge -- -m unit -k "not fips"

Output:

────────────────────────────────────────────────────────────────────────────────────────────────────── Azure IoT Edge ──────────────────────────────────────────────────────────────────────────────────────────────────────
──────────────────────────────────────────────────────────────────────────────────────────────────────── py3.12-tls ────────────────────────────────────────────────────────────────────────────────────────────────────────
cmd [1] | pytest -vv --benchmark-skip --tb short -m unit -k 'not fips'
=================================================================================================== test session starts ====================================================================================================
platform darwin -- Python 3.12.2, pytest-8.1.1, pluggy-1.5.0 -- /Users/juanpedro.araque/Library/Application Support/hatch/env/virtual/datadog-azure-iot-edge/8xOm3K7P/py3.12-tls/bin/python
cachedir: .pytest_cache
benchmark: 5.1.0 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /Users/juanpedro.araque/go/src/github.com/DataDog/integrations-core/azure_iot_edge
configfile: pyproject.toml
plugins: asyncio-0.23.8, cov-6.0.0, ddtrace-2.10.6, flaky-3.8.1, memray-1.7.0, benchmark-5.1.0, datadog-checks-dev-35.0.0, mock-3.14.0
asyncio: mode=Mode.STRICT
collected 11 items / 6 deselected / 5 selected                                                                                                                                                                             

tests/test_config.py::test_config PASSED                                                                                                                                                                             [ 20%]
tests/test_config.py::test_config_custom_tags PASSED                                                                                                                                                                 [ 40%]
tests/test_config.py::test_config_required_options[edge_hub_prometheus_url] PASSED                                                                                                                                   [ 60%]
tests/test_config.py::test_config_required_options[edge_agent_prometheus_url] PASSED                                                                                                                                 [ 80%]
tests/test_config.py::test_config_tags_must_be_list PASSED                                                                                                                                                           [100%]

============================================================================================= 5 passed, 6 deselected in 0.01s ==============================================================================================

Motivation

Try improving CI health

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Add the qa/skip-qa label if the PR doesn't need to be tested during QA.
  • If you need to backport this PR to another branch, you can add the backport/<branch-name> label to the PR and it will automatically open a backport PR once this one is merged

@dkirov-dd
Copy link
Contributor

LGTM, we should switch the "-k" to "-m" in a future PR
Using marks would be better than filenames IMO

@AAraKKe
Copy link
Contributor Author

AAraKKe commented Mar 12, 2025

Agree. This does not only track filenames though, also method names. A test like test_fips_status_linux would be ignored. We could mark all tests that are related with fips and that should be skipped in this scenarios.

@AAraKKe AAraKKe added this pull request to the merge queue Mar 12, 2025
Merged via the queue into master with commit c4cc9fc Mar 12, 2025
45 checks passed
@AAraKKe AAraKKe deleted the aarakke/fix-target-tests-no-fips-keyword branch March 12, 2025 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants