fix(build): ensure tests work.

This commit is contained in:
Alexandre Pujol 2024-03-27 16:26:01 +00:00
parent b88b8b8c26
commit cf7ce9603e
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
7 changed files with 17 additions and 7 deletions

View file

@ -7,11 +7,11 @@ package prepare
import (
"os"
"os/exec"
"slices"
"testing"
"github.com/arduino/go-paths-helper"
"github.com/roddhjav/apparmor.d/pkg/prebuild/cfg"
"golang.org/x/exp/slices"
)
func chdirGitRoot() {
@ -84,6 +84,7 @@ func TestTask_Apply(t *testing.T) {
},
}
chdirGitRoot()
cfg.Root.RemoveAll()
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got, err := tt.task.Apply()