feat(aa-log): add -r option to convert the log into rules.
This commit is contained in:
parent
d06a474b0c
commit
9650df00e3
2 changed files with 25 additions and 5 deletions
|
|
@ -25,6 +25,14 @@ func Test_app(t *testing.T) {
|
|||
rules: false,
|
||||
wantErr: false,
|
||||
},
|
||||
{
|
||||
name: "Test audit.log to rules",
|
||||
logger: "auditd",
|
||||
path: "../../tests/audit.log",
|
||||
profile: "",
|
||||
rules: rules,
|
||||
wantErr: false,
|
||||
},
|
||||
{
|
||||
name: "Test Dbus Session",
|
||||
logger: "systemd",
|
||||
|
|
@ -52,7 +60,7 @@ func Test_app(t *testing.T) {
|
|||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
if err := aaLog(tt.logger, tt.path, tt.profile); (err != nil) != tt.wantErr {
|
||||
if err := aaLog(tt.logger, tt.path, tt.profile, tt.rules); (err != nil) != tt.wantErr {
|
||||
t.Errorf("aaLog() error = %v, wantErr %v", err, tt.wantErr)
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue