-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added running end2end tests against mocked environments
Details: * Added a new target 'end2end_mocked' to the Makefile that runs the end2end tests against mock environments defined with a new HMC inventory file (mocked_inventory.yaml) and a new HMC vault file (mocked_vault.yaml). * Added the new make target to the GitHub Actions test workflow. * Added new mock files that define a mocked HMC for thee tests: * mocked_z14_classic.yaml - for an HMC managing a z14 in classic mode * mocked_z14_dpm.yaml - for an HMC managing a z14 in DPM mode * Enabled testing with mock support in the existing end2end testcases: * test_zhmc_partition.py * test_zhmc_user.py Signed-off-by: Andreas Maier <[email protected]>
- Loading branch information
1 parent
b0e4b9d
commit 4623c6a
Showing
8 changed files
with
1,251 additions
and
5 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,54 @@ | ||
--- | ||
# HMC inventory file with mocked HMCs for end2end tests run by GitHub Actions | ||
# | ||
# This file defines only mocked HMCs (using the zhmcclient mock | ||
# support) for the purpose of end2end tests against these HMCs. | ||
# The file must have the format defined in | ||
# zhmcclient/testutils/hmc_inventory_file.py of the python-zhmcclient project. | ||
# | ||
# HMC inventory files conform to the format of HMC inventory files in YAML | ||
# format and define specific additional variables for HMCs. | ||
# | ||
# Brief description of the HMC inventory file format: | ||
# | ||
# all: # the top-level HMC group | ||
# hosts: | ||
# <hmc_name>: # DNS hostname, IP address, or nickname of HMC | ||
# description: <string> | ||
# contact: <string> | ||
# access_via: <string> | ||
# ansible_host: <host> # if real HMC and nickname is used | ||
# mock_file: <path_name> # if mocked HMC | ||
# cpcs: | ||
# <cpc_name>: | ||
# <prop_name>: <prop_value> | ||
# <var_name>: <var_value> # additional variables for HMC | ||
# vars: | ||
# <var_name>: <var_value> # additional variables for all HMCs in group | ||
# children: | ||
# <group_name>: # a child HMC group | ||
# hosts: ... # variables are inherited from parent group | ||
# vars: ... | ||
# children: ... | ||
|
||
all: | ||
hosts: | ||
mocked_z14_classic: | ||
description: "Mocked z14 in classic mode" | ||
mock_file: "mocked_z14_classic.yaml" | ||
cpcs: | ||
CPC1: | ||
machine_type: "2964" | ||
dpm_enabled: false | ||
mocked_z14_dpm: | ||
description: "Mocked z14 in DPM mode" | ||
mock_file: "mocked_z14_dpm.yaml" | ||
cpcs: | ||
CPC1: | ||
machine_type: "3906" | ||
dpm_enabled: true | ||
children: | ||
default: | ||
hosts: | ||
mocked_z14_classic: | ||
mocked_z14_dpm: |
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,35 @@ | ||
--- | ||
# HMC vault file with mocked HMCs for end2end tests run by GitHub Actions | ||
# | ||
# This file defines the credentials for mocked HMCs for use by the | ||
# zhmcclient.testutils module of the python-zhmcclient project. | ||
# | ||
# The file must have the format defined in | ||
# zhmcclient/testutils/hmc_vault_file.py of the python-zhmcclient project. | ||
# | ||
# HMC vault files conform to the format of Ansible vault files in YAML | ||
# format and define specific variables for HMC authentication. | ||
# | ||
# Brief description of the file format: | ||
# | ||
# hmc_auth: | ||
# <hmc_name>: # DNS hostname, IP address, or nickname of HMC | ||
# userid: <userid> | ||
# password: <password> | ||
# verify: <verify> | ||
# ca_certs: <ca_certs> | ||
# <var_name>: <var_value> # allowed but ignored | ||
# | ||
# Notes for this example file: | ||
# * To use this example file, copy it to `~/.zhmc_vault.yaml` which is the | ||
# default path name used. | ||
|
||
hmc_auth: | ||
mocked_z14_classic: | ||
userid: ensadmin | ||
password: password | ||
verify: false | ||
mocked_z14_dpm: | ||
userid: ensadmin | ||
password: password | ||
verify: false |
Oops, something went wrong.