From 69ed2ccc54f48b8fff30e28644ad96d56d093dd1 Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Sun, 2 Dec 2018 16:10:26 -0500 Subject: Make locks dir in unit tests Ensure we don't break the unit tests by creating a locks directory (which, prior to the last commit, would be created by BoltDB state init). Signed-off-by: Matthew Heon --- libpod/state_test.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libpod') diff --git a/libpod/state_test.go b/libpod/state_test.go index 04572fb29..0f5da62e4 100644 --- a/libpod/state_test.go +++ b/libpod/state_test.go @@ -45,6 +45,10 @@ func getEmptyBoltState() (s State, p string, p2 string, err error) { dbPath := filepath.Join(tmpDir, "db.sql") lockDir := filepath.Join(tmpDir, "locks") + if err := os.Mkdir(lockDir, 0755); err != nil { + return nil, "", "", err + } + runtime := new(Runtime) runtime.config = new(RuntimeConfig) runtime.config.StorageConfig = storage.StoreOptions{} -- cgit v1.2.3-54-g00ecf