mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2025-01-18 08:58:15 +01:00
fix: remove unused go import.
This commit is contained in:
parent
9650df00e3
commit
a3f21425e5
3 changed files with 32 additions and 5 deletions
32
pkg/aa/profile_test.go
Normal file
32
pkg/aa/profile_test.go
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
// apparmor.d - Full set of apparmor profiles
|
||||||
|
// Copyright (C) 2023 Alexandre Pujol <alexandre@pujol.io>
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
|
||||||
|
package aa
|
||||||
|
|
||||||
|
import (
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestAppArmorProfile_String(t *testing.T) {
|
||||||
|
tests := []struct {
|
||||||
|
name string
|
||||||
|
p AppArmorProfile
|
||||||
|
want string
|
||||||
|
}{
|
||||||
|
{
|
||||||
|
name: "empty",
|
||||||
|
p: AppArmorProfile{},
|
||||||
|
want: `profile {
|
||||||
|
}
|
||||||
|
`,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
for _, tt := range tests {
|
||||||
|
t.Run(tt.name, func(t *testing.T) {
|
||||||
|
if got := tt.p.String(); got != tt.want {
|
||||||
|
t.Errorf("AppArmorProfile.String() = %v, want %v", got, tt.want)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
|
@ -4,10 +4,6 @@
|
||||||
|
|
||||||
package aa
|
package aa
|
||||||
|
|
||||||
import (
|
|
||||||
"golang.org/x/exp/slices"
|
|
||||||
)
|
|
||||||
|
|
||||||
// Preamble section of a profile
|
// Preamble section of a profile
|
||||||
type Preamble struct {
|
type Preamble struct {
|
||||||
Abi []Abi
|
Abi []Abi
|
||||||
|
|
|
@ -6,7 +6,6 @@ package aa
|
||||||
|
|
||||||
import (
|
import (
|
||||||
_ "embed"
|
_ "embed"
|
||||||
"strings"
|
|
||||||
"text/template"
|
"text/template"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue