Fix tests for log levels and work on adding title
This commit is contained in:
@@ -89,6 +89,9 @@ func TestJobEncodeDecode(t *testing.T) {
|
||||
if k.Name != j.Name {
|
||||
t.Error(k.Name, "vs", j.Name)
|
||||
}
|
||||
if k.Title != j.Title {
|
||||
t.Error(k.Title, "vs", j.Title)
|
||||
}
|
||||
if diff := k.LastRun.Unix() - j.LastRun.Unix(); (diff > 0 && diff < int64(time.Hour)) || (diff < 0 && -1*diff < int64(time.Hour)) {
|
||||
t.Error(j.LastRun, "vs", k.LastRun)
|
||||
}
|
||||
@@ -109,6 +112,7 @@ func TestJobEncodeDecode(t *testing.T) {
|
||||
}
|
||||
|
||||
func captureLog() (*bytes.Buffer, func()) {
|
||||
logb.Set(logb.VERBOSE)
|
||||
was := logb.Writer()
|
||||
wase := os.Stderr
|
||||
f, _ := ioutil.TempFile(os.TempDir(), "test.newBashJobAndRun")
|
||||
|
||||
Reference in New Issue
Block a user