From 1cee0a94528fc03891fffe04e94b1b02b9010b75 Mon Sep 17 00:00:00 2001 From: zhanghj Date: Fri, 18 Feb 2022 16:42:42 +0800 Subject: [PATCH] virtcontainers: Remove duplicated assert messages in utils test code Remove duplicated strings in assert.Errorf() and assert.NoErrorf(). Fixes: #3714 Signed-off-by: zhanghj --- src/runtime/virtcontainers/utils/utils_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runtime/virtcontainers/utils/utils_test.go b/src/runtime/virtcontainers/utils/utils_test.go index f37e0f222d..838e72ef46 100644 --- a/src/runtime/virtcontainers/utils/utils_test.go +++ b/src/runtime/virtcontainers/utils/utils_test.go @@ -297,9 +297,9 @@ func TestBuildSocketPath(t *testing.T) { msg := fmt.Sprintf("test[%d]: %+v", i, d) if d.valid { - assert.NoErrorf(err, "test %d, data %+v", i, d, msg) + assert.NoError(err, msg) } else { - assert.Errorf(err, "test %d, data %+v", i, d, msg) + assert.Error(err, msg) } assert.NotNil(result, msg)