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

Refactor CLI code to separate user input from execution #198

Open
Tracked by #196
ryardley opened this issue Dec 7, 2024 · 0 comments
Open
Tracked by #196

Refactor CLI code to separate user input from execution #198

ryardley opened this issue Dec 7, 2024 · 0 comments
Labels
Ciphernode Related to the ciphernode package technical debt Unaddressed shortcuts thay will become expensive problems later.

Comments

@ryardley
Copy link
Contributor

ryardley commented Dec 7, 2024

How do we test our cli?

We need to be able to test our cli by removing the UI from the actually processes.

We should tidy up and refactor the CLI code to separate layers:

  • user input.
  • validation.
  • execution.

Why should we do this?

  • Being able to mock the input layer will mean we can easily test the cli validation layer and assert against the results.
  • We can replace the top layer with passed in values removing all interactivity.
  • We can assume that if our validation is good enough that execution will likely succeed.
  • We can test the underlying functions.
  • Consistency / Readability
@ryardley ryardley added enhancement New feature or request Ciphernode Related to the ciphernode package labels Dec 7, 2024
@ryardley ryardley added technical debt Unaddressed shortcuts thay will become expensive problems later. and removed enhancement New feature or request labels Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ciphernode Related to the ciphernode package technical debt Unaddressed shortcuts thay will become expensive problems later.
Projects
None yet
Development

No branches or pull requests

1 participant