diff options
author | Matthew Heon <mheon@redhat.com> | 2018-12-02 16:10:26 -0500 |
---|---|---|
committer | Matthew Heon <mheon@redhat.com> | 2018-12-02 16:53:15 -0500 |
commit | 69ed2ccc54f48b8fff30e28644ad96d56d093dd1 (patch) | |
tree | af4d332473b896fd89a321f5f2c93d913b9d8246 /libpod/state_test.go | |
parent | 03229239b018b611b5f0307dc0d11bb0fb15c1ae (diff) | |
download | podman-69ed2ccc54f48b8fff30e28644ad96d56d093dd1.tar.gz podman-69ed2ccc54f48b8fff30e28644ad96d56d093dd1.tar.bz2 podman-69ed2ccc54f48b8fff30e28644ad96d56d093dd1.zip |
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 <mheon@redhat.com>
Diffstat (limited to 'libpod/state_test.go')
-rw-r--r-- | libpod/state_test.go | 4 |
1 files changed, 4 insertions, 0 deletions
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{} |