mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
testutil/daemon: ReadLogFile() trigger os.Sync() before reading
Make sure it's written to disk before we try reading the logs. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
040b1d5eeb
commit
e7583ab859
1 changed files with 1 additions and 0 deletions
|
@ -262,6 +262,7 @@ func (d *Daemon) LogFileName() string {
|
||||||
|
|
||||||
// ReadLogFile returns the content of the daemon log file
|
// ReadLogFile returns the content of the daemon log file
|
||||||
func (d *Daemon) ReadLogFile() ([]byte, error) {
|
func (d *Daemon) ReadLogFile() ([]byte, error) {
|
||||||
|
_ = d.logFile.Sync()
|
||||||
return os.ReadFile(d.logFile.Name())
|
return os.ReadFile(d.logFile.Name())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue