Skip to content

Commit dec4407

Browse files
committed
Silencing the tests with strings.Builder because all the noise is annoying.
1 parent 242997d commit dec4407

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

pipeline/build_golang_test.go

+10-5
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,10 @@ func TestExecuteBuildFailPipelineBuild(t *testing.T) {
112112
}()
113113
gaia.Cfg = new(gaia.Config)
114114
gaia.Cfg.HomePath = tmp
115+
var logOutput strings.Builder
115116
gaia.Cfg.Logger = hclog.New(&hclog.LoggerOptions{
116117
Level: hclog.Trace,
117-
Output: hclog.DefaultOutput,
118+
Output: &logOutput,
118119
Name: "Gaia",
119120
})
120121
b := new(BuildPipelineGolang)
@@ -141,9 +142,10 @@ func TestExecuteBuildContextTimeout(t *testing.T) {
141142
gaia.Cfg = new(gaia.Config)
142143
gaia.Cfg.HomePath = tmp
143144
// Initialize shared logger
145+
var logOutput strings.Builder
144146
gaia.Cfg.Logger = hclog.New(&hclog.LoggerOptions{
145147
Level: hclog.Trace,
146-
Output: hclog.DefaultOutput,
148+
Output: &logOutput,
147149
Name: "Gaia",
148150
})
149151
b := new(BuildPipelineGolang)
@@ -162,9 +164,10 @@ func TestExecuteBuildBinaryNotFoundError(t *testing.T) {
162164
gaia.Cfg = new(gaia.Config)
163165
gaia.Cfg.HomePath = tmp
164166
// Initialize shared logger
167+
var logOutput strings.Builder
165168
gaia.Cfg.Logger = hclog.New(&hclog.LoggerOptions{
166169
Level: hclog.Trace,
167-
Output: hclog.DefaultOutput,
170+
Output: &logOutput,
168171
Name: "Gaia",
169172
})
170173
currentPath := os.Getenv("PATH")
@@ -186,9 +189,10 @@ func TestCopyBinary(t *testing.T) {
186189
gaia.Cfg = new(gaia.Config)
187190
gaia.Cfg.HomePath = tmp
188191
// Initialize shared logger
192+
var logOutput strings.Builder
189193
gaia.Cfg.Logger = hclog.New(&hclog.LoggerOptions{
190194
Level: hclog.Trace,
191-
Output: hclog.DefaultOutput,
195+
Output: &logOutput,
192196
Name: "Gaia",
193197
})
194198
b := new(BuildPipelineGolang)
@@ -220,9 +224,10 @@ func TestCopyBinarySrcDoesNotExist(t *testing.T) {
220224
gaia.Cfg = new(gaia.Config)
221225
gaia.Cfg.HomePath = tmp
222226
// Initialize shared logger
227+
var logOutput strings.Builder
223228
gaia.Cfg.Logger = hclog.New(&hclog.LoggerOptions{
224229
Level: hclog.Trace,
225-
Output: hclog.DefaultOutput,
230+
Output: &logOutput,
226231
Name: "Gaia",
227232
})
228233
b := new(BuildPipelineGolang)

0 commit comments

Comments
 (0)