From 2194134b70463a4a50cb278f8d9cace8f0795e33 Mon Sep 17 00:00:00 2001 From: mpl Date: Mon, 17 Feb 2014 23:31:01 +0100 Subject: [PATCH] fs: clean up mountpoints after tests Otherwise they tend to annoyingly accumulate on long-lived hosts (such as the buildbot). Change-Id: I41eb90423c1f98d8481fb3308c2cdcb74fc86ddd --- pkg/fs/fs_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/fs/fs_test.go b/pkg/fs/fs_test.go index 9ec2a70bb..879de0847 100644 --- a/pkg/fs/fs_test.go +++ b/pkg/fs/fs_test.go @@ -129,6 +129,11 @@ func cammountTest(t *testing.T, fn func(env *mountEnv)) { if err != nil { t.Fatal(err) } + defer func() { + if err := os.RemoveAll(mountPoint); err != nil { + t.Fatal(err) + } + }() verbose := "false" var stderrDest io.Writer = ioutil.Discard if v, _ := strconv.ParseBool(os.Getenv("VERBOSE_FUSE")); v {