Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mod/tigron/.golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ linters:
settings:
interfacebloat:
# Default is 10
max: 13
max: 20
revive:
enable-all-rules: true
rules:
Expand Down
4 changes: 4 additions & 0 deletions mod/tigron/test/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ func (gc *GenericCommand) Feed(r io.Reader) {
gc.cmd.Feed(r)
}

func (gc *GenericCommand) Setenv(key, value string) {
gc.cmd.Env[key] = value
}

func (gc *GenericCommand) WithFeeder(fun func() io.Reader) {
gc.cmd.WithFeeder(fun)
}
Expand Down
2 changes: 2 additions & 0 deletions mod/tigron/test/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ type TestableCommand interface {
WithCwd(path string)
// WithTimeout defines the execution timeout for a command.
WithTimeout(timeout time.Duration)
// Setenv allows to override a specific env variable directly for a specific command instead of test-wide
Setenv(key, value string)
// WithFeeder allows passing a reader to be fed to the command stdin.
WithFeeder(fun func() io.Reader)
// Feed allows passing a reader to be fed to the command stdin.
Expand Down