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

Remove creds requirement when in local repo mode #18

Merged
merged 1 commit into from
Sep 3, 2020

Conversation

alfinkel
Copy link
Contributor

@alfinkel alfinkel commented Sep 3, 2020

What

Creds are no longer required when running in local repo mode.

Why

Local repo mode doesn't need creds because the repo is local and no validation is being performed so Harvest shouldn't expect a credentials file when running in this mode.

How

  • If running in local repo mode, don't create a credentials.Config object.

Test

  • Collate and Report commands:
    • Works when running in local repo mode. Confirmed that no creds are expected.
    • Works when running in remote repo mode but using a --repo-path. Confirmed creds are expected and used.
    • Works when running in remote repo mode without --repo-path. Confirmed creds are expected and used.

Context

Fixes #17

@alfinkel alfinkel requested a review from drsm79 as a code owner September 3, 2020 13:10
harvest/cli.py Outdated
@@ -68,9 +68,10 @@ def _init_arguments(self):
def _validate_arguments(self, args):
if args.repo == 'local':
if not args.repo_path:
return 'ERROR: --repo-path expected for "local" mode'
return 'ERROR: --repo-path expected when using local repo mode'
Copy link

Choose a reason for hiding this comment

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

s/expected/required/

@alfinkel alfinkel force-pushed the 17-no-creds-for-local-repomode branch from 0208ebc to fed482e Compare September 3, 2020 13:22
@alfinkel alfinkel merged commit 7db7bad into main Sep 3, 2020
@alfinkel alfinkel deleted the 17-no-creds-for-local-repomode branch September 3, 2020 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove creds requirement when running in local mode
2 participants