mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
Simplified log path test
This commit is contained in:
parent
5353448a92
commit
63aadd9b5e
1 changed files with 2 additions and 19 deletions
|
|
@ -75,7 +75,7 @@ data-dir = "` + actualDataDir + `"
|
|||
},
|
||||
// TEST 2
|
||||
{
|
||||
args: []string{"server"},
|
||||
args: []string{"server", "--log-path", logFile.Name()},
|
||||
env: map[string]string{"PILOSA_PROFILE.CPU_TIME": "1m"},
|
||||
cfgFileContent: `
|
||||
bind = "localhost:0"
|
||||
|
|
@ -98,25 +98,8 @@ data-dir = "` + actualDataDir + `"
|
|||
v.Check(cmd.Server.Config.AntiEntropy.Interval, pilosa.Duration(time.Minute*11))
|
||||
v.Check(cmd.Server.CPUProfile, profFile.Name())
|
||||
v.Check(cmd.Server.CPUTime, time.Minute)
|
||||
return v.Error()
|
||||
},
|
||||
},
|
||||
// TEST 3 - test log path can be read from command line and it's priority is highest
|
||||
{
|
||||
args: []string{"server", "--log-path", logFile.Name()},
|
||||
env: map[string]string{"PILOSA_LOG_PATH": "/tmp/mylog_env"},
|
||||
cfgFileContent: `
|
||||
log-path = "/tmp/mylog_cfg"
|
||||
`,
|
||||
validation: func() error {
|
||||
v := validator{}
|
||||
v.Check(cmd.Server.Config.LogPath, logFile.Name())
|
||||
if err := v.Error(); err != nil {
|
||||
return v.Error()
|
||||
}
|
||||
// check that the log file was created
|
||||
_, err = logFile.Stat()
|
||||
return err
|
||||
return v.Error()
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue