From 3f261537b10000c65e98d537cc9e634ed88b1609 Mon Sep 17 00:00:00 2001 From: Slava Semushin Date: Wed, 24 Jan 2018 18:35:48 +0100 Subject: [PATCH] selinux/mustrunas_test.go(TestMustRunAsValidate): rename a member to make its meaning obvious. --- .../podsecuritypolicy/selinux/mustrunas_test.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pkg/security/podsecuritypolicy/selinux/mustrunas_test.go b/pkg/security/podsecuritypolicy/selinux/mustrunas_test.go index ae83ca66ee0..caa0a0438cc 100644 --- a/pkg/security/podsecuritypolicy/selinux/mustrunas_test.go +++ b/pkg/security/podsecuritypolicy/selinux/mustrunas_test.go @@ -100,31 +100,31 @@ func TestMustRunAsValidate(t *testing.T) { seType.Type = "invalid" tests := map[string]struct { - seLinux *api.SELinuxOptions + podSeLinux *api.SELinuxOptions expectedMsg string }{ "invalid role": { - seLinux: role, + podSeLinux: role, expectedMsg: "role: Invalid value", }, "invalid user": { - seLinux: user, + podSeLinux: user, expectedMsg: "user: Invalid value", }, "invalid level": { - seLinux: level, + podSeLinux: level, expectedMsg: "level: Invalid value", }, "invalid type": { - seLinux: seType, + podSeLinux: seType, expectedMsg: "type: Invalid value", }, "valid": { - seLinux: newValidOpts(), + podSeLinux: newValidOpts(), expectedMsg: "", }, "valid with different order of categories": { - seLinux: newValidOptsWithLevel("s0:c6,c0"), + podSeLinux: newValidOptsWithLevel("s0:c6,c0"), expectedMsg: "", }, } @@ -140,7 +140,7 @@ func TestMustRunAsValidate(t *testing.T) { continue } - errs := mustRunAs.Validate(nil, nil, nil, tc.seLinux) + errs := mustRunAs.Validate(nil, nil, nil, tc.podSeLinux) //should've passed but didn't if len(tc.expectedMsg) == 0 && len(errs) > 0 { t.Errorf("%s expected no errors but received %v", name, errs)