mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
Add historical journald and log export flags to operator debug command (#26410)
* Add -log-file-export and -log-lookback commands to add historical log to debug capture * use monitor.PrepFile() helper for other historical log tests
This commit is contained in:
@@ -454,14 +454,7 @@ func TestMonitor_MonitorExport(t *testing.T) {
|
||||
ci.Parallel(t)
|
||||
|
||||
// Create test file
|
||||
dir := t.TempDir()
|
||||
f, err := os.CreateTemp(dir, "log")
|
||||
must.NoError(t, err)
|
||||
for range 1000 {
|
||||
_, _ = f.WriteString(fmt.Sprintf("%v [INFO] it's log, it's log, it's big it's heavy it's wood", time.Now()))
|
||||
}
|
||||
f.Close()
|
||||
testFilePath := f.Name()
|
||||
testFilePath := monitor.PrepFile(t).Name()
|
||||
testFileContents, err := os.ReadFile(testFilePath)
|
||||
must.NoError(t, err)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user