From 6a64a4deecf5b7519d3748023765f79628059f80 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 12 Jul 2019 12:11:05 +0200 Subject: [PATCH] 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 --- internal/test/daemon/daemon.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/internal/test/daemon/daemon.go b/internal/test/daemon/daemon.go index cca2c078fe16a..e6ab7f39699b9 100644 --- a/internal/test/daemon/daemon.go +++ b/internal/test/daemon/daemon.go @@ -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) + } } }