Show full template test flow in ATVM status
This commit is contained in:
@@ -30,6 +30,39 @@ RUN_STATES = {
|
||||
LOCAL_TZ = datetime.now().astimezone().tzinfo or timezone.utc
|
||||
|
||||
|
||||
DEFAULT_TEST_FLOW = [
|
||||
"1. Test flow is template-specific for this run",
|
||||
"2. Verifying set up",
|
||||
"3. Execute the requested template workflow",
|
||||
"4. Validate expected run outcome",
|
||||
"5. Power off",
|
||||
]
|
||||
|
||||
|
||||
TEMPLATE_TEST_FLOWS = {
|
||||
"cmc-e2e": [
|
||||
"1. Verifying set up",
|
||||
"2. Power on and obtain ip address and host name",
|
||||
"3. Uninstall CMC if still exists",
|
||||
"4. Setting up disk",
|
||||
"5. Copy CMC install command from GUI",
|
||||
"6. Install CMC",
|
||||
"7. Create migration session",
|
||||
"8. Tracking Changes",
|
||||
"9. Trigger cmotion and do I/O test before actual cutover",
|
||||
"10. Verify migration remains healthy during I/O activity",
|
||||
"11. Prepare for cutover",
|
||||
"12. Stop application / stop test I/O",
|
||||
"13. Run final sync",
|
||||
"14. Confirm destination is fully up to date",
|
||||
"15. Perform cutover",
|
||||
"16. Validate destination host / disk state",
|
||||
"17. Run post-cutover checks",
|
||||
"18. Power off",
|
||||
],
|
||||
}
|
||||
|
||||
|
||||
@dataclass
|
||||
class HostResult:
|
||||
host: str
|
||||
@@ -492,6 +525,12 @@ def format_timestamp_local(ts: Optional[datetime]) -> str:
|
||||
return local.strftime("%Y-%m-%d %H:%M:%S %Z")
|
||||
|
||||
|
||||
def get_test_flow(template_name: object) -> List[str]:
|
||||
if not isinstance(template_name, str):
|
||||
return DEFAULT_TEST_FLOW
|
||||
return TEMPLATE_TEST_FLOWS.get(template_name, DEFAULT_TEST_FLOW)
|
||||
|
||||
|
||||
def build_status_markdown(
|
||||
build_name: str,
|
||||
metadata: Dict[str, object],
|
||||
@@ -527,6 +566,7 @@ def build_status_markdown(
|
||||
notes = notes + [f"Currents recorded run: `{currents_url}`"]
|
||||
|
||||
notes_block = "\n".join(f"- {note}" for note in notes) if notes else "- none"
|
||||
test_flow_lines = [f"- {step}" for step in get_test_flow(metadata.get("template"))]
|
||||
|
||||
lines = [
|
||||
"## ATVM Run Status",
|
||||
@@ -540,17 +580,7 @@ def build_status_markdown(
|
||||
f"- scope of this run: {metadata['scope_description']}",
|
||||
"",
|
||||
"**TEST FLOW:**",
|
||||
"- 1. Verifying set up",
|
||||
"- 2. Power on and obtain ip address and host name",
|
||||
"- 3. Uninstall cmc if still exist",
|
||||
"- 4. Setting up disk",
|
||||
"- 5. Copy cmc install command from GUI",
|
||||
"- 6. Install cmc",
|
||||
"- 7. Create migration session",
|
||||
"- 8. Tracking Changes",
|
||||
"- 9. Trigger cmotion and do I/O test before actual cutover",
|
||||
"- ...",
|
||||
"- 22. Power off",
|
||||
*test_flow_lines,
|
||||
"",
|
||||
"**SUMMARY:**",
|
||||
"",
|
||||
|
||||
Reference in New Issue
Block a user