Skip to content

testing story (e.g. mock shell environments) #5

Description

@bobheadxi

Some ideas:

  1. encourage scripts to accept Output instances, provide outputtest package for building simple mocks
  2. 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 be shell.Run(Runner), where *Command implements Runner (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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions