mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2024-11-14 23:43:56 +01:00
fix: go test.
This commit is contained in:
parent
e0f79b9c9a
commit
e821470d0d
@ -14,7 +14,7 @@ func Test_app(t *testing.T) {
|
||||
logger string
|
||||
path string
|
||||
profile string
|
||||
anon bool
|
||||
rules bool
|
||||
wantErr bool
|
||||
}{
|
||||
{
|
||||
@ -22,7 +22,7 @@ func Test_app(t *testing.T) {
|
||||
logger: "auditd",
|
||||
path: "../../tests/audit.log",
|
||||
profile: "",
|
||||
anon: true,
|
||||
rules: false,
|
||||
wantErr: false,
|
||||
},
|
||||
{
|
||||
@ -30,7 +30,7 @@ func Test_app(t *testing.T) {
|
||||
logger: "systemd",
|
||||
path: "../../tests/systemd.log",
|
||||
profile: "",
|
||||
anon: false,
|
||||
rules: false,
|
||||
wantErr: false,
|
||||
},
|
||||
{
|
||||
@ -38,7 +38,7 @@ func Test_app(t *testing.T) {
|
||||
logger: "auditd",
|
||||
path: "../../tests/log",
|
||||
profile: "",
|
||||
anon: false,
|
||||
rules: false,
|
||||
wantErr: true,
|
||||
},
|
||||
{
|
||||
@ -46,13 +46,13 @@ func Test_app(t *testing.T) {
|
||||
logger: "raw",
|
||||
path: "../../tests/audit.log",
|
||||
profile: "",
|
||||
anon: false,
|
||||
rules: false,
|
||||
wantErr: true,
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
if err := aaLog(tt.logger, tt.path, tt.profile, tt.anon); (err != nil) != tt.wantErr {
|
||||
if err := aaLog(tt.logger, tt.path, tt.profile); (err != nil) != tt.wantErr {
|
||||
t.Errorf("aaLog() error = %v, wantErr %v", err, tt.wantErr)
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user