15 Commits
Author SHA1 Message Date
Patrick McCarty 0ca1975ed5 Convert all functional tests to the new interface
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>
2016-11-02 21:02:46 -07:00
Patrick McCarty 5cdad496c0 Fix functional tests for breaking changes
To two latest commits introduce breaking changes to the updater, so the
static server content needs to be refreshed.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2016-08-15 15:22:34 -07:00
Patrick McCarty 3e0fff6a47 Ignore signature verification errors in functional tests
Because signature verification is a feature that we need separate
testing for, and swupd's output may print a verification error (or not)
depending on how swupd was built, add a helper function to remove the
verification error message when swupd is built with verification
enabled. If verification is not enabled, swupd will not print any
message, and the function is a no-op.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2016-06-27 11:56:01 -07:00
Patrick McCarty a384265d88 Refactor test cases; update bundle manifest hashes
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>
2016-06-22 16:12:38 -07:00
Patrick McCarty a5632aba0d Fix tests for compatibility with latest GNU tar
The recent GNU tar release (1.29) is more strict with option parsing in
that positional options must come before the file list to add to the
archive.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2016-06-07 15:54:32 -07:00
William Douglas 080d805727 Allow bundle-add to fallback to full files
Instead of requiring a pack is used for bundle-add, allow the use of
verify_fix_path when staging fails to: download, verify and stage the
item using the full file.

Correct output of tests where the 'required' wording was removed.
2016-05-31 11:24:07 -07:00
William Douglas d593490621 Confirm verify_fix_path works with bundle-add
Validate that verify_fix_path will correctly handle missing directories
when running bundle-add.
2016-05-10 10:31:00 -07:00
William Douglas 33ecb6357f Rework file consolidation functionality
Add new function consolidate_files that replaces
consolidate_submanifests in order to remove the requirement of modifying
manifest components in place. This change enables creating seperate
consolidated file lists for bundle-add, one for new files to be
installed on the system and one for the currently installed bundles
files. Once these have been seperated out, only files requiring
installation can be processed by do_staging and the list of files
installed on the system can be used to run verify_fix_path.

This also modifies bundle-add to stop trying to create tracking
files which was impacting testing.
2016-05-10 10:31:00 -07:00
William Douglas a52eeb42cb Move functional tests to use the BATS framework 2016-04-26 22:15:04 +00:00
William Douglas 3d0c071e1a Reduce noise for updates and bundle-adds
Stop printing a message when bundles are included and going to be
installed or if bundles are already included and going to be skipped
when doing the add_subscriptions call.

Instead update the install_bundles call to notify users when an
installed bundle was attempted to be be installed again.
2016-04-12 11:03:47 -07:00
Patrick McCarty 5407e70e44 Use formatstaging for functional tests
Since a numeric format now requires a config file, and aligning the
client format with the test format is a maintenance problem, use the
"staging" format for all tests.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2016-04-04 11:42:25 -07:00
William Douglas 92211a6c7d Fix functional test manifest
The manifest references a file but was using the directory flag
incorrectly, fix.
2016-03-14 19:45:30 +00:00
William Douglas 7143aec578 Add bundle-add include support
Eventually manifests will be able to include other manifests and this
patchset adds support for adding those included manifests when running
bundle-add on the including manifest.
2016-03-11 23:36:13 +00:00
Patrick McCarty 97047688c3 Add functional tests for boot file handling fixes
The following tests are added here:

- Add a boot file via 'bundle-add' (failed before the previous commit).

- Remove a boot file via 'bundle-remove'.

- Add a boot file via 'update'.

- Detect a boot file hash mismatch via 'verify' (failed before the
  previous commit).

- Fix a boot file with incorrect hash via 'verify --fix' (failed before
  the previous commit).

- Ignore a boot file during 'verify --fix' if marked deleted (failed
  before the previous commit).

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2016-03-10 11:43:31 -08:00
Patrick McCarty c42f8a3aa1 Initial commit
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2016-02-24 09:34:13 -08:00