summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/cache/dumps
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2023-12-07 10:08:50 +0100
committerPhil Sutter <phil@nwl.cc>2024-02-08 18:25:45 +0100
commitd8f2124ffe1965629d0d47ad22a27e36de279c43 (patch)
treee3d1dfccfd3928dd29eeec5262e889b53eef4689 /tests/shell/testcases/cache/dumps
parent46eeb2339d2923daaf736fb0bb41383fc03e4ec0 (diff)
tests/shell: have .json-nft dumps prettified to wrap lines
Previously, the .json-nft file in git contains the output of `nft -j list ruleset`. This is one long line and makes diffs harder to review. Instead, have the prettified .json-nft file committed to git. - the diff now operates on the prettified version. That means, it compares essentially - `nft -j list ruleset | json-sanitize-ruleset.sh | json-pretty.sh` - `cat "$TEST.json-nft" | json-pretty.sh` The script "json-diff-pretty.sh" is no longer used. It is kept however, because it might be a useful for manual comparing files. Note that "json-sanitize-ruleset.sh" and "json-pretty.sh" are still two separate scripts and called at different times. They also do something different. The former mangles the JSON to account for changes that are not stable (in the JSON data itself), while the latter only pretty prints it. - when generating a new .json-nft dump file, the file will be updated to use the new, prettified format, unless the file is in the old format and needs no update. This means, with DUMPGEN=y, old style is preserved unless an update becomes necessary. This requires "json-pretty.sh" having stable output, as those files are committed to git. This is probably fine. Signed-off-by: Thomas Haller <thaller@redhat.com> Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'tests/shell/testcases/cache/dumps')
0 files changed, 0 insertions, 0 deletions