summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@pm.me>2019-04-23 16:10:42 -0400
committerMatthew Heon <matthew.heon@pm.me>2019-05-01 10:19:05 -0400
commit7a421a807c38dbe878b59c637f67c289cea7d418 (patch)
tree1c050dc2b643f6be73d55028b1b292e1b21bde9b /pkg
parent13451cab5c20b8f28602debbb382e1351930e2d5 (diff)
downloadpodman-7a421a807c38dbe878b59c637f67c289cea7d418.tar.gz
podman-7a421a807c38dbe878b59c637f67c289cea7d418.tar.bz2
podman-7a421a807c38dbe878b59c637f67c289cea7d418.zip
Use EqualValues instead of reflect equality
Same result, but notably better error messages when things go wrong. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'pkg')
-rw-r--r--pkg/spec/storage_test.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/pkg/spec/storage_test.go b/pkg/spec/storage_test.go
index 2439efb6f..04a9d6976 100644
--- a/pkg/spec/storage_test.go
+++ b/pkg/spec/storage_test.go
@@ -1,7 +1,6 @@
package createconfig
import (
- "reflect"
"testing"
spec "github.com/opencontainers/runtime-spec/specs-go"
@@ -20,7 +19,7 @@ func TestGetVolumeMountsOneVolume(t *testing.T) {
}
specMount, _, err := config.getVolumeMounts()
assert.NoError(t, err)
- assert.True(t, reflect.DeepEqual(data, specMount[data.Destination]))
+ assert.EqualValues(t, data, specMount[data.Destination])
}
func TestGetTmpfsMounts(t *testing.T) {
@@ -35,5 +34,5 @@ func TestGetTmpfsMounts(t *testing.T) {
}
tmpfsMount, err := config.getTmpfsMounts()
assert.NoError(t, err)
- assert.True(t, reflect.DeepEqual(data, tmpfsMount[data.Destination]))
+ assert.EqualValues(t, data, tmpfsMount[data.Destination])
}