The old hashdump tests used the swupdlib.bash library that was
replaced by testlib.bash.
This commit replaces those old hashdump tests with new versions
of the same tests that now use testlib.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
Adds status checks for each swupd command called in the functional
tests. At this point several of these tests fail due to some successful
commands returning error statuses.
Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
This commit adds "lines-checked" files for every test that checks
swupd-client output and removes the old bash-array-style checks from
the test scripts.
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
This commit expands the swupd BATS library to encapsulate more of the
boilerplate steps in the test cases.
Additionally, bundle manifest hashes needed updating now that swupd is
emitting warnings (and later on, errors). Better to be prepared for the
switch to errors on mismatches.
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
In a previous commit, the init_globals() call was removed from the
hashdump code, which resulted in path_prefix not being set in case the
--basepath option was not specified, and led to a NULL pointer
dereference.
Fix the issue by calling the new set_path_prefix() function. The NULL
value will honor the --basepath option if specified, or set the default
path_prefix.
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>