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

tests: add tests for cmd #61

Merged
merged 1 commit into from
Oct 19, 2024
Merged

tests: add tests for cmd #61

merged 1 commit into from
Oct 19, 2024

Conversation

xx4h
Copy link
Owner

@xx4h xx4h commented Oct 19, 2024

  • add Fprint* functions for PrintError, PrintSuccess, etc.
  • move actual config loading from NewConfig to LoadConfig to be able to easily load a test config for testing
  • rename NewHctl argument from "loadCfg" to "testing" and only load config from defined config paths if we're not in testing mode
  • add newTestingHctl to create Hctl instance for testing
  • add testCmd function to handle the work for all the cmd command testing

- add Fprint* functions for PrintError, PrintSuccess, etc.
- move actual config loading from NewConfig to LoadConfig to
  be able to easily load a test config for testing
- rename NewHctl argument from "loadCfg" to "testing" and
  only load config from defined config paths if we're not
  in testing mode
- add newTestingHctl to create Hctl instance for testing
- add testCmd function to handle the work for all the cmd
  command testing
@xx4h xx4h merged commit 9c3a308 into main Oct 19, 2024
10 of 11 checks passed
@xx4h xx4h deleted the add-cmd-tests branch October 19, 2024 19:55
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.

1 participant