GoogleContainerTools / GoogleContainerTools/skaffold

Create tests to validate embedded commands

Open
#6,198 0 comments 0 reactions 0 assignees View on GitHub
meta/testing
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.