From 2a07847d678092ba138a5268ec128234e102a0d9 Mon Sep 17 00:00:00 2001 From: Brian Goff Date: Tue, 9 Jan 2018 15:45:13 -0500 Subject: [PATCH] Use `t.Run()` instead of `t.Log()` for subtest log Signed-off-by: Brian Goff --- pkg/server/helpers_selinux_test.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkg/server/helpers_selinux_test.go b/pkg/server/helpers_selinux_test.go index 8a10fafa3..259b65fd7 100644 --- a/pkg/server/helpers_selinux_test.go +++ b/pkg/server/helpers_selinux_test.go @@ -62,10 +62,11 @@ func TestInitSelinuxOpts(t *testing.T) { mountLabels: []string{"user_u:object_r:container_file_t:s0:c1,c2", "user_u:object_r:svirt_sandbox_file_t:s0:c1,c2"}, }, } { - t.Logf("TestCase %q", desc) - processLabel, mountLabel, err := initSelinuxOpts(test.selinuxOpt) - assert.NoError(t, err) - assert.Equal(t, test.processLabel, processLabel) - assert.Contains(t, test.mountLabels, mountLabel) + t.Run(desc, func(t *testing.T) { + processLabel, mountLabel, err := initSelinuxOpts(test.selinuxOpt) + assert.NoError(t, err) + assert.Equal(t, test.processLabel, processLabel) + assert.Contains(t, test.mountLabels, mountLabel) + }) } }