Skip to content

Added reactor tests to make check - #6447

Draft
victormlg wants to merge 4 commits into
cfengine:masterfrom
victormlg:cf-reactor.RunTestsInJenkins
Draft

victormlg wants to merge 4 commits into
cfengine:masterfrom
victormlg:cf-reactor.RunTestsInJenkins

Conversation

@victormlg

Copy link
Copy Markdown
Contributor

No description provided.

@victormlg victormlg changed the title Cf reactor.run tests in jenkins Added reactor tests to make check Oct 27, 2026
@victormlg

Copy link
Copy Markdown
Contributor Author

@cf-bottom jenkins, please :)

@cf-bottom

Copy link
Copy Markdown

Added the reactor tests to jenkins, to be able to run them in jenkins. This
means we can test cf-reactor on all the different platforms.

Signed-off-by: Victor Moene <victor.moene@northern.tech>
Made the logs prettier and added a log file where the xtrace is
printed

Signed-off-by: Victor Moene <victor.moene@northern.tech>
@victormlg
victormlg force-pushed the cf-reactor.RunTestsInJenkins branch from 824257a to 5f352d3 Compare October 28, 2026 11:55
@victormlg

Copy link
Copy Markdown
Contributor Author

Forgot to rebase:

Build Status

The guest environment cannot contain "-". On hosts containing "-", the
promise fails. The host name is now canonofied.

Signed-off-by: Victor Moene <victor.moene@northern.tech>
@victormlg

Copy link
Copy Markdown
Contributor Author

Fixed two bugs:

Build Status

@victormlg
victormlg force-pushed the cf-reactor.RunTestsInJenkins branch from 59bcb95 to 5d02ad6 Compare October 28, 2026 15:19
@larsewi
larsewi marked this pull request as draft October 28, 2026 15:31
@larsewi

larsewi commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Converted to draft while you work on it

The test promised the current user with policy "present" and expected
the promise to be kept. For an existing user, "present" also means
"not locked". When run as root, cf-reactor can read /etc/shadow, and if
the account's password hash starts with '!' (as root's does on some
systems), it is considered locked and gets unlocked. The promise was
then repaired instead of kept, and the test modified the root account.
As a normal user, /etc/shadow is unreadable, so the account was
considered unlocked and the test passed.

Instead, we modify the policy to always return "kept"

Signed-off-by: Victor Moene <victor.moene@northern.tech>
@victormlg
victormlg force-pushed the cf-reactor.RunTestsInJenkins branch from 5d02ad6 to 045402d Compare October 29, 2026 10:47
@victormlg

Copy link
Copy Markdown
Contributor Author

Build Status

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.

3 participants