mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Clear raft state file after every test
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
parent
2faeebc750
commit
34f779dbc3
1 changed files with 5 additions and 0 deletions
|
@ -259,6 +259,11 @@ func (s *DockerSwarmSuite) TearDownTest(c *check.C) {
|
|||
s.daemonsLock.Lock()
|
||||
for _, d := range s.daemons {
|
||||
d.Stop()
|
||||
// raft state file is quite big (64MB) so remove it after every test
|
||||
walDir := filepath.Join(d.root, "swarm/raft/wal")
|
||||
if err := os.RemoveAll(walDir); err != nil {
|
||||
c.Logf("error removing %v: %v", walDir, err)
|
||||
}
|
||||
}
|
||||
s.daemons = nil
|
||||
s.daemonsLock.Unlock()
|
||||
|
|
Loading…
Reference in a new issue