Skip to content

Commit

Permalink
integration: fix cleanup of raft data
Browse files Browse the repository at this point in the history
The directory used for storage was either changed or new directories
were added.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
  • Loading branch information
thaJeztah committed Jul 13, 2019
1 parent 47a84dc commit 6a64a4d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions internal/test/daemon/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -722,9 +722,11 @@ func cleanupRaftDir(t testingT, rootPath string) {
if ht, ok := t.(test.HelperT); ok {
ht.Helper()
}
walDir := filepath.Join(rootPath, "swarm/raft/wal")
if err := os.RemoveAll(walDir); err != nil {
t.Logf("error removing %v: %v", walDir, err)
for _, p := range []string{"wal", "wal-v3-encrypted", "snap-v3-encrypted"} {
dir := filepath.Join(rootPath, "swarm/raft", p)
if err := os.RemoveAll(dir); err != nil {
t.Logf("error removing %v: %v", dir, err)
}
}
}

Expand Down

0 comments on commit 6a64a4d

Please sign in to comment.