summaryrefslogtreecommitdiff
path: root/libpod/state_test.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-07-10 12:35:48 +0200
committerGitHub <noreply@github.com>2020-07-10 12:35:48 +0200
commit2ac8c6953481eb7391a6a7594709811f7ae3167f (patch)
treea72386000d844e7b9c6f1dd79bf5b77f63a45fd2 /libpod/state_test.go
parentd9cd0032f7478e625329326d7593162a9f1e8c1e (diff)
parent4b784b377cea542228278f2ea501baa32b885be7 (diff)
downloadpodman-2ac8c6953481eb7391a6a7594709811f7ae3167f.tar.gz
podman-2ac8c6953481eb7391a6a7594709811f7ae3167f.tar.bz2
podman-2ac8c6953481eb7391a6a7594709811f7ae3167f.zip
Merge pull request #6917 from mheon/retErr_for_libpod
Remove all instances of named return "err" from Libpod
Diffstat (limited to 'libpod/state_test.go')
-rw-r--r--libpod/state_test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/libpod/state_test.go b/libpod/state_test.go
index 30ddf5e24..ef4f6f2be 100644
--- a/libpod/state_test.go
+++ b/libpod/state_test.go
@@ -34,13 +34,13 @@ var (
)
// Get an empty BoltDB state for use in tests
-func getEmptyBoltState() (s State, p string, m lock.Manager, err error) {
+func getEmptyBoltState() (_ State, _ string, _ lock.Manager, retErr error) {
tmpDir, err := ioutil.TempDir("", tmpDirPrefix)
if err != nil {
return nil, "", nil, err
}
defer func() {
- if err != nil {
+ if retErr != nil {
os.RemoveAll(tmpDir)
}
}()
@@ -66,13 +66,13 @@ func getEmptyBoltState() (s State, p string, m lock.Manager, err error) {
}
// Get an empty in-memory state for use in tests
-func getEmptyInMemoryState() (s State, p string, m lock.Manager, err error) {
+func getEmptyInMemoryState() (_ State, _ string, _ lock.Manager, retErr error) {
tmpDir, err := ioutil.TempDir("", tmpDirPrefix)
if err != nil {
return nil, "", nil, err
}
defer func() {
- if err != nil {
+ if retErr != nil {
os.RemoveAll(tmpDir)
}
}()