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

HAM-135 - add '.' to config search paths #78

Merged
merged 1 commit into from
May 11, 2022
Merged

Conversation

dmeecs
Copy link
Contributor

@dmeecs dmeecs commented May 11, 2022

Per readme, need to search the current working directory for config.ini or credentials.ini.

Found that given the cli tool is using the library click-config, I see that it's test cases include a test case that specify '.' in the search path: https://github.com/click-contrib/click-configfile/blob/main/tests/functional/test_basics.py#L89

# -----------------------------------------------------------------------------
# TEST CANDIDATE 3: With config_searchpath
# -----------------------------------------------------------------------------
class ConfigFileProcessor3(ConfigFileReader):
    config_files = ["hello3.ini"]
    config_searchpath = [".", "config/profile"]
    config_section_schemas = [
        ConfigSectionSchema1.Hello,
    ]

Thus I added that to the same appropriate place in this repo. I tested this change locally by trying cloudsmith whoami and cloudsmith check service on master with config files in place. Master did not pick up the values in the config files. I then switched to this branch, repeated the test, and this branch does pickup values from the config files.

@codeclimate
Copy link

codeclimate bot commented May 11, 2022

Code Climate has analyzed commit 2d7eb2c and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 0.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 0.9% (0.0% change).

View more on Code Climate.

Copy link
Contributor

@paddycarey paddycarey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dmeecs dmeecs merged commit 5348c88 into master May 11, 2022
@dmeecs dmeecs deleted the HAM-135/cwd-ini-bug branch May 11, 2022 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants