File tree 3 files changed +7
-1
lines changed
3 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ linters:
57
57
settings :
58
58
interfacebloat :
59
59
# Default is 10
60
- max : 13
60
+ max : 20
61
61
revive :
62
62
enable-all-rules : true
63
63
rules :
Original file line number Diff line number Diff line change @@ -130,6 +130,10 @@ func (gc *GenericCommand) Feed(r io.Reader) {
130
130
gc .cmd .Feed (r )
131
131
}
132
132
133
+ func (gc * GenericCommand ) Setenv (key , value string ) {
134
+ gc .cmd .Env [key ] = value
135
+ }
136
+
133
137
func (gc * GenericCommand ) WithFeeder (fun func () io.Reader ) {
134
138
gc .cmd .WithFeeder (fun )
135
139
}
Original file line number Diff line number Diff line change @@ -89,6 +89,8 @@ type TestableCommand interface {
89
89
WithCwd (path string )
90
90
// WithTimeout defines the execution timeout for a command.
91
91
WithTimeout (timeout time.Duration )
92
+ // Setenv allows to override a specific env variable directly for a specific command instead of test-wide
93
+ Setenv (key , value string )
92
94
// WithFeeder allows passing a reader to be fed to the command stdin.
93
95
WithFeeder (fun func () io.Reader )
94
96
// Feed allows passing a reader to be fed to the command stdin.
You can’t perform that action at this time.
0 commit comments