systemctl reports that the timer file is missing now as a return code
4 so update the unknown start number.
Also with this change SWUPD_NO is no longer always returned so add a
new helper to check if a status is one of multiple options.
Signed-off-by: William Douglas <william.douglas@intel.com>
Detect docker container usage when running test to handle cases where
systemd is unlikely to be running.
Signed-off-by: William Douglas <william.douglas@intel.com>
Instead of relying on a custom global_setup and global_teardown
functions, migrate to the use of bats' setup_file and teardown_file
functions.
Signed-off-by: William Douglas <william.douglas@intel.com>
Environment variables are used everywhere in testilb. This environment
variables are global variables that define the way testlib behaves.
However is was confusing to use the variables because they were
inconsistent between each other, for example some variables that define
paths would have absolute paths while other would have relative paths,
making it error prone while using them.
This commit makes the environment variables more consistent by following
a name convention for each type of variable, as an example, variables
that define absolute paths follow this convention ABS_<path_name>_DIR,
while variables that define relative paths are defined like this
<path_name>_DIR.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
"Swupd clean" removes cache from certain pre-defined directories. This
commit udpdates the locations where clean looks for cache so it includes
the new locations where the cache is stored.
Swupd will continue looking at old cache locations until the bump to
format 31.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
When swupd downloads manifests to the statedir they are downloaded in
directories that represent the version of clear that the manifests
belong to. However those version directories are stored in the statedir,
root directory. This commit moves them into their own "manifest"
directory so there is more consistency with the downloaded files.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
When swupd downloads manifests to the statedir they are downloaded in
directories that represent the version of clear that the manifests
belong to. However those version directories are stored in the statedir,
root directory. This commit moves them into their own "manifest"
directory so there is more consistency with the downloaded files.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
Implementing the --orphans option to remove bundles no longer required
by tracked bundles from 3rd-party repositories.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
This commit implements the --orphan flag for bundle-remove which can be
used to remove bundles that are no longer required by tracked bundles.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
Adding the --orphans flag to bundle-list which shows those bundles that
are installed ut no longer required by any tracked bundle.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
When using --quiet, there was no way of knowing if a file had been
successfully repaired or not. This commit fixes that.
Closes#1504
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
The tests in test/functional/api are going to validate the --quiet
output is rarely changed, therefore only expected output should be
validated and not warnings or error messages.
Closes#1502
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
For some tests is useful to have a minimal version of the os-core-update
bundle since some system files are tracked there.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
This commit provides a minimal output to be displayed when the --quiet
flag is used for these commands:
- swupd mirror
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
This commit provides a minimal output to be displayed when the --quiet
flag is used for these commands:
- swupd 3rd-party add
- swupd 3rd-party remove
- swupd 3rd-party list
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
This commit provides a minimal output to be displayed when the --quiet
flag is used for these commands:
- swupd hashdump
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
This commit provides a minimal output to be displayed when the --quiet
flag is used for these commands:
- swupd clean
- swupd 3rd-party clean
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
This commit provides a minimal output to be displayed when the --quiet
flag is used for these commands:
- swupd os-install
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
This commit provides a minimal output to be displayed when the --quiet
flag is used for these commands:
- swupd repair
- swupd 3rd-party repair
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
This commit provides a minimal output to be displayed when the --quiet
flag is used for these commands:
- swupd diagnose
- swupd 3rd-party diagnose
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
This commit provides a minimal output to be displayed when the --quiet
flag is used for these commands:
- swupd search-file
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
This commit provides a minimal output to be displayed when the --quiet
flag is used for these commands:
- swupd bundle-info
- swupd 3rd-party bundle-info
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
This commit provides a minimal output to be displayed when the --quiet
flag is used for these commands:
- swupd bundle-list
- swupd 3rd-party bundle-list
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
This commit provides a minimal output to be displayed when the --quiet
flag is used for these commands:
- swupd bundle-add
- swupd 3rd-party bundle-add
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
This commit provides a minimal output to be displayed when the --quiet
flag is used for these commands:
- swupd bundle-remove
- swupd 3rd-party bundle-remove
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
This commit provides a minimal output to be displayed when the --quiet
flag is used for these commands:
- swupd update
- swupd 3rd-party update
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
This commit provides a minimal output to be displayed when the --quiet
flag is used for these commands:
- swupd check-update
- swupd 3rd-party check-update
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
This commit provides a minimal output to be displayed when the --quiet
flag is used for this command:
- swupd autoupdate
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
This commit provides a minimal output to be displayed when the --quiet
flag is used for these commands:
- swupd info
- swupd 3rd-party info
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>