-
Notifications
You must be signed in to change notification settings - Fork 114
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
Add test for host registration using capsule cname #15629
base: master
Are you sure you want to change the base?
Conversation
trigger: test-robottelo |
PRT Result
|
trigger: test-robottelo |
e2359fa
to
20668ca
Compare
trigger: test-robottelo |
PRT Result
|
20668ca
to
b485799
Compare
trigger: test-robottelo |
PRT Result
|
b485799
to
6d5ec34
Compare
6d5ec34
to
145b7c0
Compare
trigger: test-robottelo |
PRT Result
|
result = rhel_contenthost.execute( | ||
re.sub(r"https://ip.*?redhat\.com", f'https://{capsule_cname}', command) | ||
) |
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.
why hardcoding the url? could you try something similar,
result = rhel_contenthost.execute( | |
re.sub(r"https://ip.*?redhat\.com", f'https://{capsule_cname}', command) | |
) | |
result = rhel_contenthost.execute( | |
command.replace(module_capsule_configured.hostname, capsule_cname) | |
) |
rhel_contenthost.execute( | ||
f'echo "{module_capsule_configured.ip} {module_capsule_configured.hostname} {capsule_cname}' | ||
f'" >> /etc/hosts' | ||
) | ||
|
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.
isn't there any direct way from smart_proxy to handle setting the cname's?
|
||
:parametrized: yes | ||
""" | ||
capsule_cname = "capsule.example.com" |
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.
capsule_cname = "capsule.example.com" | |
capsule_cname = 'capsule.example.com' |
@@ -445,3 +446,66 @@ def test_positive_katello_ca_crt_refresh( | |||
# check if the certificate file is refreshed | |||
ca_file_after_refresh = len(str(rhel_contenthost.execute(f'cat {katello_ca_crt_path}'))) | |||
assert ca_cert_file == ca_file_after_refresh | |||
|
|||
|
|||
@pytest.mark.rhel_ver_match('[^7]') |
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.
is it really required to run for all rhel versions? I feel default should be suffice to test
module_activation_key, | ||
module_capsule_configured, | ||
): | ||
"""Verify host registration works with proxy and proxy_cname |
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.
we're just testing with proxy_cname here, right?
nc = module_capsule_configured.nailgun_smart_proxy | ||
module_target_sat.api.SmartProxy(id=nc.id, organization=[org]).update(['organization']) | ||
module_target_sat.api.SmartProxy(id=nc.id, location=[module_location]).update(['location']) |
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.
Both updates can be done in same call
nc = module_capsule_configured.nailgun_smart_proxy | |
module_target_sat.api.SmartProxy(id=nc.id, organization=[org]).update(['organization']) | |
module_target_sat.api.SmartProxy(id=nc.id, location=[module_location]).update(['location']) | |
nc = module_capsule_configured.nailgun_smart_proxy | |
nc.location = [module_location] | |
nc.organization = [module_org] | |
nc.update(['organization', 'location']) |
:id: 86b5c329-7784-43f4-bb67-67ce5a24ce17 | ||
|
||
:steps: | ||
1. Get a configure capsule registered with Satellite. |
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. Get a configure capsule registered with Satellite. | |
1. Configure external capsule which is registered to Satellite |
|
||
:steps: | ||
1. Get a configure capsule registered with Satellite. | ||
2. Verify Host registers to Capsule successfully. |
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.
Host or Capsule? anyway this step can be skipped
This pull request has not been updated in the past 45 days. |
Add test for host registration using capsule cname.
BZ#2158959
Related Issues