Created a new test program which will damage an ISO image
file to ensure that checksum validation is working properly.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
As of go 1.14 JSON decoder no longer accepts invalid numbers.
https://golang.org/doc/go1.14#encoding/json
Switch Version to a new type and add Unmarshaler to handle the
type which allows unsigned integer or 'latest' as valid values.
Dropped required coverage by 1% for model.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
This is useful for booleans which default to true.
Primarily needed for YAML files with booleans we
wish to default to true.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
a.) Break storage code into smaller readable units with each structure
and operations around it in the same file
b.) Remove commented code
c.) Rename storage.go, storage.go to
block_devices.go
block_devices_ops.go respectively
d.) Remove unused function FreeSpace
Signed-off-by: Karthik Prabhu Vinod <karthik.prabhu.vinod@intel.com>
This is a good regression test to ensure that all of the previously
released DevOps images will still build correctly with the latest
clr-installer code.
Two new make targets.
check-all-images:
Run a long time as each is built in parallel
check-all-images-screen:
Run all the image builds using screen which can
be detached and allowed to run in the background.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Fixes: #517
Enable the possibility of no /boot partition in legacy mode.
- add warning if no /boot and legacy
Warn the user that installing in legacy mode without a /boot
partition means the install will never boot in UEFI mode.
- Force off 64bit mode
When an ext file system is used for the /boot content
(no /boot partition, and booting legacy mode) we need to
disable 64bit flag or the image file system not boot.
https://wiki.syslinux.org/wiki/index.php?title=Filesystem#ext
- Blocked use of XFS due to partition table requirement to use MBR.
- Do not allow encryption of / w/o /boot
Refactor validation code for reuse by both standard and advanced
disk partitioning. Add new standard Desktop and Server wrapper
functions.
Move validation to common function, remove from Find Targets, and
remove redundant validation function.
Enable the skip size for advanced partitions.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Fixes: #531
Add new hook to be called after image generation is completed.
Update base image test to use post-image hook
This is useful for image manipulation such as compression, format
modification, etc.
Add the publisher and the application/image type to the ISO.
- ApplicationId set to 'server' by default, 'desktop' if any
bundles are included which contain the name 'desktop.
- ApplicationId can be overridden via the YAML file
- Publisher only set if included in YAML file
Add new test coverage.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Fixes: #600
Only copy the swupd configuration files from the host to the target
by default when running the interactive installer (gui or tui).
Otherwise, observe the setting from the configuration YAML or the
command line (highest) argument.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
When converting an ister JSON configuration file to a
clr-installer YAML configuration file, we want to ensure
a single kernel is set. Additional kernel result in a
warning as ISO mainly due to ISO generation limitation
in the code.
Add new coverage test for multiple kernels.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Much of the new networking retry code is difficult to
test/emulate in a test environment -- as such, reducing requirement.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
The Offline and OfflineSet fields were added to args, but test coverage
only exists for Offline. Typically fields like OfflineSet are untested,
so reducing the coverage.
Signed-off-by: John Akre <john.w.akre@intel.com>
We've added new functionality to storage which is only
exercised on media when running as root, so dropping
the basic coverage value for storage.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
No easy way to test all of the error conditions of
Marshaling and Unmarshaling, so dropping the coverage by 1%
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
New version of telemetrics-client now has built-in defaults for all
values and the released configuration file is now all comments as
a template. Updating to new configuration file release for checks.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Remove any bundles the installer will always install from
the list of optional bundles selectable by the user.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
We added the new function to speed up the builds, but
didn't EOL the old code yet. Need to reduce coverage
for now, but we should do a code clean-up and update
coverage later this quarter.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
When building an initrd it's convenient to only install the 'os-core'
bundle, because any extra bundles are not required and bloat
intird.
This commit adds an option to only run the 'verify' command and not
install the extra bundles listed as 'core-bundles'.
Approved to reduce coverage for swupd library.
Signed-off-by: Brian J Lovin <brian.j.lovin@intel.com>
Now check for which service is handling wired network interfaces.
Needed by the TUI which still handles static IP configurations for
wired connections.
TODO: Once NetworkManager is the new OS default, we can explore
configuring wireless interfaces via the TUI as well.
TODO: Consider change the other systemctl calls to use new dbus.
Dropping coverage requirement for this build
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
- The new -j flag detects ister json config format and converts it to yaml
- The existing -c flag also detects ister json config format, converts it to yaml
and continues as usual
- Handles the ister "rest" option for physical targets
- Handles multiple targets
Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>
Update the latest release telemetry configuration file
and update the post install hook with the new default
and new maximum.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
We add an if statement to the model for the VirtualBox change
which is slightly lowering the coverage number. We won't be
able to add a VB test case, so lowering the default coverage.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Sometimes we get coverage reported as an empty string.
This can happen if there is a run time error during execution.
Now dump the contents of the newly generated coverage file
if there is a decrease.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
With this change we check all the tests decreased and print them
all instead of printing the first and exiting.
Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
Add the user's ssh-keys configuration support as well as the required
bits to creathe the authorized_keys file.
Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
One of the steps check-coverage does is running "make check" and
writing it to a temporary file. This patch improves this step by
detecting the failure and better notifying the user it has failed,
also we show the result to the user if that's the case. Also remove
the left over temporary file case it fails.
Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
A alias can be used for a single partition only, this test makes
sure we test the case.
Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>