chore: cleanup test data.

This commit is contained in:
Alexandre Pujol 2023-09-29 20:10:38 +01:00
parent c7485326e8
commit d810acd58f
Failed to generate hash of commit
2 changed files with 26 additions and 54 deletions

View file

@ -15,14 +15,8 @@ var (
"profile": "pkexec", "profile": "pkexec",
"comm": "pkexec", "comm": "pkexec",
} }
capability1 = &Capability{ capability1 = &Capability{Name: "net_admin"}
Qualifier: Qualifier{}, capability2 = &Capability{Name: "sys_ptrace"}
Name: "net_admin",
}
capability2 = &Capability{
Qualifier: Qualifier{},
Name: "sys_ptrace",
}
// Network // Network
network1Log = map[string]string{ network1Log = map[string]string{
@ -38,18 +32,13 @@ var (
"comm": "sddm-greeter", "comm": "sddm-greeter",
} }
network1 = &Network{ network1 = &Network{
Qualifier: Qualifier{},
Domain: "netlink", Domain: "netlink",
Type: "raw", Type: "raw",
Protocol: "15", Protocol: "15",
AddressExpr: AddressExpr{},
} }
network2 = &Network{ network2 = &Network{
Qualifier: Qualifier{},
Domain: "inet", Domain: "inet",
Type: "dgram", Type: "dgram",
Protocol: "",
AddressExpr: AddressExpr{},
} }
// Mount // Mount
@ -69,7 +58,7 @@ var (
"apparmor": "ALLOWED", "apparmor": "ALLOWED",
"class": "mount", "class": "mount",
"operation": "mount", "operation": "mount",
"info": "failed perms check", "info": "failed perms check", // TODO: not attach_disconnected
"error": "-13", "error": "-13",
"profile": "dockerd", "profile": "dockerd",
"name": "/var/lib/docker/overlay2/metacopy-check906831159/merged/", "name": "/var/lib/docker/overlay2/metacopy-check906831159/merged/",
@ -78,24 +67,12 @@ var (
"srcname": "overlay", "srcname": "overlay",
} }
mount1 = &Mount{ mount1 = &Mount{
Qualifier: Qualifier{}, MountConditions: MountConditions{FsType: "overlay", Options: []string{}},
MountConditions: MountConditions{
Fs: "",
Op: "",
FsType: "overlay",
Options: []string{},
},
Source: "overlay", Source: "overlay",
MountPoint: "/var/lib/docker/overlay2/opaque-bug-check1209538631/merged/", MountPoint: "/var/lib/docker/overlay2/opaque-bug-check1209538631/merged/",
} }
mount2 = &Mount{ mount2 = &Mount{
Qualifier: Qualifier{}, MountConditions: MountConditions{FsType: "overlay", Options: []string{}},
MountConditions: MountConditions{
Fs: "",
Op: "",
FsType: "overlay",
Options: []string{},
},
Source: "overlay", Source: "overlay",
MountPoint: "/var/lib/docker/overlay2/metacopy-check906831159/merged/", MountPoint: "/var/lib/docker/overlay2/metacopy-check906831159/merged/",
} }
@ -113,13 +90,11 @@ var (
"peer": "firefox//&firejail-default", "peer": "firefox//&firejail-default",
} }
signal1 = &Signal{ signal1 = &Signal{
Qualifier: Qualifier{},
Access: "receive", Access: "receive",
Set: "kill", Set: "kill",
Peer: "firefox//&firejail-default", Peer: "firefox//&firejail-default",
} }
signal2 = &Signal{ signal2 = &Signal{
Qualifier: Qualifier{},
Access: "receive", Access: "receive",
Set: "up", Set: "up",
Peer: "firefox//&firejail-default", Peer: "firefox//&firejail-default",

View file

@ -53,7 +53,6 @@ func TestAppArmorProfile_String(t *testing.T) {
}, },
Includes: []Include{ Includes: []Include{
{ {
IfExists: false,
IsMagic: true, IsMagic: true,
Path: "tunables/global", Path: "tunables/global",
}, },
@ -78,12 +77,10 @@ func TestAppArmorProfile_String(t *testing.T) {
Flags: []string{"complain", "attach_disconnected"}, Flags: []string{"complain", "attach_disconnected"},
Rules: []ApparmorRule{ Rules: []ApparmorRule{
&Include{ &Include{
IfExists: false,
IsMagic: true, IsMagic: true,
Path: "abstractions/base", Path: "abstractions/base",
}, },
&Include{ &Include{
IfExists: false,
IsMagic: true, IsMagic: true,
Path: "abstractions/nameservice-strict", Path: "abstractions/nameservice-strict",
}, },