diff --git a/config/agent_live_change_test.go b/config/agent_live_change_test.go index ebd6ef1..4788d0c 100644 --- a/config/agent_live_change_test.go +++ b/config/agent_live_change_test.go @@ -1,23 +1,13 @@ package config import ( - "bytes" "testing" - log "github.com/sirupsen/logrus" "github.com/spf13/viper" "github.com/stretchr/testify/assert" - easy "github.com/t-tomalak/logrus-easy-formatter" ) func TestAgentSetServerAddress(t *testing.T) { - var logOutput bytes.Buffer - log.SetLevel(log.InfoLevel) - log.SetOutput(&logOutput) - log.SetFormatter(&easy.Formatter{ - LogFormat: "%msg%", - }) - // Test case 1: Agent is nil Agent = nil err := AgentSetServerAddress("http://localhost:8080") @@ -45,13 +35,6 @@ func TestAgentSetServerAddress(t *testing.T) { } func TestAgentSetAuthToken(t *testing.T) { - var logOutput bytes.Buffer - log.SetLevel(log.InfoLevel) - log.SetOutput(&logOutput) - log.SetFormatter(&easy.Formatter{ - LogFormat: "%msg%", - }) - // Test case 1: Agent is nil Agent = nil err := AgentSetAuthToken("token123") @@ -74,13 +57,6 @@ func TestAgentSetAuthToken(t *testing.T) { } func TestAgentSetMachineName(t *testing.T) { - var logOutput bytes.Buffer - log.SetLevel(log.InfoLevel) - log.SetOutput(&logOutput) - log.SetFormatter(&easy.Formatter{ - LogFormat: "%msg%", - }) - // Test case 1: Agent is nil Agent = nil err := AgentSetMachineName("machine1")