From 9b26eeb19774a9333b5044485c5407cdd6da7486 Mon Sep 17 00:00:00 2001 From: Patryk Matuszak <305846+pmtk@users.noreply.github.com> Date: Fri, 29 Sep 2023 13:42:23 +0200 Subject: [PATCH 1/2] re-enable microshift.service after cleanup --- test/resources/microshift-process.resource | 2 ++ test/suites/greenboot/greenboot.robot | 5 +++-- test/suites/standard/hostname.robot | 3 +-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/test/resources/microshift-process.resource b/test/resources/microshift-process.resource index c4be64c254..78aac56711 100644 --- a/test/resources/microshift-process.resource +++ b/test/resources/microshift-process.resource @@ -108,3 +108,5 @@ Cleanup MicroShift ... return_stdout=True return_stderr=True return_rc=True Log Many ${stdout} ${stderr} ${rc} Should Be Equal As Integers ${rc} 0 + + Enable MicroShift diff --git a/test/suites/greenboot/greenboot.robot b/test/suites/greenboot/greenboot.robot index c56e75b5d3..0b7704cf3a 100644 --- a/test/suites/greenboot/greenboot.robot +++ b/test/suites/greenboot/greenboot.robot @@ -38,8 +38,9 @@ Simulate Service Failure Restart Greenboot And Wait For Success Disrupt Service Cleanup MicroShift --all --keep-images + # not using 'Start MicroShift' kw because it retries Run Keyword And Expect Error 0 != 1 - ... Systemctl enable --now microshift + ... Systemctl start microshift Run Keyword And Expect Error 0 != 1 ... Restart Greenboot And Wait For Success @@ -133,6 +134,6 @@ Disrupt Pod Network Cleanup And Start [Documentation] Wipe Microshift data and start it. Cleanup MicroShift --all --keep-images - Systemctl enable --now microshift + Start MicroShift Setup Kubeconfig Restart Greenboot And Wait For Success diff --git a/test/suites/standard/hostname.robot b/test/suites/standard/hostname.robot index 002572415b..2f5940ea57 100644 --- a/test/suites/standard/hostname.robot +++ b/test/suites/standard/hostname.robot @@ -54,6 +54,5 @@ Setup Hostname IF "${hostname}"=="${EMPTY}" RETURN ${old}= Change Hostname ${hostname} Cleanup MicroShift --all --keep-images - Systemctl enable microshift - Restart MicroShift + Start MicroShift RETURN ${old} From 14b67517342594a3c5910803b25afd2e15357f9b Mon Sep 17 00:00:00 2001 From: ehila Date: Tue, 3 Oct 2023 00:36:37 -0400 Subject: [PATCH 2/2] altered to get kubeconfig after hostname change added setup kubeconfig keyword to get new potential kubeconfig after microshift start Signed-off-by: ehila --- test/resources/microshift-process.resource | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/resources/microshift-process.resource b/test/resources/microshift-process.resource index 78aac56711..60e7f430b1 100644 --- a/test/resources/microshift-process.resource +++ b/test/resources/microshift-process.resource @@ -94,6 +94,8 @@ Stop MicroShift Start MicroShift [Documentation] Start the MicroShift service Systemctl With Retry start microshift.service + # Kubeconfig may change between restarts, ensure we are taking the latest one. + Setup Kubeconfig Enable MicroShift [Documentation] Enable the MicroShift service