refractor(build): move os logic to its own module.

This commit is contained in:
Alexandre Pujol 2024-03-21 18:58:32 +00:00
parent 662dd1c6dc
commit e1d1d0be3d
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
9 changed files with 158 additions and 86 deletions

View file

@ -9,6 +9,7 @@ import (
"os/exec"
"testing"
oss "github.com/roddhjav/apparmor.d/pkg/os"
"github.com/roddhjav/apparmor.d/pkg/prebuild"
)
@ -71,7 +72,7 @@ func Test_AAPrebuild(t *testing.T) {
chdirGitRoot()
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
prebuild.Distribution = tt.dist
oss.Distribution = tt.dist
if tt.full {
prebuild.Prepares = append(prebuild.Prepares, prebuild.SetFullSystemPolicy)
}