test: remove useless unit test.

This commit is contained in:
Alexandre Pujol 2024-05-11 13:25:24 +01:00
parent 14cac43c6c
commit aa0386253c
Failed to generate hash of commit

View file

@ -9,37 +9,6 @@ import (
"testing"
)
func TestDefaultTunables(t *testing.T) {
tests := []struct {
name string
want *AppArmorProfile
}{
{
name: "aa",
want: &AppArmorProfile{
Preamble: Preamble{
Variables: []Variable{
{"bin", []string{"/{,usr/}{,s}bin"}},
{"lib", []string{"/{,usr/}lib{,exec,32,64}"}},
{"multiarch", []string{"*-linux-gnu*"}},
{"HOME", []string{"/home/*"}},
{"user_share_dirs", []string{"/home/*/.local/share"}},
{"etc_ro", []string{"/{,usr/}etc/"}},
{"int", []string{"[0-9]{[0-9],}{[0-9],}{[0-9],}{[0-9],}{[0-9],}{[0-9],}{[0-9],}{[0-9],}{[0-9],}"}},
},
},
},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := DefaultTunables(); !reflect.DeepEqual(got, tt.want) {
t.Errorf("DefaultTunables() = %v, want %v", got, tt.want)
}
})
}
}
func TestAppArmorProfile_ParseVariables(t *testing.T) {
tests := []struct {
name string