diff --git a/pkg/aa/apparmor_test.go b/pkg/aa/apparmor_test.go index dd0a9fe3..faef895d 100644 --- a/pkg/aa/apparmor_test.go +++ b/pkg/aa/apparmor_test.go @@ -49,7 +49,7 @@ func TestAppArmorProfileFile_String(t *testing.T) { Attributes: map[string]string{"security.tagged": "allowed"}, Flags: []string{"complain", "attach_disconnected"}, }, - Rules: []Rule{ + Rules: Rules{ &Include{IsMagic: true, Path: "abstractions/base"}, &Include{IsMagic: true, Path: "abstractions/nameservice-strict"}, rlimit1, @@ -58,7 +58,7 @@ func TestAppArmorProfileFile_String(t *testing.T) { &Network{Domain: "inet", Type: "stream"}, &Network{Domain: "inet6", Type: "stream"}, &Mount{ - RuleBase: RuleBase{Comment: "failed perms check"}, + RuleBase: RuleBase{Comment: " failed perms check"}, MountConditions: MountConditions{ FsType: "fuse.portal", Options: []string{"rw", "rbind"}, @@ -83,11 +83,7 @@ func TestAppArmorProfileFile_String(t *testing.T) { PeerLabel: "gnome-shell", PeerAddr: "none", }, - &Dbus{ - Access: []string{"bind"}, - Bus: "session", - Name: "org.gnome.*", - }, + &Dbus{Access: []string{"bind"}, Bus: "session", Name: "org.gnome.*"}, &Dbus{ Access: []string{"receive"}, Bus: "system", diff --git a/pkg/aa/rules_test.go b/pkg/aa/rules_test.go index 7bbd119b..f44d2e70 100644 --- a/pkg/aa/rules_test.go +++ b/pkg/aa/rules_test.go @@ -9,7 +9,7 @@ import ( "testing" ) -func TestRule_FromLog(t *testing.T) { +func TestRules_FromLog(t *testing.T) { tests := []struct { name string fromLog func(map[string]string) Rule @@ -98,7 +98,7 @@ func TestRule_FromLog(t *testing.T) { } } -func TestRule_Less(t *testing.T) { +func TestRules_Less(t *testing.T) { tests := []struct { name string rule Rule @@ -272,7 +272,7 @@ func TestRule_Less(t *testing.T) { } } -func TestRule_Equals(t *testing.T) { +func TestRules_Equals(t *testing.T) { tests := []struct { name string rule Rule @@ -368,7 +368,7 @@ func TestRule_Equals(t *testing.T) { } } -func TestRule_String(t *testing.T) { +func TestRules_String(t *testing.T) { tests := []struct { name string rule Rule @@ -417,7 +417,7 @@ func TestRule_String(t *testing.T) { { name: "mount", rule: mount1, - want: "mount fstype=overlay overlay -> /var/lib/docker/overlay2/opaque-bug-check1209538631/merged/, # failed perms check", + want: "mount fstype=overlay overlay -> /var/lib/docker/overlay2/opaque-bug-check1209538631/merged/, #failed perms check", }, { name: "pivot_root",