mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-11 15:21:02 +00:00
Check log file size > 0
This commit is contained in:
parent
63aadd9b5e
commit
2a87c6783a
1 changed files with 10 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
|||
package cmd_test
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"io/ioutil"
|
||||
"strings"
|
||||
"testing"
|
||||
|
|
@ -99,7 +100,15 @@ data-dir = "` + actualDataDir + `"
|
|||
v.Check(cmd.Server.CPUProfile, profFile.Name())
|
||||
v.Check(cmd.Server.CPUTime, time.Minute)
|
||||
v.Check(cmd.Server.Config.LogPath, logFile.Name())
|
||||
return v.Error()
|
||||
if v.Error() != nil {
|
||||
return v.Error()
|
||||
}
|
||||
// confirm log file was written
|
||||
info, err := logFile.Stat()
|
||||
if err != nil || info.Size() == 0 {
|
||||
return errors.New("Log file was not written!")
|
||||
}
|
||||
return nil
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue