Diagnose picky behavior has changed so now we can use just one call
to swupd to verify if there's no extra file and no corruption.
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
This commit renames the "verify" command to "diagnose" to make it
more straightforward for the user to understand the purpose of the
command.
Closes#918
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
When using verify to check if the system is sane we should return a
non zero exit code if the system is invalid. And when repairing
(fix or install) we need to use a non zero exit code if some files
are still incorrect after verify has finished.
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
Check if the list returned by bundle-list is consistent with the bundle list in server
to make sure we aren't trying to bundle-add an invalid list of packages
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
Removing disk space check because tests aren't critical and we can run them
on machines tight on disk.
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
swupd copies the latest MoM to /usr/share/clear/bundles/.MoM so we
can use it for bash completion. The problem is that this directory
is tracked by clearlinux and because of that "swupd verify --picky"
will list this file as an extra file. And "swupd verify --fix --picky"
will remove that file.
This commit fixes the issue by changing the location where the .MoM
is copied to being this an untracked location, so the file won't be
removed.
Closes#632
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
Tests added:
- Check if bundle-list --all is working (because this affect the next tests)
- Check if we can install an old version of clear and update interactively
until last release
- Check if we can install and old version and update to the most recent one
As this test takes a really long time to run, I'm not adding it to the
tests list to be executed to make check, but this can be used to validate
swupd before a release.
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>