]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
datasets-06-state-long: fix file compare
authorJason Ish <jason.ish@oisf.net>
Fri, 10 Dec 2021 15:27:23 +0000 (09:27 -0600)
committerJason Ish <jason.ish@oisf.net>
Fri, 10 Dec 2021 20:22:11 +0000 (14:22 -0600)
Different versions of sort will sort differently. So
sort the expected data as well before comparing it
with sorted output.

tests/datasets-06-state-long/test.yaml

index fa61d7f0685a39357b0b0989ada5d0c23bbc10fb..04d01fe4077dc3dc3b6254194624e7e5ad228404 100644 (file)
@@ -12,6 +12,6 @@ command: |
 
 checks:
   - shell:
-     args: cat state.csv | sort > state-sorted.csv
-  - shell:
-     args: cmp state-sorted.csv ../expected/state.csv
+      args: |
+        cat ../expected/state.csv | sort > expected.csv
+        cat state.csv | sort | cmp - expected.csv