Commit Graph
26 Commits
Author SHA1 Message Date
Otavio Pontes 2bf4169a4a Don't mix tabs with spaces in the same file
And prefer tabs over spaces, because that's the project standard for
source files

Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-10-29 11:54:25 -07:00
Otavio Pontes a70a3eed60 test: Change the prefix of real content tests
Now 3 characters are enforced on test prefix, so renaming the real content
tests to RCT

Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-09-18 09:14:21 -07:00
Otavio Pontes 7f37684920 test: Always run real content tests with --no-progress
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-08-14 12:29:32 -07:00
Otavio Pontes 74dd1686ad test: Don't check the hashes twice on real tests
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>
2019-08-07 15:51:10 -07:00
Otavio Pontes 45762e7eab real_content: Properly remove the cache directory used by the test
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-08-02 12:38:52 -07:00
Otavio Pontes f94d13a122 real_tests: repair doesn't support -B anymore, so use verify --fix
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-08-01 13:36:47 -07:00
Otavio Pontes a7807abcf7 test: support DEBUG_TEST flag
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-07-24 15:49:47 -07:00
Otavio Pontes 8a2b2e200e test: Print extra information
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-07-24 15:49:47 -07:00
Otavio Pontes 2ce9e9eace test: Use the lastest_version file to get last format
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-07-24 15:49:47 -07:00
Otavio Pontes db7b1e4b9e test: Removing test because coverage is in all other tests
We now use os-install to install bundles, so this test is already covered.

Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-07-24 15:49:47 -07:00
Otavio Pontes 99b6f8fd2c test: Improve fullfile tests by using only repair
We don't need to update to test the fullfile downloader.
Just a repair

Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-07-24 15:49:47 -07:00
Otavio Pontes 54aa2a72b1 real_content: Use os-install instead of bundle add to install bundles
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-07-24 15:49:47 -07:00
Otavio Pontes e2629167b6 real_content: Fix old TODO that was depending on a bug fix
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-07-24 15:49:47 -07:00
Otavio Pontes 8a20146460 test: Fix the destination of real_content tests
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-07-24 15:49:47 -07:00
Otavio Pontes e06c7e8628 test: Fix space that was removed by accident in previous commit
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-05-28 20:07:41 -07:00
Castulo Martinez 2cb0dd80b4 Renaming "swupd verify" to "swupd diagnose"
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>
2019-05-14 15:51:28 -07:00
Otavio Pontes 6d52b7594d verify: Use a different exit code when system is not correct
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>
2019-03-27 16:47:36 -07:00
Otavio Pontes 4f99f1e2bc real_content: Check if bundle-list function is working before using the result
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>
2018-12-07 13:11:47 -08:00
Otavio Pontes 78df491bd4 test: Let users to set up the directory where real tests are going to run
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2018-12-07 13:11:47 -08:00
Otavio Pontes cc71a907d9 test_real: Skip disk space check
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>
2018-12-07 13:11:47 -08:00
Otavio Pontes 3e36d062ea test: Always print tile log on real content tests
Add the -t option

Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2018-12-07 13:11:47 -08:00
Otavio Pontes c9ddca72a0 test_real: Add test to check if verify --install is working
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2018-12-07 13:11:47 -08:00
Otavio Pontes 509961d34d test_real: Use print instead of echo
Prints are always printed by bats. Echos are printed only on errors

Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2018-12-07 13:11:47 -08:00
Otavio Pontes 4d68e878a9 test: Split real content test in multiple tests to run them in parallel
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2018-12-07 13:11:47 -08:00
Castulo Martinez 629b2fe9e2 Move the MoM from bundles dir to /var/tmp/swupd
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>
2018-11-26 14:16:00 -08:00
Otavio Pontes f178aa6e99 test: Check if swupd is able to perform updates in last releases
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>
2018-11-01 10:00:59 -07:00