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

View file

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