Skip to content

ENT-14443: Added cfengine test, a one-stop command to lint/build/deploy/run a policy-set - #232

Open
SimonThalvorsen wants to merge 3 commits into
cfengine:mainfrom
SimonThalvorsen:ENT-14443
Open

ENT-14443: Added cfengine test, a one-stop command to lint/build/deploy/run a policy-set#232
SimonThalvorsen wants to merge 3 commits into
cfengine:mainfrom
SimonThalvorsen:ENT-14443

Conversation

@SimonThalvorsen

Copy link
Copy Markdown
Contributor

First iteration of the cfengine test-command, with the intention of being used in a future "CFEngine testing framework"

Ticket: ENT-14443

@codecov

codecov Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 76.59574% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.73%. Comparing base (1498498) to head (30e5f8f).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
.../cfengine_cli/cfengine_wrapper/cfengine_objects.py 0.00% 3 Missing ⚠️
...rc/cfengine_cli/cfengine_wrapper/cfengine_utils.py 0.00% 3 Missing ⚠️
...cfengine_cli/cfengine_wrapper/cfengine_commands.py 71.42% 2 Missing ⚠️
src/cfengine_cli/container.py 89.47% 2 Missing ⚠️
src/cfengine_cli/main.py 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #232      +/-   ##
==========================================
+ Coverage   52.31%   54.73%   +2.42%     
==========================================
  Files          32       33       +1     
  Lines        4110     4149      +39     
==========================================
+ Hits         2150     2271     +121     
+ Misses       1960     1878      -82     
Files with missing lines Coverage Δ
src/cfengine_cli/commands.py 58.33% <100.00%> (+8.83%) ⬆️
src/cfengine_cli/main.py 58.29% <83.33%> (+1.34%) ⬆️
...cfengine_cli/cfengine_wrapper/cfengine_commands.py 23.93% <71.42%> (+1.95%) ⬆️
src/cfengine_cli/container.py 89.47% <89.47%> (ø)
.../cfengine_cli/cfengine_wrapper/cfengine_objects.py 37.09% <0.00%> (ø)
...rc/cfengine_cli/cfengine_wrapper/cfengine_utils.py 19.42% <0.00%> (ø)

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread src/cfengine_cli/cfengine_wrapper/cfengine_commands.py Outdated
Comment thread src/cfengine_cli/main.py Outdated
@SimonThalvorsen SimonThalvorsen changed the title Added cfengine test, a one-stop command to lint/build/deploy/run a policy-set ENT-14443: Added cfengine test, a one-stop command to lint/build/deploy/run a policy-set Sep 4, 2026
@SimonThalvorsen
SimonThalvorsen marked this pull request as draft September 4, 2026 14:02
@SimonThalvorsen
SimonThalvorsen force-pushed the ENT-14443 branch 3 times, most recently from 6ae827f to 0d50c0b Compare September 7, 2026 08:25
@SimonThalvorsen
SimonThalvorsen marked this pull request as ready for review September 7, 2026 08:28
RUN pipx install cfengine --force
# RUN cfengine install --hub localhost --edition community
# Does not work since localhost resolves to `local` in cfengine cli
RUN cfengine install --clients localhost --edition community

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

will work when new version of cfengine-cli is released (with the changes in this pr)

…policy-set

First iteration of the `cfengine test`-command, with the intention of
being used in a future "CFEngine testing framework"

Ticket: ENT-14443

Signed-off-by: Simon Halvorsen <simon.halvorsen@northern.tech>
Ticket: None
Signed-off-by: Simon Halvorsen <simon.halvorsen@northern.tech>
…in coveraerc

Added coverage-export-variables to coverage-target in Makefile to reduce
noise and added PROJECT_ROOT before the src/-target in .coveragerc to
fix the tracking

Ticket: None
Signed-off-by: Simon Halvorsen <simon.halvorsen@northern.tech>
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