-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
updated curl to register host with name param instead id #17152
base: master
Are you sure you want to change the base?
updated curl to register host with name param instead id #17152
Conversation
3ee8c57
to
7c974c2
Compare
PRT Result
|
7c974c2
to
e3ca50c
Compare
PRT Result
|
PRT Result
|
tests/foreman/ui/test_fact.py
Outdated
result = cmd[cmd.find('hostgroup_id=') : cmd.find('&update_packages=')] | ||
if ' ' in default_os.title: | ||
default_os.title = default_os.title.replace(' ', '+') | ||
new_data = f'hostgroup={hostgroup.name}&location={module_location.name}&operatingsystem={default_os.title}&organization={module_sca_manifest_org.name}' | ||
updated_cmd = cmd.replace(result, new_data) | ||
assert new_data in updated_cmd | ||
result = rhel_contenthost.execute(updated_cmd) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we're switching the generated curl command manually for verifying this RFE, I'd suggest to create a new test for this in test_registration module, as it could impact the existing test and it looks unrelated to facts component, OR if I'm missing some context about this test please correct me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 to create a new test for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Gauravtalreja1 @shweta83
It was a small section, so I added it to the existing test instead of creating a new one. I don’t believe this change would impact the existing test since the PRT passed previously. Currently, it’s failing due to some internal issues, but otherwise, it should work. However, if you think I should create a new test for this, I’m happy to do so.
tests/foreman/ui/test_fact.py
Outdated
result = rhel_contenthost.execute(cmd) | ||
result = cmd[cmd.find('hostgroup_id=') : cmd.find('&update_packages=')] | ||
if ' ' in default_os.title: | ||
default_os.title = default_os.title.replace(' ', '+') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default_os.title = default_os.title.replace(' ', '+') | |
new_os_title = default_os.title.replace(' ', '+') |
c6c3724
to
fba5cba
Compare
fba5cba
to
713652b
Compare
trigger: test-robottelo |
PRT Result
|
The host is successfully registering using the label/name instead of the ID, and this applies to the following parameters: