GoogleContainerTools / GoogleContainerTools/skaffold
Create tests to validate embedded commands
- Dominant language
- Go
- Stars
- 15.9k
- Forks
- 1.7k
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 10
Description
Skaffold shows command lines to help users accomplish certain tasks.
For example, we ask the user to run `skaffold survey` to take the HaTS survey:
https://github.com/GoogleContainerTools/skaffold/blob/8d0a32f6fd7a6a361e9143567ed406750d633c0a/pkg/skaffold/survey/config.go#L68-L72
We also include Skaffold command lines in our examples
https://github.com/GoogleContainerTools/skaffold/blob/8d0a32f6fd7a6a361e9143567ed406750d633c0a/cmd/skaffold/app/cmd/run.go#L36-L37
But we sometimes get these wrong, or changes introduce errors: the `skaffold survey -id` example should actually use `--id`.
We should be able to write tests to validate these commands with the cobra args infrastructure.
Contributor guide
Assessment
This issue has not been assessed yet.