-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CRAYSAT-1938 sat bootprep tests (#662)
CRAYSAT-1938: Add first `sat bootprep` test Co-authored-by: Ryan Haasken <[email protected]>
- Loading branch information
1 parent
dc522cd
commit 9c2a83b
Showing
16 changed files
with
827 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# | ||
# MIT License | ||
# | ||
# (C) Copyright 2025 Hewlett Packard Enterprise Development LP | ||
# | ||
# Permission is hereby granted, free of charge, to any person obtaining a | ||
# copy of this software and associated documentation files (the "Software"), | ||
# to deal in the Software without restriction, including without limitation | ||
# the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
# and/or sell copies of the Software, and to permit persons to whom the | ||
# Software is furnished to do so, subject to the following conditions: | ||
# | ||
# The above copyright notice and this permission notice shall be included | ||
# in all copies or substantial portions of the Software. | ||
# | ||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
# OTHER DEALINGS IN THE SOFTWARE. | ||
# | ||
|
||
{{ $scripts := .Env.GOSS_BASE | printf "%s/scripts" }} | ||
{{ $logrun := $scripts | printf "%s/log_run.sh" }} | ||
{{ $sat_test := $scripts | printf "%s/python/sat_functional" }} | ||
command: | ||
{{ $test_label := "sat_bootprep_configs" }} | ||
{{$test_label}}: | ||
title: Test the 'sat bootprep run' command to create CFS configurations | ||
meta: | ||
desc: Tests that the 'sat bootprep run' command creates CFS configurations | ||
sev: 0 | ||
exec: |- | ||
"{{$logrun}}" -l "{{$test_label}}" \ | ||
"{{$sat_test}}" "bootprep.test_bootprep.TestBootprepCreateConfigs" | ||
exit-status: 0 | ||
stderr: | ||
- OK | ||
timeout: 800000 # timeout in milliseconds |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
43 changes: 43 additions & 0 deletions
43
src/csm_testing/tests/sat_functional/bootprep/data/additional-inventory-config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
# Define a configuration that specifies additional_inventory | ||
configurations: | ||
|
||
# A configuration that specifies additional_inventory with a branch | ||
- name: "{{test.prefix}}-csm-additional-inventory-branch" | ||
layers: | ||
- name: csm-ncn_nodes | ||
playbook: ncn_nodes.yml | ||
product: | ||
name: csm | ||
version: "{{csm.version}}" | ||
- name: csm-ncn-initrd | ||
playbook: ncn-initrd.yml | ||
product: | ||
name: csm | ||
branch: "{{csm.branch_name}}" | ||
additional_inventory: | ||
name: csm-additional-inventory | ||
# Note that the CSM product's VCS repo does not really contain additional inventory, | ||
# but it is sufficient to test creation of a configuration additional inventory. | ||
url: "https://api-gw-service-nmn.local/vcs/cray/csm-config-management.git" | ||
branch: "{{csm.branch_name}}" | ||
|
||
# A configuration that specifies additional_inventory with a commit hash | ||
- name: "{{test.prefix}}-csm-additional-inventory-commit" | ||
layers: | ||
- name: csm-ncn_nodes | ||
playbook: ncn_nodes.yml | ||
product: | ||
name: csm | ||
version: "{{csm.version}}" | ||
- name: csm-ncn-initrd | ||
playbook: ncn-initrd.yml | ||
product: | ||
name: csm | ||
branch: "{{csm.branch_name}}" | ||
additional_inventory: | ||
name: csm-additional-inventory | ||
# Note that the CSM product's VCS repo does not really contain additional inventory, | ||
# but it is sufficient to test creation of a configuration additional inventory. | ||
url: "https://api-gw-service-nmn.local/vcs/cray/csm-config-management.git" | ||
commit: "{{csm.commit_hash}}" |
39 changes: 39 additions & 0 deletions
39
src/csm_testing/tests/sat_functional/bootprep/data/git-layers-config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
# Define various configurations that define layers in terms of a git clone URL | ||
configurations: | ||
|
||
# A configuration that speicfies a layer from a git clone URL and a commit | ||
- name: "{{test.prefix}}-csm-git-commit-layer" | ||
layers: | ||
- name: csm-packages | ||
playbook: csm_packages.yml | ||
git: | ||
url: "https://api-gw-service-nmn.local/vcs/cray/csm-config-management.git" | ||
commit: "{{csm.commit_hash}}" | ||
|
||
# A configuration that speicfies a layer from a git clone URL and a branch | ||
- name: "{{test.prefix}}-csm-git-branch-layer" | ||
layers: | ||
- name: csm-packages | ||
playbook: csm_packages.yml | ||
git: | ||
url: "https://api-gw-service-nmn.local/vcs/cray/csm-config-management.git" | ||
# master is the default branch of the repo and does not contain any content, | ||
# but this is just a test that specifying a branch does work | ||
branch: "{{csm.branch_name}}" | ||
|
||
# A configuration that specifies two layers with git clone URLs | ||
- name: "{{test.prefix}}-csm-two-git-layers" | ||
layers: | ||
- name: csm-ncn_nodes | ||
playbook: ncn_nodes.yml | ||
git: | ||
url: "https://api-gw-service-nmn.local/vcs/cray/csm-config-management.git" | ||
commit: "{{csm.commit_hash}}" | ||
- name: csm-ncn-initrd | ||
playbook: ncn-initrd.yml | ||
git: | ||
url: "https://api-gw-service-nmn.local/vcs/cray/csm-config-management.git" | ||
# master is the default branch of the repo and does not contain any content, | ||
# but this is just a test that specifying a branch does work | ||
branch: "{{csm.branch_name}}" |
28 changes: 28 additions & 0 deletions
28
src/csm_testing/tests/sat_functional/bootprep/data/image-customization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
# Define a configuration to use in image customization | ||
configurations: | ||
|
||
# A simple configuration that has just one layer that runs a simple playbook | ||
- name: "{{test.prefix}}-simple-passing-configuration" | ||
layers: | ||
- name: successful-layer | ||
playbook: test.yml | ||
git: | ||
# The url does not currently support templating, so this doesn't work yet | ||
url: "https://api-gw-service-nmn.local/vcs/cray/{{test.vcs_repo_name}}.git" | ||
branch: "main" | ||
|
||
images: | ||
- name: "{{test.prefix}}-simple-customized-image" | ||
base: | ||
product: | ||
name: csm | ||
version: "{{csm.version}}" | ||
type: image | ||
filter: | ||
arch: x86_64 | ||
wildcard: "*barebones*" | ||
configuration: "{{test.prefix}}-simple-passing-configuration" | ||
configuration_group_names: | ||
- Compute | ||
|
27 changes: 27 additions & 0 deletions
27
src/csm_testing/tests/sat_functional/bootprep/data/ims-image-session-template.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
# Define a session template that references an existing IMS image | ||
configurations: | ||
# A simple configuration that has just one layer that runs a simple playbook | ||
- name: "{{test.prefix}}-simple-passing-configuration" | ||
layers: | ||
- name: successful-layer | ||
playbook: test.yml | ||
git: | ||
url: "https://api-gw-service-nmn.local/vcs/cray/{{test.vcs_repo_name}}.git" | ||
branch: "main" | ||
|
||
session_templates: | ||
- name: "{{test.prefix}}-simple-session-template" | ||
image: | ||
ims: | ||
id: "{{csm.image_id}}" | ||
configuration: "{{test.prefix}}-simple-passing-configuration" | ||
bos_parameters: | ||
boot_sets: | ||
compute: | ||
arch: X86 | ||
kernel_parameters: "spire_join_token=${SPIRE_JOIN_TOKEN}" | ||
node_roles_groups: | ||
- Compute | ||
rootfs_provider: "sbps" | ||
rootfs_provider_passthrough: "sbps:v1:iqn.2023-06.csm.iscsi:_sbps-hsn._tcp.{{default.system_name}}.{{default.site_domain}}:300" |
11 changes: 11 additions & 0 deletions
11
src/csm_testing/tests/sat_functional/bootprep/data/missing-playbook-config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
# Define a configuration that has a layer without a playbook | ||
# This should be allowed when using `--cfs-version v2` but not when using | ||
# `--cfs-version v3`. | ||
configurations: | ||
- name: "{{test.prefix}}-csm-{{csm.version}}-product-layer" | ||
layers: | ||
- name: csm-packages-{{csm.version}} | ||
product: | ||
name: csm | ||
version: "{{csm.version}}" |
25 changes: 25 additions & 0 deletions
25
src/csm_testing/tests/sat_functional/bootprep/data/no-configs.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# | ||
# MIT License | ||
# | ||
# (C) Copyright 2025 Hewlett Packard Enterprise Development LP | ||
# | ||
# Permission is hereby granted, free of charge, to any person obtaining a | ||
# copy of this software and associated documentation files (the "Software"), | ||
# to deal in the Software without restriction, including without limitation | ||
# the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
# and/or sell copies of the Software, and to permit persons to whom the | ||
# Software is furnished to do so, subject to the following conditions: | ||
# | ||
# The above copyright notice and this permission notice shall be included | ||
# in all copies or substantial portions of the Software. | ||
# | ||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
# OTHER DEALINGS IN THE SOFTWARE. | ||
# | ||
--- | ||
configurations: [] |
27 changes: 27 additions & 0 deletions
27
src/csm_testing/tests/sat_functional/bootprep/data/no-layers-config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# | ||
# MIT License | ||
# | ||
# (C) Copyright 2025 Hewlett Packard Enterprise Development LP | ||
# | ||
# Permission is hereby granted, free of charge, to any person obtaining a | ||
# copy of this software and associated documentation files (the "Software"), | ||
# to deal in the Software without restriction, including without limitation | ||
# the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
# and/or sell copies of the Software, and to permit persons to whom the | ||
# Software is furnished to do so, subject to the following conditions: | ||
# | ||
# The above copyright notice and this permission notice shall be included | ||
# in all copies or substantial portions of the Software. | ||
# | ||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
# OTHER DEALINGS IN THE SOFTWARE. | ||
# | ||
--- | ||
configurations: | ||
- name: "{{test.prefix}}-no-layers" | ||
layers: [] |
56 changes: 56 additions & 0 deletions
56
src/csm_testing/tests/sat_functional/bootprep/data/product-layers-config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
--- | ||
# Define various configurations that define layers in terms of a product | ||
configurations: | ||
|
||
# A configuration that specifies a layer from a specific CSM version | ||
- name: "{{test.prefix}}-csm-{{csm.version}}-product-layer" | ||
layers: | ||
- name: csm-packages-{{csm.version}} | ||
playbook: csm_packages.yml | ||
product: | ||
name: csm | ||
version: "{{csm.version}}" | ||
|
||
# A configuration that specifies a layer from the latest CSM version | ||
- name: "{{test.prefix}}-csm-latest-product-layer" | ||
layers: | ||
- name: csm-packages-{{csm.version}} | ||
playbook: csm_packages.yml | ||
product: | ||
name: csm | ||
version: latest | ||
|
||
# A configuration that specifies a layer from the CSM product with a specific commit | ||
- name: "{{test.prefix}}-csm-product-layer-commit" | ||
layers: | ||
- name: csm-packages-{{csm.version}} | ||
playbook: csm_packages.yml | ||
product: | ||
name: csm | ||
commit: "{{csm.commit_hash}}" | ||
|
||
# A configuration that specifies a layer from the CSM product with a specific branch | ||
- name: "{{test.prefix}}-csm-product-layer-branch" | ||
layers: | ||
- name: csm-packages-{{csm.version}} | ||
playbook: csm_packages.yml | ||
product: | ||
name: csm | ||
# master is the default branch of the repo and does not contain any content, | ||
# but this is just a test that specifying a branch does work | ||
branch: "{{csm.branch_name}}" | ||
|
||
# A configuration that specifies two product-based layers | ||
- name: "{{test.prefix}}-csm-two-product-layers" | ||
layers: | ||
- name: csm-ncn_nodes | ||
playbook: ncn_nodes.yml | ||
product: | ||
name: csm | ||
version: "{{csm.version}}" | ||
- name: csm-ncn-initrd | ||
playbook: ncn-initrd.yml | ||
product: | ||
name: csm | ||
branch: "{{csm.branch_name}}" | ||
|
22 changes: 22 additions & 0 deletions
22
src/csm_testing/tests/sat_functional/bootprep/data/special-parameters-config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
# Define a configuration that specifies special_parameters in its layers | ||
configurations: | ||
|
||
# A configuration that specifies two layers, each with special parameters | ||
- name: "{{test.prefix}}-csm-special-parameters-layers" | ||
layers: | ||
- name: csm-ncn_nodes | ||
playbook: ncn_nodes.yml | ||
product: | ||
name: csm | ||
version: "{{csm.version}}" | ||
special_parameters: | ||
ims_require_dkms: False | ||
- name: csm-ncn-initrd | ||
playbook: ncn-initrd.yml | ||
product: | ||
name: csm | ||
branch: "{{csm.branch_name}}" | ||
special_parameters: | ||
ims_require_dkms: True | ||
|
Oops, something went wrong.