virtcontainers: Remove duplicated assert messages in utils test code

Remove duplicated strings in assert.Errorf() and assert.NoErrorf().

Fixes: #3714

Signed-off-by: zhanghj <zhanghj.lc@inspur.com>
This commit is contained in:
zhanghj 2022-02-18 16:42:42 +08:00
parent 0b31b7ccc2
commit 1cee0a9452

View File

@ -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)