testing story (e.g. mock shell environments)
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Start by reviewing the existing command and output APIs referenced by the issue, especially Output instances and the shell.Run/run.Cmd flow. Define the testing approach and decide whether outputtest mocks or a command-runner abstraction best fits before implementing and validating mock shell execution.
Written by the indexing model from the issue text.
Description
Some ideas:
- encourage scripts to accept
Outputinstances, provideoutputtestpackage for building simple mocks - provide a "command factory" analogous to Buildkite's
Shell, e.g.shell.Cmd()- this factory could be an interface that facilitates mocking. Alternatively, it could beshell.Run(Runner), where*CommandimplementsRunner(now that I think of it, I like the latter):out := shell.Run(run.Cmd(ctx, "foobar")) // shell can mock execution and output, or propagate shared env
cc @jhchabran
- Dominant language
- Go
- Stars
- 41
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from sourcegraph/run
-
sourcegraph/run#39 · 1 assignee ·
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
enhancement needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
kind/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
kubernetes-sigs/kueue#15947 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sympozium-ai/sympozium#627 ·