Skip to content

test(orchestrator): update verification library and unit tests - #5495

Open
balajikumaran-c-s wants to merge 1 commit into
dell:pub/rhel10.2from
balajikumaran-c-s:orch-test-split-1
Open

balajikumaran-c-s wants to merge 1 commit into
dell:pub/rhel10.2from
balajikumaran-c-s:orch-test-split-1

Conversation

@balajikumaran-c-s

@balajikumaran-c-s balajikumaran-c-s commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

PR Title

test(orchestrator): update verification library and unit tests

Description of the Solution

This is part 1 of 3 of the Orchestrator test automation update. It updates the shared layer the lifecycle suites build on: omnia_auto skip reporting, the test case registry and order blocks, the verification library (local etcd, reboot recovery, OIM negative inputs, LDAP identity gating, safe node removal), and their unit tests. No FVT/NFT test file changes in this PR, so the existing suites keep running unchanged.

Related Issue

Merge order: this PR, then part 2 (#5496), then part 3 (#5497).

Changes

omnia_auto reporting (test/plugins)

  • add_session_result takes an optional reason, and skip reasons are listed under the summary table. Other domains do not pass it, so their output is unchanged.
  • Removed the expected/unexpected/framework skip classification from the JSON and HTML reports; rebuilt omnia_auto-1.0.0-py3-none-any.whl.

Test case registry (test/orchestrator/library/vars)

  • TEST_ORDER_BLOCKS and ORDER_BLOCK_SIZE define one 100-number order block per suite, with lifecycle bases 10000 apart.
  • Added the OIM negative cases (ORCH_FVT_PRECHECK_V110-V117) and the local etcd media case (ORCH_FVT_PXEBOOT_V523); renumbered the duplicate IDs (V519-V522, V225-V227) and registered the external LDAP cases under pxeboot (V524, V525).
  • OIM_NEGATIVE_INPUTS holds the invalid inputs for the negative precheck cases; PXEBOOT_COMMANDS gains ssh_remove_host_key.

Verification library (test/orchestrator/library/functions)

  • Kubernetes: local etcd media check and control-plane reboot recovery that waits for etcd health and confirms the fstab update ran, disk setup did not rerun, and the UUID is kept.
  • OIM readiness: check_oim_pxe_nic_present and check_oim_ssh_preflight accept an override for negative cases (keyword-only, default unchanged); added check_oim_forced_pxe_public_overlap.
  • LDAP: ldap_identity_skip skips LDAP identity checks when validate_external_ldap is false.
  • Slurm lifecycle: heredoc writes always end with a newline so OMNIA_EOF cannot enter the PXE mapping; node removal skips when the mapping has fewer than two slurm_node entries and discards a stale backup.
  • Recovery helpers check the reboot authorization instead of disruptive; the Slurm drain check no longer gates itself, so its marker decides when it runs.
  • Fixed the Slurm drain-state command template, whose unescaped sinfo %T broke string formatting.
  • Host-key cleanup runs ssh-keygen through run_on_host; polling and cleanup messages use omnia_auto.log instead of print.
  • Removed unused imports left by an earlier merge.

Unit tests (test/orchestrator/ut)

  • New test_kubernetes_etcd_contracts.py; added ORCH_UT_090-ORCH_UT_094 (heredoc write, two-node removal minimum, stale-backup cleanup, host-key runner, progress logging).

Documentation (docs/code-style, test/orchestrator/docs)

  • Test automation standard: tag folders, test_playbook.py, naming, credential scope, README, UT, and omnia_auto rules.
  • test_config.md documents the new expected_etcd_disk_media setting.

Files Changed

File Change Type Description
docs/code-style/test_automation.md Modified Test automation standard rules
test/orchestrator/docs/test_config.md Modified expected_etcd_disk_media setting
test/orchestrator/test_config.yml Modified expected_etcd_disk_media and node-removal comment
test/orchestrator/library/functions/__init__.py Modified Export new etcd and OIM checks
test/orchestrator/library/functions/_powervault_helpers.py Modified Remove unused imports
test/orchestrator/library/functions/_pxeboot_helpers.py Modified Progress output through omnia_auto log
test/orchestrator/library/functions/_workload_helpers.py Modified LDAP identity skip helper
test/orchestrator/library/functions/apptainer_jobs_pxeboot_func.py Modified Structured cleanup warning, unused import
test/orchestrator/library/functions/apptainer_recovery_pxeboot_func.py Modified Reboot authorization
test/orchestrator/library/functions/apptainer_runtime_pxeboot_func.py Modified LDAP identity gating
test/orchestrator/library/functions/dcgm_pxeboot_func.py Modified Remove unused import
test/orchestrator/library/functions/hpc_benchmarks_pxeboot_func.py Modified Remove unused imports
test/orchestrator/library/functions/kubernetes_recovery_pxeboot_func.py Modified Control-plane reboot recovery
test/orchestrator/library/functions/kubernetes_runtime_pxeboot_func.py Modified Local etcd integrity and media checks
test/orchestrator/library/functions/minimal_os_pxeboot_func.py Modified Remove unused import
test/orchestrator/library/functions/mount_config_precheck_func.py Modified Remove unused import
test/orchestrator/library/functions/mount_config_pxeboot_func.py Modified Remove unused imports
test/orchestrator/library/functions/oim_readiness_precheck_func.py Modified Negative-input overrides, forced overlap check
test/orchestrator/library/functions/powervault_pxeboot_func.py Modified Remove unused imports
test/orchestrator/library/functions/slurm_auth_pxeboot_func.py Modified LDAP gating, host-key cleanup via run_on_host
test/orchestrator/library/functions/slurm_jobs_pxeboot_func.py Modified Drain gating left to markers, structured logging
test/orchestrator/library/functions/slurm_lifecycle_pxeboot_func.py Modified Heredoc fix, two-node minimum
test/orchestrator/library/functions/slurm_recovery_pxeboot_func.py Modified Reboot authorization
test/orchestrator/library/functions/vast_storage_pxeboot_func.py Modified Remove unused imports
test/orchestrator/library/messages/precheck_msgs.py Modified Rejection messages
test/orchestrator/library/vars/__init__.py Modified Export order blocks and OIM inputs
test/orchestrator/library/vars/precheck_vars.py Modified OIM_NEGATIVE_INPUTS
test/orchestrator/library/vars/pxeboot_vars.py Modified etcd boot-script commands, escaped sinfo %T, host-key command
test/orchestrator/library/vars/test_case_vars.py Modified New cases, renumbered IDs, order blocks
test/orchestrator/ut/README.md Modified UT inventory
test/orchestrator/ut/test_additional_cloud_init_contracts.py Modified Remove unused import
test/orchestrator/ut/test_cleanup_contracts.py Modified Drain-state and authorization contracts
test/orchestrator/ut/test_kubernetes_etcd_contracts.py Added etcd and reboot recovery contracts
test/orchestrator/ut/test_pxeboot_contracts.py Modified Lifecycle, host-key and logging contracts
test/plugins/dist/omnia_auto-1.0.0-py3-none-any.whl Modified Rebuilt wheel
test/plugins/docs/06_report.md Modified Drop skip classification
test/plugins/omnia_auto/functions/formatting_func.py Modified Skip reasons in summary
test/plugins/omnia_auto/functions/report_func.py Modified Drop skip classification
test/plugins/omnia_auto/functions/report_html.py Modified Drop skip badges

Testing

  • python3 -m pytest --confcutdir=ut ut -q (from test/orchestrator): 143 passed.
  • python3 -m pytest fvt nft --collect-only -q: 311 tests collected, no collection errors, so the unchanged suites still import the updated library.
  • Not run: FVT/NFT on a cluster for this branch; the suites themselves are unchanged here.

Backward Compatibility

  • No breaking changes for other domains: add_session_result(reason=...) is optional.
  • Reports no longer contain skip_type or skip badges.
  • Library signature changes are keyword-only additions with unchanged defaults.
  • Reboot recovery helpers now require the reboot authorization; with the current conftest those cases skip instead of rebooting until part 3 adds the marker gating.

Suggested Reviewers

Reviewer Review Focus
@sujit-jadhav Orchestrator verification library and registry
@abhishek-sa1 omnia_auto reporting and wheel

Prepare the shared layer that the lifecycle suites build on.

- omnia_auto lists skip reasons under the summary table, drops the
  expected/unexpected/framework skip classification, and the wheel is
  rebuilt. add_session_result takes an optional reason, so other domains
  are unchanged.
- The test case registry gains the OIM negative cases, the local etcd
  media case, renumbered duplicate IDs, and per-suite order blocks.
- The verification library adds local etcd media, control-plane reboot
  recovery, OIM negative inputs, and LDAP identity gating. Node removal
  keeps the heredoc delimiter off the PXE mapping and needs at least two
  Slurm compute nodes. Recovery helpers check the reboot authorization.
  Host-key cleanup runs through run_on_host, and progress and cleanup
  messages use omnia_auto log. Unused imports are removed.
- Unit tests cover the etcd contracts, heredoc writes, the two-node
  removal minimum, host-key cleanup and progress logging.
- The test automation standard and test_config documentation describe
  the new rules and settings.

Refs dell#4849

Signed-off-by: balajikumaran-c-s <balajikumaran.cs@dell.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants