test(aa): cleanup unit tests.

This commit is contained in:
Alexandre Pujol 2024-05-04 23:45:36 +01:00
parent f763d31a07
commit 5943e9a24d
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
2 changed files with 8 additions and 12 deletions

View file

@ -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",