From 7a421a807c38dbe878b59c637f67c289cea7d418 Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Tue, 23 Apr 2019 16:10:42 -0400 Subject: Use EqualValues instead of reflect equality Same result, but notably better error messages when things go wrong. Signed-off-by: Matthew Heon --- pkg/spec/storage_test.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'pkg') 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]) } -- cgit v1.2.3-54-g00ecf