Skip to content

Commit 02ac290

Browse files
ptoscanorichm
authored andcommitted
tests: adjust UUID checks to newer versions of insights-core
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 <[email protected]>
1 parent 3ff1de7 commit 02ac290

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tests/tests_insights_client_register.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,16 +74,21 @@
7474
rhc_state: reconnect
7575
rhc_baseurl: "{{ lsr_rhc_test_data.baseurl | d(omit) }}"
7676

77+
- name: Get rhsm UUID
78+
include_tasks: tasks/get_rhsm_uuid.yml
79+
7780
- name: Get insights UUID
7881
include_tasks: tasks/get_insights_uuid.yml
7982

8083
- name: Rename the insights UUID to test_insights_uuid_after
8184
set_fact:
8285
test_insights_uuid_after: "{{ test_insights_uuid }}"
8386

84-
- name: Check the insights UUID changed
87+
- name: Check Insights UUID changed or same as rhsm UUID
8588
assert:
86-
that: test_insights_uuid_before != test_insights_uuid_after
89+
that: >
90+
test_insights_uuid_before != test_insights_uuid_after
91+
or test_insights_uuid_after == test_rhsm_uuid
8792
8893
- name: Unregister insights
8994
include_role:

0 commit comments

Comments
 (0)