bottlerocket
bottlerocket copied to clipboard
testsys: Add declarative testing through `Test.toml`
Issue number:
Closes # N/A
Description of changes:
Enables configuring testing through Test.toml
. There are now 5 levels of configuration.
# The test configuration is broken up into different levels depending on the variant.
# Each configuration's value will be selected in the following order:
# Arguments from the command line
# Environment variables from the command line
# '{variant}' configuration in `Test.toml`
# '{family}-{flavor}' configuration in `Test.toml`
# '{family}' configuration in `Test.toml`
# '{platform}-{flavor}' configuration in `Test.toml`
# '{platform}' configuration in `Test.toml`
# TestSys default values
Testing done:
cargo make test
works as expected with configured values.
Terms of contribution:
By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.
^ Contains a large refactor of changes. Test.toml
schema has been significantly changed to allow a more concise config.
^ Fixes some rebasing issues and code cleanup.
^ Address comments
- Rework
config_keys
vec creation to be more idiomatic - Added comment to
config_keys
function - Removed commented
MigrationsConfig
-
merge
assign some variables before struct creation - 'uri' -> 'URI'
- Removed unnecessary x86_64 table from 'Test.toml.example'
- 'selected' -> 'precedence'
- Provided configuration precedence for
aws-k8s-1.23-nvidia
variant onx86_64
- Provided a sample
cluster-names
for ipv6 and ipv4 testing with a disclaimer that ipv6 cluster creation is not yet supported. - Changed
e2e-repo-registry
toconformance-registry
to make it more general. - Changed
kube-conformance-image
toconformance-image
to make it more general. - Reword cluster-names templated string comment.
- Comments for
unwrap()
's - Convert
cluster_name
to be&str
to reduce cloning - Added
debug
log if no cluster templates were provided - Fixed inconsistencies with in user values
Still need to support multiple clusters with ecs.
^ Enables ecs testing on multiple clusters and fixes an error in TestsysImages::new()
Tested with cargo make -e BUILDSYS_VARIANT=aws-ecs-1 test
with the following configuration.
[test]
repo="default"
[aws-ecs]
cluster-names = ["{{arch}}-{{variant}}", "{{arch}}-{{variant}}-dup"]
^ Resolve merge conflict.
^ Add small example config snippet to TESTING.md
for instance type configuration.
^ Update Test.toml.example
's aws-k8s-1.23-nvidia
hierarchy example to also show what configuration level is being represented.
^ Fixed 2 outdated comments related to testing on multiple ECS clusters.
^
- Adds
instance-types
to example config file - Fixed typos in lib.rs
- Remove lock support for
Test.toml
- Replace
unwrap
s withexpect
^ Change generic S1
to S
.
^ Fix cargo fmt
^ rebase to develop to fix merge conflict
Does testsys.kubeconfig.eksctl.lock
need to be deleted and .gitignored?
^
- Added
testsys.kubeconfig.eksctl.lock
to.gitignore
- Change comment for
kube_conformance_image
- Convert
.as_ref().cloned()
toto_owned()
- Reworded precedence comment in
Test.toml.example
- Added a note describing architecture configuration in
Test.toml.example
- Removed
arguments from command line
from precedence lists and added a not about them instead. - Changed
Configurable fields
toConfigurable values
- Added doc comment for
reduced_config
function - Added comments documenting the transformations occurring in
reduced_config
- Added doc comment for
GenericConfig
andGenericVariantConfig
^
- Remove
eksctl.lock
from history - Updated
TESTING.md
with comments - Added warning for use of default
Test.toml
- Used the proposed
Test.toml.example
- Replaced
unwrap()
withexpect()