Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Improve test command coverage for path argument issues #383

Closed
noaabarki opened this issue Jan 17, 2022 · 6 comments · Fixed by #410
Closed

Improve test command coverage for path argument issues #383

noaabarki opened this issue Jan 17, 2022 · 6 comments · Fixed by #410
Assignees
Labels
enhancement New feature or request testing This issue or pull request is related to testing up for grabs Looking for a contributor to take this task WIP Working in progress (will be deployed soon)

Comments

@noaabarki
Copy link
Contributor

Describe the solution you'd like
Add tests for failures flows regarding path argument in test commanddatree test <path>

Basic use cases to cover

Case: Given path contains zero files

  • should print "No files detected”

Case: Given path contains YAML files that are not Kubernetes resources

Empty evaluation results

  • should create evaluation
  • should request evaluation
  • should print returned results

Case: Given path with multiple resources in single file

  • should create evaluation
  • should request evaluation
  • should print returned results

Requirements
Golang basic level.

@noaabarki noaabarki added enhancement New feature or request up for grabs Looking for a contributor to take this task testing This issue or pull request is related to testing labels Jan 17, 2022
@Abhra303
Copy link
Contributor

Hey @noaabarki I would like to try this :)

@noaabarki
Copy link
Contributor Author

@Abhra303 awesome, it's yours 👑

@Abhra303
Copy link
Contributor

Abhra303 commented Feb 2, 2022

Hello @noaabarki,

#381 , #382 and this issue are very close to each other. I mean, the test codes might be very similar. So would you mind if I cover all the test cases in a single PR?

@noaabarki
Copy link
Contributor Author

noaabarki commented Feb 2, 2022

@Abhra303, yes you're right they are very close, do you prefer to do it all together?
The reason why I separated them was that I was worried we'd end with a giant PR. Small and contained PRs are always better, especially when it comes to unit tests in Go which are usually hard to read and understand.

@Abhra303
Copy link
Contributor

Abhra303 commented Feb 2, 2022

The reason why I separated them was that I was worried we'd end with a giant PR. Small and contained PRs are always better, especially when it comes to unit tests in Go which are usually hard to read and understand.

Hmm, That's sensible.
Okay, I will make separate PRs for them. Would that be okay?

@noaabarki
Copy link
Contributor Author

Sounds good :)

@noaabarki noaabarki added the WIP Working in progress (will be deployed soon) label Feb 24, 2022
@royhadad royhadad assigned royhadad and unassigned noaabarki Mar 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request testing This issue or pull request is related to testing up for grabs Looking for a contributor to take this task WIP Working in progress (will be deployed soon)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants