Use t.Run() instead of t.Log() for subtest log

Signed-off-by: Brian Goff <brian.goff@docker.com>
This commit is contained in:
Brian Goff 2018-01-09 15:45:13 -05:00
parent 96484eb3e7
commit 2a07847d67

View File

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