eventmanager: add path exists filesystem action

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino
2022-08-20 14:13:43 +02:00
parent 57935f585c
commit 9ddd2d3588
12 changed files with 327 additions and 42 deletions

View File

@@ -2270,6 +2270,14 @@ func compareEventActionFsConfigFields(expected, actual dataprovider.EventActionF
return errors.New("fs mkdir content mismatch")
}
}
if len(expected.Exist) != len(actual.Exist) {
return errors.New("fs exist mismatch")
}
for _, v := range expected.Exist {
if !util.Contains(actual.Exist, v) {
return errors.New("fs exist content mismatch")
}
}
return nil
}