Skip to content

[rhel-8-egg] feat(test): Add selinux_context=None for user-invoked functionality tests#516

Merged
pkoprda merged 1 commit into
rhel-8-eggfrom
rhel-8-egg-selinux
Sep 24, 2025
Merged

[rhel-8-egg] feat(test): Add selinux_context=None for user-invoked functionality tests#516
pkoprda merged 1 commit into
rhel-8-eggfrom
rhel-8-egg-selinux

Conversation

@pholica

@pholica pholica commented Sep 23, 2025

Copy link
Copy Markdown
Contributor

Accommodate changes to InsightsClient.run() which now uses runcon by default to execute insights-client with insights_client_t SELinux context, matching production systemd behavior.

Updated user-invoked functionality tests to use selinux_context=None:

  • test_version.py: --version command (1 call)
  • test_client_options.py: --support, --validate, and unregistered --diagnosis (3 calls)
  • test_connection.py: all --test-connection calls (5 calls)
  • test_status.py: all --status calls (3 calls)
  • test_motd.py: --status calls for MOTD testing (2 calls)
  • test_collection.py: --verbose for timeout configuration testing (1 call)

Production/service functionality tests (registration, upload, compliance, data collection) retain default SELinux context to match systemd behavior.

This ensures tests properly differentiate between user-invoked commands and production service operations while maintaining comprehensive coverage of both scenarios.

Message Created by Cursor (calude-4-sonnet)


This pull request is a backport of: #461

…ests

Accommodate changes to InsightsClient.run() which now uses runcon by default
to execute insights-client with insights_client_t SELinux context, matching
production systemd behavior.

Updated user-invoked functionality tests to use selinux_context=None:
- test_version.py: --version command (1 call)
- test_client_options.py: --support, --validate, and unregistered --diagnosis (3 calls)
- test_connection.py: all --test-connection calls (5 calls)
- test_status.py: all --status calls (3 calls)
- test_motd.py: --status calls for MOTD testing (2 calls)
- test_collection.py: --verbose for timeout configuration testing (1 call)

Production/service functionality tests (registration, upload, compliance,
data collection) retain default SELinux context to match systemd behavior.

This ensures tests properly differentiate between user-invoked commands
and production service operations while maintaining comprehensive coverage
of both scenarios.

Message Created by Cursor (calude-4-sonnet)
@pkoprda pkoprda changed the title feat(test): Add selinux_context=None for user-invoked functionality t… [rhel-8-egg] feat(test): Add selinux_context=None for user-invoked functionality tests Sep 24, 2025

@pkoprda pkoprda left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@pkoprda
pkoprda merged commit 673cc6b into rhel-8-egg Sep 24, 2025
12 checks passed
@m-horky
m-horky deleted the rhel-8-egg-selinux branch September 24, 2025 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants