fix: SonarQube report - refs #305404#6
Open
avoinea wants to merge 6 commits into
Open
Conversation
Remove testing.py and test_setup_integration.py that caused: - ModuleNotFoundError: wrong import path (package.testing vs package.tests.testing) - TypeError: testing.py picked up as test module by zope.testrunner but has no test_suite() Unit tests in test_*.py are sufficient for SonarQube XML report generation. Matches the pattern used by eea.website.policy (PR #17) and all 13 working packages.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
After Jenkins pipeline update, test libraries changed behavior. Previously, skipped tests still generated empty XML report files. Now, no XML files are generated when tests are skipped. SonarQube scan fails because
coverage/junit-results/testreports/*.xmlglob matches nothing.Root Cause
Packages had only
test_doctests.pyusing legacy Plone testing (plone.testing.z2,PloneSandboxLayer,FUNCTIONAL_TESTINGlayer). These doctests loadedREADME.txtfiles with no actual doctest content (>>>lines) → always skipped → no test report generated.Fix
test_doctests.pyandbase.py(legacy Plone 4/5 testing infrastructure)unittest.TestCasethat actually run and generate test reportsRefs #305404