Skip to content

tests: adjust UUID checks to newer versions of insights-core#220

Merged
richm merged 1 commit intolinux-system-roles:mainfrom
ptoscano:insights-no-different-uuid
Feb 26, 2025
Merged

tests: adjust UUID checks to newer versions of insights-core#220
richm merged 1 commit intolinux-system-roles:mainfrom
ptoscano:insights-no-different-uuid

Conversation

@ptoscano
Copy link
Collaborator

Starting from version 3.4.6 [1], insights-core (used internally by insights-client) adjusted its logic to generate the UUID (written in the /etc/insights-client/machine-id file): instead of a new random UUID, it uses the subscription-manager UUID in case the system is registered with it (which now is the only supported option).

The expectations in tests_insights_client_register were that, unregistering and registering again with insights-client would give a new UUID, which are no more true now. Thus adjust the checks to either check for the old behaviour, or check that the UUID is now the same as the rhsm UUID.

This is only a fix for the test, the behaviour of the role itself is correct.

[1] RedHatInsights/insights-core#4057

Starting from version 3.4.6 [1], insights-core (used internally by
insights-client) adjusted its logic to generate the UUID (written in
the /etc/insights-client/machine-id file): instead of a new random UUID,
it uses the subscription-manager UUID in case the system is registered
with it (which now is the only supported option).

The expectations in tests_insights_client_register were that,
unregistering and registering again with insights-client would give a
new UUID, which are no more true now. Thus adjust the checks to either
check for the old behaviour, or check that the UUID is now the same as
the rhsm UUID.

This is only a fix for the test, the behaviour of the role itself is
correct.

[1] RedHatInsights/insights-core#4057

Signed-off-by: Pino Toscano <ptoscano@redhat.com>
@ptoscano ptoscano requested a review from richm as a code owner February 24, 2025 17:41
@ptoscano
Copy link
Collaborator Author

[citest]

@richm richm merged commit 02ac290 into linux-system-roles:main Feb 26, 2025
15 checks passed
@ptoscano ptoscano deleted the insights-no-different-uuid branch March 3, 2025 14:39
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