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
|
logger string
|
||||||
path string
|
path string
|
||||||
profile string
|
profile string
|
||||||
anon bool
|
rules bool
|
||||||
wantErr bool
|
wantErr bool
|
||||||
}{
|
}{
|
||||||
{
|
{
|
||||||
@ -22,7 +22,7 @@ func Test_app(t *testing.T) {
|
|||||||
logger: "auditd",
|
logger: "auditd",
|
||||||
path: "../../tests/audit.log",
|
path: "../../tests/audit.log",
|
||||||
profile: "",
|
profile: "",
|
||||||
anon: true,
|
rules: false,
|
||||||
wantErr: false,
|
wantErr: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -30,7 +30,7 @@ func Test_app(t *testing.T) {
|
|||||||
logger: "systemd",
|
logger: "systemd",
|
||||||
path: "../../tests/systemd.log",
|
path: "../../tests/systemd.log",
|
||||||
profile: "",
|
profile: "",
|
||||||
anon: false,
|
rules: false,
|
||||||
wantErr: false,
|
wantErr: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -38,7 +38,7 @@ func Test_app(t *testing.T) {
|
|||||||
logger: "auditd",
|
logger: "auditd",
|
||||||
path: "../../tests/log",
|
path: "../../tests/log",
|
||||||
profile: "",
|
profile: "",
|
||||||
anon: false,
|
rules: false,
|
||||||
wantErr: true,
|
wantErr: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -46,13 +46,13 @@ func Test_app(t *testing.T) {
|
|||||||
logger: "raw",
|
logger: "raw",
|
||||||
path: "../../tests/audit.log",
|
path: "../../tests/audit.log",
|
||||||
profile: "",
|
profile: "",
|
||||||
anon: false,
|
rules: false,
|
||||||
wantErr: true,
|
wantErr: true,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
for _, tt := range tests {
|
for _, tt := range tests {
|
||||||
t.Run(tt.name, func(t *testing.T) {
|
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)
|
t.Errorf("aaLog() error = %v, wantErr %v", err, tt.wantErr)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user