Skip to content

Commit

Permalink
Silencing the tests with strings.Builder because all the noise is ann…
Browse files Browse the repository at this point in the history
…oying.
  • Loading branch information
Skarlso committed Jul 20, 2018
1 parent 242997d commit dec4407
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions pipeline/build_golang_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,10 @@ func TestExecuteBuildFailPipelineBuild(t *testing.T) {
}()
gaia.Cfg = new(gaia.Config)
gaia.Cfg.HomePath = tmp
var logOutput strings.Builder
gaia.Cfg.Logger = hclog.New(&hclog.LoggerOptions{
Level: hclog.Trace,
Output: hclog.DefaultOutput,
Output: &logOutput,
Name: "Gaia",
})
b := new(BuildPipelineGolang)
Expand All @@ -141,9 +142,10 @@ func TestExecuteBuildContextTimeout(t *testing.T) {
gaia.Cfg = new(gaia.Config)
gaia.Cfg.HomePath = tmp
// Initialize shared logger
var logOutput strings.Builder
gaia.Cfg.Logger = hclog.New(&hclog.LoggerOptions{
Level: hclog.Trace,
Output: hclog.DefaultOutput,
Output: &logOutput,
Name: "Gaia",
})
b := new(BuildPipelineGolang)
Expand All @@ -162,9 +164,10 @@ func TestExecuteBuildBinaryNotFoundError(t *testing.T) {
gaia.Cfg = new(gaia.Config)
gaia.Cfg.HomePath = tmp
// Initialize shared logger
var logOutput strings.Builder
gaia.Cfg.Logger = hclog.New(&hclog.LoggerOptions{
Level: hclog.Trace,
Output: hclog.DefaultOutput,
Output: &logOutput,
Name: "Gaia",
})
currentPath := os.Getenv("PATH")
Expand All @@ -186,9 +189,10 @@ func TestCopyBinary(t *testing.T) {
gaia.Cfg = new(gaia.Config)
gaia.Cfg.HomePath = tmp
// Initialize shared logger
var logOutput strings.Builder
gaia.Cfg.Logger = hclog.New(&hclog.LoggerOptions{
Level: hclog.Trace,
Output: hclog.DefaultOutput,
Output: &logOutput,
Name: "Gaia",
})
b := new(BuildPipelineGolang)
Expand Down Expand Up @@ -220,9 +224,10 @@ func TestCopyBinarySrcDoesNotExist(t *testing.T) {
gaia.Cfg = new(gaia.Config)
gaia.Cfg.HomePath = tmp
// Initialize shared logger
var logOutput strings.Builder
gaia.Cfg.Logger = hclog.New(&hclog.LoggerOptions{
Level: hclog.Trace,
Output: hclog.DefaultOutput,
Output: &logOutput,
Name: "Gaia",
})
b := new(BuildPipelineGolang)
Expand Down

0 comments on commit dec4407

Please sign in to comment.