Skip to content

Commit

Permalink
f: cleanup logmon tests
Browse files Browse the repository at this point in the history
  • Loading branch information
endocrimes committed Jul 1, 2019
1 parent 3ea9716 commit 467af87
Showing 1 changed file with 6 additions and 18 deletions.
24 changes: 6 additions & 18 deletions client/logmon/logmon_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ import (

func TestLogmon_Start_rotate(t *testing.T) {
require := require.New(t)

stdoutLog := "stdout"
stderrLog := "stderr"

var stdoutFifoPath, stderrFifoPath string

dir, err := ioutil.TempDir("", "nomadtest")
Expand All @@ -37,9 +33,9 @@ func TestLogmon_Start_rotate(t *testing.T) {

cfg := &LogConfig{
LogDir: dir,
StdoutLogFile: stdoutLog,
StdoutLogFile: "stdout",
StdoutFifo: stdoutFifoPath,
StderrLogFile: stderrLog,
StderrLogFile: "stderr",
StderrFifo: stderrFifoPath,
MaxFiles: 2,
MaxFileSizeMB: 1,
Expand Down Expand Up @@ -85,10 +81,6 @@ func TestLogmon_Start_restart_flusheslogs(t *testing.T) {
}

require := require.New(t)

stdoutLog := "stdout"
stderrLog := "stderr"

var stdoutFifoPath, stderrFifoPath string

dir, err := ioutil.TempDir("", "nomadtest")
Expand All @@ -105,9 +97,9 @@ func TestLogmon_Start_restart_flusheslogs(t *testing.T) {

cfg := &LogConfig{
LogDir: dir,
StdoutLogFile: stdoutLog,
StdoutLogFile: "stdout",
StdoutFifo: stdoutFifoPath,
StderrLogFile: stderrLog,
StderrLogFile: "stderr",
StderrFifo: stderrFifoPath,
MaxFiles: 2,
MaxFileSizeMB: 1,
Expand Down Expand Up @@ -192,10 +184,6 @@ func TestLogmon_Start_restart_flusheslogs(t *testing.T) {
// asserts that calling Start twice restarts the log rotator
func TestLogmon_Start_restart(t *testing.T) {
require := require.New(t)

stdoutLog := "stdout"
stderrLog := "stderr"

var stdoutFifoPath, stderrFifoPath string

dir, err := ioutil.TempDir("", "nomadtest")
Expand All @@ -212,9 +200,9 @@ func TestLogmon_Start_restart(t *testing.T) {

cfg := &LogConfig{
LogDir: dir,
StdoutLogFile: stdoutLog,
StdoutLogFile: "stdout",
StdoutFifo: stdoutFifoPath,
StderrLogFile: stderrLog,
StderrLogFile: "stderr",
StderrFifo: stderrFifoPath,
MaxFiles: 2,
MaxFileSizeMB: 1,
Expand Down

0 comments on commit 467af87

Please sign in to comment.