remove db file after testing

master
Carlo Strub 7 years ago
parent 3b3c20962b
commit a035f64358

@ -1,6 +1,8 @@
package sisyphus_test package sisyphus_test
import ( import (
"os"
"github.com/boltdb/bolt" "github.com/boltdb/bolt"
. "github.com/carlostrub/sisyphus" . "github.com/carlostrub/sisyphus"
@ -41,6 +43,9 @@ var _ = Describe("Database", func() {
Ω(sN).Should(Equal(0)) Ω(sN).Should(Equal(0))
CloseDatabases(dbs) CloseDatabases(dbs)
err = os.Remove("test/Maildir/sisyphus.db")
Ω(err).ShouldNot(HaveOccurred())
}) })
It("Closes an open database", func() { It("Closes an open database", func() {
@ -60,6 +65,9 @@ var _ = Describe("Database", func() {
return nil return nil
}) })
Ω(err).Should(HaveOccurred()) Ω(err).Should(HaveOccurred())
err = os.Remove("test/Maildir/sisyphus.db")
Ω(err).ShouldNot(HaveOccurred())
}) })
}) })
}) })

Loading…
Cancel
Save