Skip to content

Commit 0e00b89

Browse files
committed
Remove dead code with faked output
1 parent 251a261 commit 0e00b89

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

cmd/configure_test.go

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,6 @@ import (
1818
)
1919

2020
func TestBareConfigure(t *testing.T) {
21-
oldErr := Err
22-
defer func() {
23-
Err = oldErr
24-
}()
25-
26-
var buf bytes.Buffer
27-
Err = &buf
28-
2921
flags := pflag.NewFlagSet("fake", pflag.PanicOnError)
3022
setupConfigureFlags(flags)
3123

@@ -150,17 +142,12 @@ func TestConfigureToken(t *testing.T) {
150142
defer ts.Close()
151143

152144
oldOut := Out
153-
oldErr := Err
154145
Out = ioutil.Discard
155146
defer func() {
156147
Out = oldOut
157-
Err = oldErr
158148
}()
159149

160150
for _, tc := range testCases {
161-
var buf bytes.Buffer
162-
Err = &buf
163-
164151
flags := pflag.NewFlagSet("fake", pflag.PanicOnError)
165152
setupConfigureFlags(flags)
166153

@@ -238,17 +225,12 @@ func TestConfigureAPIBaseURL(t *testing.T) {
238225
}
239226

240227
oldOut := Out
241-
oldErr := Err
242228
Out = ioutil.Discard
243229
defer func() {
244230
Out = oldOut
245-
Err = oldErr
246231
}()
247232

248233
for _, tc := range testCases {
249-
var buf bytes.Buffer
250-
Err = &buf
251-
252234
flags := pflag.NewFlagSet("fake", pflag.PanicOnError)
253235
setupConfigureFlags(flags)
254236

0 commit comments

Comments
 (0)