mirror of
https://github.com/falcosecurity/falco.git
synced 2025-08-15 04:43:52 +00:00
update(test): check output order in output_strictly_contains
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
This commit is contained in:
parent
4d55847bd4
commit
9ea43c2663
@ -409,12 +409,15 @@ class FalcoTest(Test):
|
||||
else:
|
||||
actual = open(output['actual']).read()
|
||||
|
||||
actual_cursor = actual
|
||||
expected_lines = expected.splitlines()
|
||||
for line in expected_lines:
|
||||
if line not in actual:
|
||||
pos = actual_cursor.find(line)
|
||||
if pos < 0:
|
||||
self.fail("Output '{}' does not strictly contains the expected content '{}'".format(
|
||||
output['actual'], output['expected']))
|
||||
return False
|
||||
actual_cursor = actual_cursor[pos + len(line):]
|
||||
|
||||
return True
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user