Skip to content
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

pulp_smash_cli.settings_create is at capacity, generating "too-many-locals" warnings #980

Closed
dekimsey opened this issue Apr 27, 2018 · 0 comments

Comments

@dekimsey
Copy link
Contributor

Issue

  1. Describe what you expected to happen.

pulp_smash lint tests should pass cleanly

  1. Describe what actually happened.

Python lint tests warn (well, after #975 is merged) due to too many locals in the pulp_smash.pulp_smash_cli.settings_create function. This change is directly caused by the addition of the selinux_enabled flag in #975.

  1. Describe what version of Pulp and what OS is affected by the issue.

n/a

  1. State steps to re-create the issue.
(pulp-smash) [vagrant@pulp2 pulp-smash]$ make lint
flake8 . --ignore E501,F401 --exclude docs/_build
pylint -j 4 --reports=n --disable=I \
        docs/conf.py \
        pulp_smash \
        scripts/run_functional_tests.py \
        setup.py \
        tests
No config file found, using default configuration
************* Module pulp_smash.pulp_smash_cli
R: 44, 0: Too many local variables (16/15) (too-many-locals)

--------------------------------------------------------------------
Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)
  1. If there is a related pulp.plan.io issue, link to it, and set the "smash test" field.

n/a

  1. Choose proper labels. See: Smash Labels

Plan?

Proposed Solution

Briefly discussed, but basically we may want to split out the settings_create into smaller functions to build up the larger configuration. (pulp, server, role, etc).

rochacbruno pushed a commit that referenced this issue Jul 18, 2018
When applied, this commit will redefine what a "valid" configuration
file is. Existing configuration files will continue to be valid. But in
addition, entirely new (and similar-looking) configuration files may
also be written.

The old configuration files are suitable for use when testing Pulp 2.
They let one declare information like "host pulp.example.com is running
rabbitmq." The new configuration files are suitable for testing Pulp 3.
They lew one declare information like "host pulp.example.com is running
redis."

In addition, this commit will update two pieces of machinery that are
related to the configuration file. Specifically, this commit will
overhaul the entire CLI interface (as accessed by the `pulp-smash`
executable) and re-implement the `PulpSmashConfig.get_services` method.

Fix: #965

Fix: #980
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants