65 Commits
Author SHA1 Message Date
Brett T. Warden a0fef5fe53 Increase space allocations in baseline image test
Double /boot to 100M and rootfs to 4G so today's content will fit.
2024-06-25 12:00:17 -07:00
Mark D Horn 86128e62b0 test: add functional lvm test
Add a new test for LVM via advanced method.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2020-06-24 09:08:59 -07:00
Mark D Horn bbce2bcd31 tests: Add new source for testing checksum
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>
2020-05-28 21:37:31 -07:00
Mark D Horn 6e576e12ea model: Change ister Version to new type UintString
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>
2020-05-21 16:43:35 -07:00
Mark D Horn 4b9b5fc899 utils: Add new conversion function for Version
Also add new tests to increase coverage for utils.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2020-05-21 16:43:35 -07:00
Mark D Horn 5cbae184fe Add new test target for JSON to YAML
Add new target for testing the conversion of sample JSON
configuration files (ister) to the YAML.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2020-05-21 11:08:32 -07:00
Mark D Horn 77f7194b39 tests: Fix YAML test files
Syntax error for the chroot post hook.

Update baseline to be in-sync with current production.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2020-05-08 15:03:31 -07:00
Mark D Horn db4749a388 boolset: Add new type boolean set type
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>
2020-05-07 17:04:00 -07:00
Karthik Prabhu Vinod 914b97a77d storage: destructive tests
Signed-off-by: Karthik Prabhu Vinod <karthik.prabhu.vinod@intel.com>
2020-05-07 15:00:51 -07:00
Karthik Prabhu Vinod d3afe90999 testing: Add functional testing
Fixes Issue: #710

Add BATS functinal testing framework & a Add a basic test

Signed-off-by: Karthik Prabhu Vinod <karthik.prabhu.vinod@intel.com>
2020-05-01 16:04:21 -07:00
Mark D Horn a973a4fa4b tests: Fix bug with passing the URL
Added debug hook for no cleanup on success

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2020-04-10 11:58:14 -07:00
Mark D Horn a1f4dd8299 tests: Enable use of mirror URL for image testing
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2020-04-08 14:00:27 -07:00
Karthik Prabhu Vinod d67c1ab57c Refactor storage code
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>
2020-03-31 18:30:45 -07:00
Mark D Horn 646db5ab0f tests: Add new test to build all DevOps Images
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>
2020-03-30 13:07:39 -07:00
Mark D Horn be9d9bc64e Update partitioning support in legacy mode
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>
2020-03-27 15:07:10 -07:00
Mark D Horn 264aced1c9 storage: lower coverage during refactor
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2020-03-24 15:16:21 -07:00
Karthik Prabhu Vinod 7e13d082a3 updated code coverage
Signed-off-by: Karthik Prabhu Vinod <karthik.prabhu.vinod@intel.com>
2020-03-13 01:10:05 +00:00
Mark D Horn 7e277776a9 controller: Add post-image YAML hook
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.
2020-02-27 15:00:31 -08:00
ZVNexus 6272de6a21 Initial F2FS support for CLR Installer.
Signed-off-by: Alexander Koskovich <zvnexus@outlook.com>
2020-02-27 11:03:25 -08:00
Alexander Koskovich d3cdbc25a1 Typo in YAML scripts
Also capitalize/end with period.
2020-02-12 18:55:13 -08:00
Mark D Horn f65cd665ba ISO: Add metadata to ISO images
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>
2020-02-05 16:51:06 -08:00
Mark D Horn 767ffb8040 Fix test case variable case
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-12-11 12:55:19 -08:00
Mark D Horn b9970047f9 Allow skipping swupd configuration file copy
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>
2019-12-11 10:47:05 -08:00
Mark D Horn 2afeff5721 model: Warning on extra kernels for json to yaml
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>
2019-11-19 18:18:05 -08:00
Mark D Horn b80f568c70 args: Drop auto test coverage
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>
2019-11-06 13:09:44 -08:00
Mark D Horn 137ad30917 test: Add new image generation test
This is a baseline test to know we can install to an image.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-10-30 11:05:23 -06:00
Mark D Horn e4f9e947b4 utils: Add new tests to coverage
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-10-11 14:06:01 -07:00
John Akre 3aeef56341 test: reduced args coverage
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>
2019-09-23 16:08:10 -07:00
Mark D Horn a34f01c7d0 test: reduced storage coverage
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>
2019-09-12 19:20:47 -07:00
Mark D Horn a2216162f0 test: Add model test for new code
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>
2019-09-12 19:20:47 -07:00
Mark D Horn e99fc7a80f tests: telemetrics update for release 2.2.0
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>
2019-07-15 13:53:11 -07:00
Mark D Horn 14dc9c080a tests: Update coverage numbers
Add new files and bring baseline up to current values.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-05-29 18:11:52 -07:00
Mark D Horn dedda923e7 tests: update coverage for replacement encryption
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-05-08 13:31:49 -07:00
Mark D Horn 1bfa2cbe8a swupd: Filter bundles which will be installed
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>
2019-04-29 18:18:33 -07:00
Mark D Horn efc7335fbc coverage: reduce required swupd coverage
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>
2019-04-26 17:47:54 -07:00
Brian J Lovin 9c7820f3c3 swupd: Add verifyOnly flag to swupd.Verify()
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>
2019-04-19 15:06:47 -07:00
Mark D Horn 3945c9aeb2 network: Add support for Network Manager
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>
2019-04-19 10:57:15 -07:00
Reagan Lopez f61d7092ab Add support for ister json config
- 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>
2019-03-05 13:55:44 -08:00
Mark D Horn 6a27623a82 New telemetry defaults
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>
2019-03-04 14:28:41 -08:00
Mark D Horn e5e6aa2b71 Lower coverage for model
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>
2019-01-28 18:40:46 -08:00
Mark D Horn 17894ff6e0 Add date/time stamp to configuration file
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2018-12-07 22:24:58 -08:00
Mark D Horn 037d4991ef Improve Test Coverage for new features
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2018-11-29 12:35:26 -08:00
Mark D Horn 64451ee854 Check for root early
Change the timing where we check for the root user.

Fixes: 171

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2018-11-28 19:38:06 -08:00
Mark D Horn 0d59e8c105 Dump contents of coverage file on fail
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>
2018-11-09 09:43:18 -08:00
Mark D Horn c7c13a14fb Drop model coverage target
We added new checks to the main install flow which does not
have test coverage.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2018-10-23 10:03:34 -07:00
Leandro Dorileo 281a3bd923 check-coverage: print all decreased coverage
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>
2018-10-17 16:11:24 -07:00
Leandro Dorileo 82beb2e89b user: add ssh-keys configuration
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>
2018-10-17 12:36:56 -07:00
Leandro Dorileo 557a637749 check-coverage: improve error handling and notification
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>
2018-10-16 14:16:46 -07:00
Leandro Dorileo 4a538fc6e8 updated code coverage
Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
2018-10-09 16:46:40 -07:00
Leandro Dorileo d9d8e10566 model: add test for mixed block devices config
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>
2018-10-09 16:46:40 -07:00