Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Michal Bocek <[email protected]>
  • Loading branch information
jochapma and bocekm authored Feb 21, 2024
1 parent 00bedb5 commit d2db893
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
7 changes: 4 additions & 3 deletions convert2rhel/breadcrumbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,11 @@ def _save_rhsm_facts(self):
utils.write_json_object_to_file(path=RHSM_CUSTOM_FACTS_FILE, data=data)

def print_data_collection(self):
"""Print information about telemetry and ask for acknowledgement."""
"""Print information about data collection and ask for acknowledgement."""
loggerinst.info(
"The convert2rhel utility uploads the following data about the system conversion"
" to Red Hat servers for the purpose of the utility usage analysis:\n"
"The convert2rhel utility generates a /etc/rhsm/facts/convert2rhel.fact file that contains the below data"
" about the system conversion. The subscription-manager then uploads the data to the server the system is"
" registered to.\n"
"- The Convert2RHEL command as executed\n"
"- The Convert2RHEL RPM version and GPG signature\n"
"- Success or failure status of the conversion\n"
Expand Down
3 changes: 1 addition & 2 deletions convert2rhel/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,7 @@ def perform_boilerplate():
loggerinst.task("Prepare: Show Red Hat software EULA")
show_eula()

# Telemetry warning
loggerinst.task("Prepare: Inform about telemetry")
loggerinst.task("Prepare: Inform about data collection")
breadcrumbs.breadcrumbs.print_data_collection()


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ def test_data_collection_acknowledgement(shell, convert2rhel):
shell(f"rm -f {CONVERT2RHEL_FACTS_FILE}")

with convert2rhel("--debug") as c2r:
assert c2r.expect("Prepare: Inform about telemetry", timeout=300) == 0
assert c2r.expect("Prepare: Inform about data collection", timeout=300) == 0
assert (
c2r.expect("The convert2rhel utility uploads the following data about the system conversion", timeout=300)
== 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ def test_validation_packages_with_in_name_period(shell, convert2rhel, packages_w
env.str("RHSM_POOL"),
)
) as c2r:
# Swallow the telemetry warning
assert c2r.expect("Prepare: Inform about telemetry", timeout=300) == 0
# Swallow the data collection warning
assert c2r.expect("Prepare: Inform about data collection", timeout=300) == 0
assert (
c2r.expect("The convert2rhel utility uploads the following data about the system conversion", timeout=300)
== 0
Expand Down

0 comments on commit d2db893

Please sign in to comment.