build(directive): support both liust & map.
This commit is contained in:
parent
f81ceb9185
commit
88fcdd8c8e
10 changed files with 126 additions and 86 deletions
|
|
@ -22,10 +22,11 @@ func TestExec_Apply(t *testing.T) {
|
|||
name: "exec",
|
||||
rootApparmord: paths.New("../../../apparmor.d/groups/kde/"),
|
||||
opt: &Option{
|
||||
Name: "exec",
|
||||
Args: map[string]string{"DiscoverNotifier": ""},
|
||||
File: nil,
|
||||
Raw: " #aa:exec DiscoverNotifier",
|
||||
Name: "exec",
|
||||
ArgMap: map[string]string{"DiscoverNotifier": ""},
|
||||
ArgList: []string{"DiscoverNotifier"},
|
||||
File: nil,
|
||||
Raw: " #aa:exec DiscoverNotifier",
|
||||
},
|
||||
profile: ` #aa:exec DiscoverNotifier`,
|
||||
want: ` @{lib}/@{multiarch}/{,libexec/}DiscoverNotifier Px,
|
||||
|
|
@ -35,10 +36,11 @@ func TestExec_Apply(t *testing.T) {
|
|||
name: "exec-unconfined",
|
||||
rootApparmord: paths.New("../../../apparmor.d/groups/freedesktop/"),
|
||||
opt: &Option{
|
||||
Name: "exec",
|
||||
Args: map[string]string{"U": "", "polkit-agent-helper": ""},
|
||||
File: nil,
|
||||
Raw: " #aa:exec U polkit-agent-helper",
|
||||
Name: "exec",
|
||||
ArgMap: map[string]string{"U": "", "polkit-agent-helper": ""},
|
||||
ArgList: []string{"U", "polkit-agent-helper"},
|
||||
File: nil,
|
||||
Raw: " #aa:exec U polkit-agent-helper",
|
||||
},
|
||||
profile: ` #aa:exec U polkit-agent-helper`,
|
||||
want: ` @{lib}/polkit-[0-9]/polkit-agent-helper-[0-9] Ux,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue