The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/3370

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
Signed-off-by: Alberto Donato <[email protected]>
From 63d6122d96ae80da97e9808d358dea3d414324af Mon Sep 17 00:00:00 2001
From: Alberto Donato <[email protected]>
Date: Wed, 31 May 2017 15:35:32 +0200
Subject: [PATCH] Use in-memory db for tests (makes them faster)

Signed-off-by: Alberto Donato <[email protected]>
---
 lxd/main_test.go | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/lxd/main_test.go b/lxd/main_test.go
index 6f8969371..4db9162a2 100644
--- a/lxd/main_test.go
+++ b/lxd/main_test.go
@@ -77,7 +77,7 @@ func (suite *lxdTestSuite) TearDownSuite() {
 }
 
 func (suite *lxdTestSuite) SetupTest() {
-       initializeDbObject(suite.d, shared.VarPath("lxd.db"))
+       initializeDbObject(suite.d, ":memory:")
        daemonConfigInit(suite.d.db)
 
        // Create default storage pool. Make sure that we don't pass a nil to
@@ -124,8 +124,4 @@ func (suite *lxdTestSuite) SetupTest() {
 
 func (suite *lxdTestSuite) TearDownTest() {
        suite.d.db.Close()
-       err := os.Remove(shared.VarPath("lxd.db"))
-       if err != nil {
-               os.Exit(1)
-       }
 }
_______________________________________________
lxc-devel mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to