]> git.apps.os.sepia.ceph.com Git - fscrypt.git/commit
cli-tests: account for protojson whitespace randomization
authorEric Biggers <ebiggers@google.com>
Thu, 18 Aug 2022 05:15:52 +0000 (22:15 -0700)
committerEric Biggers <ebiggers@google.com>
Thu, 18 Aug 2022 06:10:56 +0000 (23:10 -0700)
commitafad6a1e0521e52dfaffe937ecab2515a76b8134
treebe8cf4ab980e46b18316eb5f90677926ea83bedb
parentf0c1cae003dd216ba706d7ef14df83d311c82034
cli-tests: account for protojson whitespace randomization

Annoyingly, for JSON formatting protojson randomly selects a spacing
method (one space or two spaces) depending on a hash of some sections of
the Go binary, to discourage depending on its output being stable.  This
breaks some checks in the CLI tests of the contents of fscrypt.conf and
the output of 'fscrypt status'.  As there doesn't appear to be a
straightforward alternative currently, for now just update the tests to
take into consideration the possible extra space.
cli-tests/run.sh
cli-tests/t_v1_policy.sh
cli-tests/t_v1_policy_fs_keyring.sh