Skip to content
This repository was archived by the owner on Mar 9, 2022. It is now read-only.

Commit 2a07847

Browse files
committed
Use t.Run() instead of t.Log() for subtest log
Signed-off-by: Brian Goff <[email protected]>
1 parent 96484eb commit 2a07847

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

pkg/server/helpers_selinux_test.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,11 @@ func TestInitSelinuxOpts(t *testing.T) {
6262
mountLabels: []string{"user_u:object_r:container_file_t:s0:c1,c2", "user_u:object_r:svirt_sandbox_file_t:s0:c1,c2"},
6363
},
6464
} {
65-
t.Logf("TestCase %q", desc)
66-
processLabel, mountLabel, err := initSelinuxOpts(test.selinuxOpt)
67-
assert.NoError(t, err)
68-
assert.Equal(t, test.processLabel, processLabel)
69-
assert.Contains(t, test.mountLabels, mountLabel)
65+
t.Run(desc, func(t *testing.T) {
66+
processLabel, mountLabel, err := initSelinuxOpts(test.selinuxOpt)
67+
assert.NoError(t, err)
68+
assert.Equal(t, test.processLabel, processLabel)
69+
assert.Contains(t, test.mountLabels, mountLabel)
70+
})
7071
}
7172
}

0 commit comments

Comments
 (0)