|
|
|
@ -11,7 +11,6 @@ import (
|
|
|
|
|
"os" |
|
|
|
|
"os/exec" |
|
|
|
|
"strings" |
|
|
|
|
"sync" |
|
|
|
|
"testing" |
|
|
|
|
"time" |
|
|
|
|
|
|
|
|
@ -46,7 +45,6 @@ func expectStatus(t *testing.T, script, status string) {
|
|
|
|
|
Script: script, |
|
|
|
|
Interval: 10 * time.Millisecond, |
|
|
|
|
Logger: log.New(os.Stderr, "", log.LstdFlags), |
|
|
|
|
ReapLock: &sync.RWMutex{}, |
|
|
|
|
} |
|
|
|
|
check.Start() |
|
|
|
|
defer check.Stop() |
|
|
|
@ -96,7 +94,6 @@ func TestCheckMonitor_Timeout(t *testing.T) {
|
|
|
|
|
Interval: 10 * time.Millisecond, |
|
|
|
|
Timeout: 5 * time.Millisecond, |
|
|
|
|
Logger: log.New(os.Stderr, "", log.LstdFlags), |
|
|
|
|
ReapLock: &sync.RWMutex{}, |
|
|
|
|
} |
|
|
|
|
check.Start() |
|
|
|
|
defer check.Stop() |
|
|
|
@ -125,7 +122,6 @@ func TestCheckMonitor_RandomStagger(t *testing.T) {
|
|
|
|
|
Script: "exit 0", |
|
|
|
|
Interval: 25 * time.Millisecond, |
|
|
|
|
Logger: log.New(os.Stderr, "", log.LstdFlags), |
|
|
|
|
ReapLock: &sync.RWMutex{}, |
|
|
|
|
} |
|
|
|
|
check.Start() |
|
|
|
|
defer check.Stop() |
|
|
|
@ -154,7 +150,6 @@ func TestCheckMonitor_LimitOutput(t *testing.T) {
|
|
|
|
|
Script: "od -N 81920 /dev/urandom", |
|
|
|
|
Interval: 25 * time.Millisecond, |
|
|
|
|
Logger: log.New(os.Stderr, "", log.LstdFlags), |
|
|
|
|
ReapLock: &sync.RWMutex{}, |
|
|
|
|
} |
|
|
|
|
check.Start() |
|
|
|
|
defer check.Stop() |
|
|
|
|