integration: fix cleanup of raft data
The directory used for storage was either changed or new directories
were added.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 6a64a4deec
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
34418110ec
commit
ad8327f2ce
1 changed files with 5 additions and 3 deletions
|
@ -708,8 +708,10 @@ 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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue