build: update directives with the new interface.

This commit is contained in:
Alexandre Pujol 2024-03-25 22:40:25 +00:00
parent 38e9e5f08e
commit 08d4110c2a
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
9 changed files with 63 additions and 89 deletions

View file

@ -8,6 +8,7 @@ import (
"testing"
"github.com/arduino/go-paths-helper"
"github.com/roddhjav/apparmor.d/pkg/prebuild/cfg"
)
func TestStack_Apply(t *testing.T) {
@ -66,7 +67,7 @@ profile parent @{exec_path} {
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
rootApparmord = tt.rootApparmord
cfg.RootApparmord = tt.rootApparmord
if got := Directives["stack"].Apply(tt.opt, tt.profile); got != tt.want {
t.Errorf("Stack.Apply() = %v, want %v", got, tt.want)
}