mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 05:10:22 -07:00
redhat_subscription: Add server_prefix and server_port as supported arguments (#2779)
* Add server_prefix and server_port as supported arguments for the redhat_subscription module. * Adjust the argument sequence in the test case to be consistent with the original code in line 364 in redhat_subscription.py and add the changelog fragment. * Grammatical changes such as adding full stops and using 'an HTTP' instead of 'a HTTP'. * Commit the suggested changelog update. Co-authored-by: Amin Vakil <info@aminvakil.com> * Fix typo. Co-authored-by: Amin Vakil <info@aminvakil.com> Co-authored-by: Amin Vakil <info@aminvakil.com>
This commit is contained in:
parent
adf50b106a
commit
2f2f384b4e
3 changed files with 60 additions and 3 deletions
|
@ -258,6 +258,47 @@ TEST_CASES = [
|
|||
'msg': "System successfully registered to 'None'."
|
||||
}
|
||||
],
|
||||
# Test of registration with arguments that are not part of register options but needs to be configured
|
||||
[
|
||||
{
|
||||
'state': 'present',
|
||||
'username': 'admin',
|
||||
'password': 'admin',
|
||||
'org_id': 'admin',
|
||||
'force_register': 'true',
|
||||
'server_prefix': '/rhsm',
|
||||
'server_port': '443'
|
||||
},
|
||||
{
|
||||
'id': 'test_arguments_not_in_register_options',
|
||||
'run_command.calls': [
|
||||
(
|
||||
['/testbin/subscription-manager', 'identity'],
|
||||
{'check_rc': False},
|
||||
(0, 'This system already registered.', '')
|
||||
),
|
||||
(
|
||||
['/testbin/subscription-manager', 'config',
|
||||
'--server.port=443',
|
||||
'--server.prefix=/rhsm'
|
||||
],
|
||||
{'check_rc': True},
|
||||
(0, '', '')
|
||||
),
|
||||
(
|
||||
['/testbin/subscription-manager', 'register',
|
||||
'--force',
|
||||
'--org', 'admin',
|
||||
'--username', 'admin',
|
||||
'--password', 'admin'],
|
||||
{'check_rc': True, 'expand_user_and_vars': False},
|
||||
(0, '', '')
|
||||
)
|
||||
],
|
||||
'changed': True,
|
||||
'msg': "System successfully registered to 'None'."
|
||||
}
|
||||
],
|
||||
# Test of registration using username, password and proxy options
|
||||
[
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue