mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 10:25:42 +03:00
ci: limit gotestsum to circle ci
Part 2 of breaking up https://github.com/hashicorp/nomad/pull/12255 This PR makes it so gotestsum is invoked only in CircleCI. Also the HCLogger(t) is plumbed more correctly in TestServer and TestAgent so that they respect NOMAD_TEST_LOG_LEVEL. The reason for these is we'll want to disable logging in GHA, where spamming the disk with logs really drags performance.
This commit is contained in:
@@ -16,6 +16,7 @@ import (
|
||||
metrics "github.com/armon/go-metrics"
|
||||
"github.com/hashicorp/go-hclog"
|
||||
"github.com/hashicorp/nomad/api"
|
||||
client "github.com/hashicorp/nomad/client/config"
|
||||
"github.com/hashicorp/nomad/client/fingerprint"
|
||||
"github.com/hashicorp/nomad/helper/freeport"
|
||||
"github.com/hashicorp/nomad/helper/testlog"
|
||||
@@ -357,6 +358,14 @@ func (a *TestAgent) config() *Config {
|
||||
config := nomad.DefaultConfig()
|
||||
conf.NomadConfig = config
|
||||
|
||||
// Setup client config
|
||||
conf.ClientConfig = client.DefaultConfig()
|
||||
|
||||
logger := testlog.HCLogger(a.T)
|
||||
conf.LogLevel = testlog.HCLoggerTestLevel().String()
|
||||
conf.NomadConfig.Logger = logger
|
||||
conf.ClientConfig.Logger = logger
|
||||
|
||||
// Set the name
|
||||
conf.NodeName = a.Name
|
||||
|
||||
|
||||
Reference in New Issue
Block a user