-
Notifications
You must be signed in to change notification settings - Fork 84
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
[WIP] DO NOT REVIEW YET - Refactor cli and toolopts #1271
Conversation
46dd982
to
4652a3b
Compare
|
||
try: | ||
cli.CLI() | ||
except SystemExit: |
Check notice
Code scanning / CodeQL
Empty except Note
), | ||
) | ||
def test_should_subscribe(username, password, organization, activation_key, no_rhsm, expected): | ||
t_opts = toolopts.ToolOpts() |
Check failure
Code scanning / CodeQL
Wrong number of arguments in a class instantiation Error
ToolOpts.__init__
) | ||
def test_cli_args_config_file_cornercase(activation_key, organization, argv, monkeypatch): | ||
monkeypatch.setattr(sys, "argv", mock_cli_arguments(argv)) | ||
t_opts = toolopts.ToolOpts() |
Check failure
Code scanning / CodeQL
Wrong number of arguments in a class instantiation Error
ToolOpts.__init__
import pytest | ||
import six | ||
|
||
from convert2rhel import cli, toolopts, utils |
Check notice
Code scanning / CodeQL
Unused import Note
# if (parsed_opts.password or config_opts.password) and not (parsed_opts.username or config_opts.username): | ||
# loggerinst.warning( | ||
# "You have passed the RHSM password without an associated username. Please provide a username together" | ||
# " with the password." |
Check notice
Code scanning / CodeQL
Commented-out code Note
# if (parsed_opts.username or config_opts.username) and not (parsed_opts.password or config_opts.password): | ||
# loggerinst.warning( | ||
# "You have passed the RHSM username without an associated password. Please provide a password together" | ||
# " with the username." |
Check notice
Code scanning / CodeQL
Commented-out code Note
file.write(content) | ||
os.chmod(path, 0o600) | ||
|
||
opts = cli.options_from_config_files(path) |
Check notice
Code scanning / CodeQL
Unused local variable Note
return args | ||
|
||
|
||
def _subcommand_used(args): |
Check notice
Code scanning / CodeQL
Explicit returns mixed with implicit (fall through) returns Note
loggerinst = logging.getLogger(__name__) | ||
|
||
|
||
def setup_rhsm_parts(opts): |
Check notice
Code scanning / CodeQL
Explicit returns mixed with implicit (fall through) returns Note
@@ -11,3 +11,12 @@ | |||
# password = <insert_password> | |||
# activation_key = <insert_activation_key> | |||
# org = <insert_org> | |||
|
|||
[settings] |
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.
Will be updated with #1272
4652a3b
to
997993b
Compare
Jira Issues:
Checklist
[RHELC-]
or[HMS-]
is part of the PR titleRelease Pending
if relevant