From 526f04de60cb36ec539726b1a389e23537f0c3c5 Mon Sep 17 00:00:00 2001 From: Patryk Matuszak <305846+pmtk@users.noreply.github.com> Date: Mon, 12 Jun 2023 13:43:06 +0200 Subject: [PATCH 1/3] robotidy --- scripts/verify/verify-rf.sh | 2 ++ test/.robotidy | 29 +++++++++++++++++++++++++++++ test/requirements.txt | 1 + 3 files changed, 32 insertions(+) create mode 100644 test/.robotidy diff --git a/scripts/verify/verify-rf.sh b/scripts/verify/verify-rf.sh index ef2c213803..3392cbb4a6 100755 --- a/scripts/verify/verify-rf.sh +++ b/scripts/verify/verify-rf.sh @@ -8,3 +8,5 @@ RF_VENV="${ROOTDIR}/_output/robotenv" cd "${ROOTDIR}/test" "${RF_VENV}/bin/robocop" + +"${RF_VENV}/bin/robotidy" --check --diff . diff --git a/test/.robotidy b/test/.robotidy new file mode 100644 index 0000000000..6bf4e960c3 --- /dev/null +++ b/test/.robotidy @@ -0,0 +1,29 @@ +[tool.robotidy] +transform = [ + "AddMissingEnd", + "NormalizeSeparators", + "DiscardEmptySections", + "MergeAndOrderSections", + "RemoveEmptySettings", + "ReplaceEmptyValues", + "NormalizeAssignments", + "OrderSettings", + "OrderSettingsSection", + "NormalizeTags", + "OrderTags", + "RenameVariables", + "IndentNestedKeywords", + "AlignSettingsSection", + "AlignVariablesSection", + "NormalizeNewLines", + "NormalizeSectionHeaderName", + "NormalizeSettingName", + "ReplaceRunKeywordIf", + "SplitTooLongLine:align_new_line=True", + "RenameTestCases", + "RenameKeywords", + "ReplaceReturns", + "ReplaceBreakContinue", + "InlineIf", + "NormalizeComments" +] diff --git a/test/requirements.txt b/test/requirements.txt index d9b2d90f98..4f23c11af1 100644 --- a/test/requirements.txt +++ b/test/requirements.txt @@ -4,3 +4,4 @@ robotframework-scplibrary==1.2.0 robotframework-sshlibrary==3.8.0 pyyaml==6.0 robotframework-robocop==3.1.1 +robotframework-tidy==4.3.0 From 9f30f9c016ea59ef3dcb3a6d3c515292de36efba Mon Sep 17 00:00:00 2001 From: Patryk Matuszak <305846+pmtk@users.noreply.github.com> Date: Mon, 19 Jun 2023 09:52:40 +0200 Subject: [PATCH 2/3] add format checking and `make rf-fmt` --- Makefile | 4 ++++ scripts/verify/verify-rf.sh | 4 +++- test/format.sh | 11 +++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100755 test/format.sh diff --git a/Makefile b/Makefile index 0fb6ae1811..cc3889ccf7 100644 --- a/Makefile +++ b/Makefile @@ -343,3 +343,7 @@ verify-config: generate-config .PHONY: e2e e2e: ./test/run.sh + +.PHONY: rf-fmt +rf-fmt: + @./test/format.sh \ No newline at end of file diff --git a/scripts/verify/verify-rf.sh b/scripts/verify/verify-rf.sh index 3392cbb4a6..d49b953158 100755 --- a/scripts/verify/verify-rf.sh +++ b/scripts/verify/verify-rf.sh @@ -7,6 +7,8 @@ RF_VENV="${ROOTDIR}/_output/robotenv" "${ROOTDIR}/scripts/fetch_tools.sh" robotframework cd "${ROOTDIR}/test" -"${RF_VENV}/bin/robocop" + +set -x +"${RF_VENV}/bin/robocop" --exclude 1015 "${RF_VENV}/bin/robotidy" --check --diff . diff --git a/test/format.sh b/test/format.sh new file mode 100755 index 0000000000..3f7173d4b1 --- /dev/null +++ b/test/format.sh @@ -0,0 +1,11 @@ +#!/bin/bash +set -euo pipefail + +ROOTDIR=$(git rev-parse --show-toplevel) +RF_VENV="${ROOTDIR}/_output/robotenv" +"${ROOTDIR}/scripts/fetch_tools.sh" robotframework + +cd "${ROOTDIR}/test" + +"${RF_VENV}/bin/robotidy" . + From f08eb708defcf16f889c1106d750790f98c3edb1 Mon Sep 17 00:00:00 2001 From: Patryk Matuszak <305846+pmtk@users.noreply.github.com> Date: Tue, 20 Jun 2023 14:01:30 +0200 Subject: [PATCH 3/3] format the code --- test/resources/common.resource | 35 ++-- test/resources/kubeconfig.resource | 19 +- test/resources/microshift-config.resource | 67 ++++--- test/resources/microshift-host.resource | 26 +-- test/resources/microshift-process.resource | 65 +++---- test/resources/oc.resource | 25 ++- test/resources/ostree.resource | 4 +- test/resources/systemd.resource | 73 ++++---- test/suites/etcd.robot | 62 +++---- test/suites/kustomize.robot | 198 ++++++++++----------- test/suites/load-balancer.robot | 26 +-- test/suites/show-config.robot | 76 ++++---- test/suites/version.robot | 52 +++--- 13 files changed, 361 insertions(+), 367 deletions(-) diff --git a/test/resources/common.resource b/test/resources/common.resource index 9b61bc2ed4..224d238f97 100644 --- a/test/resources/common.resource +++ b/test/resources/common.resource @@ -1,8 +1,9 @@ *** Settings *** -Documentation Keywords common to many test suites -Library OperatingSystem -Library String -Resource ../resources/kubeconfig.resource +Documentation Keywords common to many test suites + +Library OperatingSystem +Library String +Resource ../resources/kubeconfig.resource *** Keywords *** @@ -34,28 +35,28 @@ Teardown Suite With Namespace Check Required Env Variables [Documentation] Fail if any of the required environment variables is missing. - IF "${USHIFT_HOST}"=="${EMPTY}" + IF "${USHIFT_HOST}"=="${EMPTY}" Fatal Error USHIFT_HOST variable is required END - IF "${USHIFT_USER}"=="${EMPTY}" + IF "${USHIFT_USER}"=="${EMPTY}" Fatal Error USHIFT_USER variable is required END -Upload String To File # robocop: disable=too-many-calls-in-keyword - [Documentation] Write the string to a remote file - [Arguments] ${content} ${remote_filename} +Upload String To File # robocop: disable=too-many-calls-in-keyword + [Documentation] Write the string to a remote file + [Arguments] ${content} ${remote_filename} ${rand}= Generate Random String ${local_tmp}= Join Path /tmp ${rand} Create File ${local_tmp} ${content} ${rand}= Generate Random String ${remote_tmp}= Join Path /tmp ${rand} - Put File ${local_tmp} ${remote_tmp} mode=0644 - Remove File ${local_tmp} - ${stdout} ${rc}= Execute Command + Put File ${local_tmp} ${remote_tmp} mode=0644 + Remove File ${local_tmp} + ${stdout} ${rc}= Execute Command ... mv ${remote_tmp} ${remote_filename} - ... sudo=True return_rc=True - Should Be Equal As Integers 0 ${rc} - ${stdout} ${rc}= Execute Command + ... sudo=True return_rc=True + Should Be Equal As Integers 0 ${rc} + ${stdout} ${rc}= Execute Command ... chown root:root ${remote_filename} - ... sudo=True return_rc=True - Should Be Equal As Integers 0 ${rc} + ... sudo=True return_rc=True + Should Be Equal As Integers 0 ${rc} diff --git a/test/resources/kubeconfig.resource b/test/resources/kubeconfig.resource index 6f8279fc1a..54519886aa 100644 --- a/test/resources/kubeconfig.resource +++ b/test/resources/kubeconfig.resource @@ -1,8 +1,9 @@ *** Settings *** -Documentation Keywords for accessing a kubeconfig file for the MicroShift host -Library OperatingSystem -Library String -Resource ../resources/microshift-host.resource +Documentation Keywords for accessing a kubeconfig file for the MicroShift host + +Library OperatingSystem +Library String +Resource ../resources/microshift-host.resource *** Keywords *** @@ -13,12 +14,12 @@ Get Kubeconfig ... cat /var/lib/microshift/resources/kubeadmin/${host}/kubeconfig ... sudo=True return_rc=True Should Be Equal As Integers ${rc} 0 - Should Not Be Empty ${kubeconfig} + Should Not Be Empty ${kubeconfig} RETURN ${kubeconfig} Setup Kubeconfig [Documentation] Get the kubeconfig file from the configured $USHIFT_HOST, create a temporary file - ... and export it as $KUBECONFIG variable. + ... and export it as $KUBECONFIG variable. ${kubeconfig}= Get Kubeconfig ${USHIFT_HOST} ${rand}= Generate Random String ${path}= Join Path /tmp ${rand} @@ -38,7 +39,7 @@ Run With Kubeconfig IF ${allow_fail} == False Should Be Equal As Integers ${result.rc} 0 END - RETURN ${result.stdout} + RETURN ${result.stdout} Create Namespace [Documentation] Creates a namespace with the given name. @@ -48,9 +49,9 @@ Create Namespace Create Random Namespace [Documentation] Creates a namespace with a random name and return the name. ${rand}= Generate Random String - ${rand}= Convert To Lowercase ${rand} + ${rand}= Convert To Lowercase ${rand} Run With Kubeconfig oc create namespace test-${rand} - RETURN test-${rand} + RETURN test-${rand} Remove Namespace [Documentation] Removes the given namespace. diff --git a/test/resources/microshift-config.resource b/test/resources/microshift-config.resource index f02d74e46e..1afd387b54 100644 --- a/test/resources/microshift-config.resource +++ b/test/resources/microshift-config.resource @@ -1,61 +1,60 @@ *** Settings *** -Documentation Keywords for running the microshift command line. +Documentation Keywords for running the microshift command line. -Library Process -Library String -Library OperatingSystem - -Library SSHLibrary -Library DataFormats.py +Library Process +Library String +Library OperatingSystem +Library SSHLibrary +Library DataFormats.py *** Keywords *** Save Default MicroShift Config - [Documentation] Fetch the current config settings and preserve them as the default + [Documentation] Fetch the current config settings and preserve them as the default ... - ... Sets the suite variable DEFAULT_MICROSHIFT_CONFIG to the text value - ... based on the contents of /etc/microshift/config.yaml, if it exists, or - ... an empty string if the file does not exist. + ... Sets the suite variable DEFAULT_MICROSHIFT_CONFIG to the text value + ... based on the contents of /etc/microshift/config.yaml, if it exists, or + ... an empty string if the file does not exist. ... - ... This keyword is meant to be used from a Setup step. - ${stdout} ${rc}= Execute Command + ... This keyword is meant to be used from a Setup step. + ${stdout} ${rc}= Execute Command ... cat /etc/microshift/config.yaml - ... sudo=True return_rc=True - IF ${rc} == 0 - Set Suite Variable \${DEFAULT_MICROSHIFT_CONFIG} ${stdout} + ... sudo=True return_rc=True + IF ${rc} == 0 + Set Suite Variable \${DEFAULT_MICROSHIFT_CONFIG} ${stdout} ELSE - Set Suite Variable \${DEFAULT_MICROSHIFT_CONFIG} ${EMPTY} + Set Suite Variable \${DEFAULT_MICROSHIFT_CONFIG} ${EMPTY} END Restore Default MicroShift Config - [Documentation] Replace the microshift config file with the original defaults. + [Documentation] Replace the microshift config file with the original defaults. ... - ... If there was no configuration file originally, delete any file that is there now. - ${len}= Get Length ${DEFAULT_MICROSHIFT_CONFIG} - IF ${len} == 0 + ... If there was no configuration file originally, delete any file that is there now. + ${len}= Get Length ${DEFAULT_MICROSHIFT_CONFIG} + IF ${len} == 0 # If there was no configuration file to start with, we do not want to create # a new one, even if it is empty. Clear MicroShift Config ELSE - Upload MicroShift Config ${DEFAULT_MICROSHIFT_CONFIG} + Upload MicroShift Config ${DEFAULT_MICROSHIFT_CONFIG} END Extend MicroShift Config - [Documentation] Return combination of default config and input argument as a string. + [Documentation] Return combination of default config and input argument as a string. ... - ... The values are parsed as YAML and merged additively (no keys are deleted - ... and list values are extended but not replaced) by 'Yaml Merge'. - [Arguments] ${config} - ${merged}= Yaml Merge ${DEFAULT_MICROSHIFT_CONFIG} ${config} - RETURN ${merged} + ... The values are parsed as YAML and merged additively (no keys are deleted + ... and list values are extended but not replaced) by 'Yaml Merge'. + [Arguments] ${config} + ${merged}= Yaml Merge ${DEFAULT_MICROSHIFT_CONFIG} ${config} + RETURN ${merged} Clear MicroShift Config - [Documentation] Remove any configuration file - ${stdout} ${rc}= Execute Command + [Documentation] Remove any configuration file + ${stdout} ${rc}= Execute Command ... rm -f /etc/microshift/config.yaml - ... sudo=True return_rc=True + ... sudo=True return_rc=True Upload MicroShift Config - [Documentation] Upload a new configuration file to the MicroShift host - [Arguments] ${config_content} - Upload String To File ${config_content} /etc/microshift/config.yaml + [Documentation] Upload a new configuration file to the MicroShift host + [Arguments] ${config_content} + Upload String To File ${config_content} /etc/microshift/config.yaml diff --git a/test/resources/microshift-host.resource b/test/resources/microshift-host.resource index a69a0f612c..947608f065 100644 --- a/test/resources/microshift-host.resource +++ b/test/resources/microshift-host.resource @@ -1,18 +1,19 @@ *** Settings *** -Documentation Keywords for working with the MicroShift host -Library SSHLibrary +Documentation Keywords for working with the MicroShift host + +Library SSHLibrary *** Keywords *** Login MicroShift Host - [Documentation] Login to the MicroShift host via ssh and leave the connection open + [Documentation] Login to the MicroShift host via ssh and leave the connection open ... - ... This keyword is meant to be used at the suite level. This ensures - ... most tests already have an open connection. Any tests that will take - ... action that disrupt that connection are responsible for restoring it. + ... This keyword is meant to be used at the suite level. This ensures + ... most tests already have an open connection. Any tests that will take + ... action that disrupt that connection are responsible for restoring it. - Log Host: ${USHIFT_HOST} - IF '${SSH_PORT}' + Log Host: ${USHIFT_HOST} + IF '${SSH_PORT}' SSHLibrary.Open Connection ${USHIFT_HOST} port=${SSH_PORT} ELSE SSHLibrary.Open Connection ${USHIFT_HOST} @@ -20,14 +21,14 @@ Login MicroShift Host # If there is an ssh key set in the global configuration, use that to # login to the host. Otherwise assume that the ssh agent is running # and configured properly. - IF '${SSH_PRIV_KEY}' + IF '${SSH_PRIV_KEY}' SSHLibrary.Login With Public Key ${USHIFT_USER} ${SSH_PRIV_KEY} ELSE - SSHLibrary.Login ${USHIFT_USER} allow_agent=True + SSHLibrary.Login ${USHIFT_USER} allow_agent=True END Logout MicroShift Host - [Documentation] Close the open ssh connection to the MicroShift host + [Documentation] Close the open ssh connection to the MicroShift host SSHLibrary.Close Connection Reboot MicroShift Host @@ -37,7 +38,8 @@ Reboot MicroShift Host SSHLibrary.Start Command reboot sudo=True Sleep 30s - Wait Until Keyword Succeeds 5m 15s Login MicroShift Host + Wait Until Keyword Succeeds 5m 15s + ... Login MicroShift Host ${rc}= SSHLibrary.Execute Command true return_stdout=False return_rc=True Should Be Equal As Integers 0 ${rc} diff --git a/test/resources/microshift-process.resource b/test/resources/microshift-process.resource index 0fbc41a5c6..c5505a8f78 100644 --- a/test/resources/microshift-process.resource +++ b/test/resources/microshift-process.resource @@ -1,15 +1,14 @@ *** Settings *** -Documentation Keywords for running the microshift command line. +Documentation Keywords for running the microshift command line. -Library Process -Library String -Library OperatingSystem - -Library SSHLibrary -Resource oc.resource -Resource systemd.resource -Resource microshift-host.resource -Library DataFormats.py +Library Process +Library String +Library OperatingSystem +Library SSHLibrary +Resource oc.resource +Resource systemd.resource +Resource microshift-host.resource +Library DataFormats.py *** Keywords *** @@ -20,29 +19,25 @@ MicroShift Version ... sudo=True return_rc=True Should Be Equal As Integers ${rc} 0 Should Not Be Empty ${version_text} - ${version}= Yaml Parse ${version_text} - RETURN ${version} + ${version}= Yaml Parse ${version_text} + RETURN ${version} MicroShift Is Ready - [Documentation] Check the /readyz endpoint - ${stdout}= Run With Kubeconfig oc get --raw='/readyz' - Should Be Equal As Strings ${stdout} ok strip_spaces=True + [Documentation] Check the /readyz endpoint + ${stdout}= Run With Kubeconfig oc get --raw='/readyz' + Should Be Equal As Strings ${stdout} ok strip_spaces=True MicroShift Is Live - [Documentation] Check the /livez endpoint - ${stdout}= Run With Kubeconfig oc get --raw='/livez' - Should Be Equal As Strings ${stdout} ok strip_spaces=True + [Documentation] Check the /livez endpoint + ${stdout}= Run With Kubeconfig oc get --raw='/livez' + Should Be Equal As Strings ${stdout} ok strip_spaces=True Wait For MicroShift - [Documentation] Wait for various checks to ensure MicroShift is online. - Wait Until Keyword Succeeds - ... 30x - ... 10s - ... MicroShift Is Ready - Wait Until Keyword Succeeds - ... 30x - ... 10s - ... MicroShift Is Live + [Documentation] Wait for various checks to ensure MicroShift is online. + Wait Until Keyword Succeeds 30x 10s + ... MicroShift Is Ready + Wait Until Keyword Succeeds 30x 10s + ... MicroShift Is Live # We could also wait for relevant pods. Can we restructure the # greenboot check script to let us use it even when not on a # greenboot host? @@ -54,14 +49,12 @@ MicroShift Service Is Active Should Be Equal As Strings ${state} active Wait For MicroShift Service - [Documentation] Wait for MicroShift service to be active - Wait Until Keyword Succeeds - ... 50x - ... 10s - ... MicroShift Service Is Active + [Documentation] Wait for MicroShift service to be active + Wait Until Keyword Succeeds 50x 10s + ... MicroShift Service Is Active Restart MicroShift - [Documentation] Restart the MicroShift service + [Documentation] Restart the MicroShift service # Use separate stop and start steps to avoid a race condition with # restart where we can't tell when it is down and so we can't tell # whether we should count it as back up yet. Forcing the service @@ -70,7 +63,7 @@ Restart MicroShift # expect without worrying about the race. Any test that modifies # the MicroShift configuration file will be more reliable as a # result. - Systemctl With Retry stop microshift.service - Sleep 10 seconds - Systemctl With Retry start microshift.service + Systemctl With Retry stop microshift.service + Sleep 10 seconds + Systemctl With Retry start microshift.service Wait For MicroShift diff --git a/test/resources/oc.resource b/test/resources/oc.resource index 58366ef103..c82c4f4129 100644 --- a/test/resources/oc.resource +++ b/test/resources/oc.resource @@ -1,22 +1,21 @@ *** Settings *** -Documentation Keywords for using the oc command line. +Documentation Keywords for using the oc command line. ... -... Requires that the openshift-clients package be installed and -... 'oc' is in the $PATH. +... Requires that the openshift-clients package be installed and +... 'oc' is in the $PATH. -Resource common.resource -Library DataFormats.py +Resource common.resource +Library DataFormats.py *** Keywords *** Oc Get - [Documentation] Run 'oc get' for a specific instance of a type in a namespace. - ... Returns the YAML output parsed to a DottedDict for use in - ... other keywords. + [Documentation] Run 'oc get' for a specific instance of a type in a namespace. + ... Returns the YAML output parsed to a DottedDict for use in + ... other keywords. + [Arguments] ${type} ${namespace} ${resource} - [Arguments] ${type} ${namespace} ${resource} + ${yaml_text}= Run With Kubeconfig oc get -n ${namespace} -o yaml ${type} ${resource} + ${yaml_data}= Yaml Parse ${yaml_text} - ${yaml_text}= Run With Kubeconfig oc get -n ${namespace} -o yaml ${type} ${resource} - ${yaml_data}= Yaml Parse ${yaml_text} - - RETURN ${yaml_data} + RETURN ${yaml_data} diff --git a/test/resources/ostree.resource b/test/resources/ostree.resource index 6f36479d39..862216896a 100644 --- a/test/resources/ostree.resource +++ b/test/resources/ostree.resource @@ -59,5 +59,5 @@ Does Backup For Booted Deployment Exist ... sudo=True return_rc=True Should Be Equal As Integers 0 ${rc} - IF "${output}" == "0" RETURN ${False} - RETURN ${True} + IF "${output}" == "0" RETURN ${FALSE} + RETURN ${TRUE} diff --git a/test/resources/systemd.resource b/test/resources/systemd.resource index 4a71859db0..33cc69aada 100644 --- a/test/resources/systemd.resource +++ b/test/resources/systemd.resource @@ -1,18 +1,18 @@ *** Settings *** -Documentation Keywords for interacting with systemd +Documentation Keywords for interacting with systemd -Library Process -Library String -Resource ../resources/microshift-host.resource +Library Process +Library String +Resource ../resources/microshift-host.resource *** Keywords *** Get Systemd Setting - [Documentation] Fetch one setting from systemd for the named unit. - ... Take care to get the unit_name value _exactly_ right, or - ... systemd will report a default value without reporting any error - ... or warning. - [Arguments] ${unit_name} ${property} + [Documentation] Fetch one setting from systemd for the named unit. + ... Take care to get the unit_name value _exactly_ right, or + ... systemd will report a default value without reporting any error + ... or warning. + [Arguments] ${unit_name} ${property} ${stdout} ${rc}= Execute Command ... systemctl show --property=${property} --value ${unit_name} @@ -20,58 +20,55 @@ Get Systemd Setting Should Be Equal As Integers ${rc} 0 Should Not Be Empty ${stdout} - ${result}= Strip String ${stdout} - RETURN ${result} + ${result}= Strip String ${stdout} + RETURN ${result} Systemctl # robocop: disable=too-long-keyword - [Documentation] Run a systemctl command on the microshift host. - ... The intent is to start, stop, or restart a service. Other - ... commands should be implemented separately. When the verb is - ... "start" or "restart", this keyword will wait for the unit - ... to report that it is "running". When the verb is "stop", this - ... keyword will wait for the unit to report that it is "dead". - [Arguments] ${verb} ${unit_name} + [Documentation] Run a systemctl command on the microshift host. + ... The intent is to start, stop, or restart a service. Other + ... commands should be implemented separately. When the verb is + ... "start" or "restart", this keyword will wait for the unit + ... to report that it is "running". When the verb is "stop", this + ... keyword will wait for the unit to report that it is "dead". + [Arguments] ${verb} ${unit_name} - IF "${verb}" in {"restart", "start"} - ${state}= Set Variable running + IF "${verb}" in {"restart", "start"} + ${state}= Set Variable running ELSE - ${state}= Set Variable dead + ${state}= Set Variable dead END - ${stdout} ${stderr} ${rc}= Execute Command + ${stdout} ${stderr} ${rc}= Execute Command ... systemctl ${verb} ${unit_name} ... sudo=True ... return_stdout=True ... return_stderr=True ... return_rc=True - IF ${rc} != 0 - ${status_text}= Execute Command + IF ${rc} != 0 + ${status_text}= Execute Command ... systemctl status ${unit_name} ... sudo=True ... return_stdout=True - ${log_text}= Execute Command + ${log_text}= Execute Command ... journalctl -u ${unit_name} -o short | tail -n 100 ... sudo=True ... return_stdout=True END - Should Be Equal As Integers 0 ${rc} + Should Be Equal As Integers 0 ${rc} # It takes a bit for systemd to respond, and if we check too soon # then it looks like microshift is up, even though it is about to # be restarted. Sleep 5s - Wait Until Keyword Succeeds - ... 10x - ... 10s - ... Execute Command - ... [ $(systemctl show -p SubState --value ${unit_name}) = ${state} ] - ... timeout=10s return_stdout=True return_stderr=True + Wait Until Keyword Succeeds 10x 10s + ... Execute Command [ $(systemctl show -p SubState --value ${unit_name}) = ${state} ] + ... timeout=10s + ... return_stdout=True + ... return_stderr=True Systemctl With Retry - [Documentation] Run Systemctl keyword but retry 10 times - [Arguments] ${verb} ${unit_name} - Wait Until Keyword Succeeds - ... 10x - ... 10s - ... Systemctl ${verb} ${unit_name} + [Documentation] Run Systemctl keyword but retry 10 times + [Arguments] ${verb} ${unit_name} + Wait Until Keyword Succeeds 10x 10s + ... Systemctl ${verb} ${unit_name} diff --git a/test/suites/etcd.robot b/test/suites/etcd.robot index fc39175ab7..398cd06e60 100644 --- a/test/suites/etcd.robot +++ b/test/suites/etcd.robot @@ -10,69 +10,69 @@ Library Collections Suite Setup Setup Suite Teardown Teardown -Test Tags etcd configuration restart slow +Test Tags configuration etcd restart slow *** Variables *** ${ETCD_SYSTEMD_UNIT} microshift-etcd.scope -${MEMLIMIT128} SEPARATOR=\n -... --- -... etcd: -... \ \ memoryLimitMB: 128 -${MEMLIMIT0} SEPARATOR=\n -... --- -... etcd: -... \ \ memoryLimitMB: 0 +${MEMLIMIT128} SEPARATOR=\n +... --- +... etcd: +... \ \ memoryLimitMB: 128 +${MEMLIMIT0} SEPARATOR=\n +... --- +... etcd: +... \ \ memoryLimitMB: 0 *** Test Cases *** Set MemoryHigh Limit Unlimited - [Documentation] The default configuration should not limit RAM + [Documentation] The default configuration should not limit RAM ... - ... Since we cannot assume that the default configuration file is - ... being used, the test explicitly configures a '0' limit, which - ... is equivalent to not having any configuration at all. - [Setup] Setup With Custom Config ${MEMLIMIT0} - Expect MemoryHigh infinity + ... Since we cannot assume that the default configuration file is + ... being used, the test explicitly configures a '0' limit, which + ... is equivalent to not having any configuration at all. + [Setup] Setup With Custom Config ${MEMLIMIT0} + Expect MemoryHigh infinity Set MemoryHigh Limit 128MB - [Documentation] Set the memory limit for etcd to 128MB and ensure it takes effect - [Setup] Setup With Custom Config ${MEMLIMIT128} + [Documentation] Set the memory limit for etcd to 128MB and ensure it takes effect + [Setup] Setup With Custom Config ${MEMLIMIT128} # Expecting the setting to be 128 * 1024 * 1024 - Expect MemoryHigh 134217728 - [Teardown] Restore Default Config + Expect MemoryHigh 134217728 + [Teardown] Restore Default Config *** Keywords *** Setup - [Documentation] Test suite setup + [Documentation] Test suite setup Check Required Env Variables Login MicroShift Host - Setup Kubeconfig # for readiness checks + Setup Kubeconfig # for readiness checks Save Default MicroShift Config Teardown - [Documentation] Test suite teardown + [Documentation] Test suite teardown Restore Default Config Logout MicroShift Host Remove Kubeconfig Restore Default Config - [Documentation] Remove any custom config and restart MicroShift + [Documentation] Remove any custom config and restart MicroShift Restore Default MicroShift Config Restart MicroShift Setup With Custom Config - [Documentation] Install a custom config and restart MicroShift - [Arguments] ${config_content} - ${merged}= Extend MicroShift Config ${config_content} - Upload MicroShift Config ${merged} + [Documentation] Install a custom config and restart MicroShift + [Arguments] ${config_content} + ${merged}= Extend MicroShift Config ${config_content} + Upload MicroShift Config ${merged} Restart MicroShift Expect MemoryHigh - [Documentation] Verify that the MemoryHigh setting for etcd matches the expected value - [Arguments] ${expected} - ${actual}= Get Systemd Setting microshift-etcd.scope MemoryHigh + [Documentation] Verify that the MemoryHigh setting for etcd matches the expected value + [Arguments] ${expected} + ${actual}= Get Systemd Setting microshift-etcd.scope MemoryHigh # Using integer comparison is complicated here because sometimes # the returned or expected value is 'infinity'. - Should Be Equal ${expected} ${actual} + Should Be Equal ${expected} ${actual} diff --git a/test/suites/kustomize.robot b/test/suites/kustomize.robot index cc80cd35e8..a920213520 100644 --- a/test/suites/kustomize.robot +++ b/test/suites/kustomize.robot @@ -1,190 +1,190 @@ *** Settings *** -Documentation Tests for applying manifests automatically via the kustomize controller +Documentation Tests for applying manifests automatically via the kustomize controller -Resource ../resources/common.resource -Resource ../resources/systemd.resource -Resource ../resources/microshift-config.resource -Resource ../resources/microshift-process.resource +Resource ../resources/common.resource +Resource ../resources/systemd.resource +Resource ../resources/microshift-config.resource +Resource ../resources/microshift-process.resource -Test Tags restart slow +Test Tags restart slow *** Variables *** -${CONFIGMAP_NAME} test-configmap +${CONFIGMAP_NAME} test-configmap *** Test Cases *** Load From /etc/microshift/manifests - [Documentation] /etc/microshift/manifests - [Setup] Setup /etc/microshift/manifests + [Documentation] /etc/microshift/manifests + [Setup] Setup /etc/microshift/manifests ConfigMap Path Should Match - [Teardown] Teardown + [Teardown] Teardown Load From /etc/microshift/manifestsd # Keyword names cannot have '.' in them - [Documentation] Subdir of /etc/microshift/manifests.d - [Setup] Setup With Subdir /etc/microshift/manifests.d + [Documentation] Subdir of /etc/microshift/manifests.d + [Setup] Setup With Subdir /etc/microshift/manifests.d ConfigMap Path Should Match - [Teardown] Teardown With Subdir + [Teardown] Teardown With Subdir Load From /usr/lib/microshift/manifests - [Documentation] /usr/lib/microshift/manifests - [Setup] Setup /usr/lib/microshift/manifests + [Documentation] /usr/lib/microshift/manifests + [Setup] Setup /usr/lib/microshift/manifests ConfigMap Path Should Match - [Teardown] Teardown + [Teardown] Teardown Load From /usr/lib/microshift/manifestsd # Keyword names cannot have '.' in them - [Documentation] Subdir of /usr/lib/microshift/manifests.d - [Setup] Setup With Subdir /usr/lib/microshift/manifests.d + [Documentation] Subdir of /usr/lib/microshift/manifests.d + [Setup] Setup With Subdir /usr/lib/microshift/manifests.d ConfigMap Path Should Match - [Teardown] Teardown With Subdir + [Teardown] Teardown With Subdir Load From Configured Dir - [Documentation] Non-default directory - [Setup] Setup With Config /usr/lib/microshift/test-manifests + [Documentation] Non-default directory + [Setup] Setup With Config /usr/lib/microshift/test-manifests ConfigMap Path Should Match - [Teardown] Teardown With Config + [Teardown] Teardown With Config Do Not Load From Unonfigured Dir - [Documentation] Remove default directory from config and ensure manifests are not loaded - [Setup] Setup With Limited Config + [Documentation] Remove default directory from config and ensure manifests are not loaded + [Setup] Setup With Limited Config ConfigMap Should Be Missing - [Teardown] Teardown With Config + [Teardown] Teardown With Config *** Keywords *** Setup - [Documentation] Set up for test - [Arguments] ${path} - Set Suite Variable \${MANIFEST_DIR} ${path} + [Documentation] Set up for test + [Arguments] ${path} + Set Suite Variable \${MANIFEST_DIR} ${path} Check Required Env Variables Login MicroShift Host - Setup Kubeconfig # for readiness checks - ${ns}= Create Random Namespace - Set Suite Variable \${NAMESPACE} ${ns} + Setup Kubeconfig # for readiness checks + ${ns}= Create Random Namespace + Set Suite Variable \${NAMESPACE} ${ns} Clear Manifest Directory Write Manifests Restart MicroShift Teardown - [Documentation] Clean up after test + [Documentation] Clean up after test Clear Manifest Directory - Run With Kubeconfig oc delete namespace ${NAMESPACE} allow_fail=True + Run With Kubeconfig oc delete namespace ${NAMESPACE} allow_fail=True Logout MicroShift Host Remove Kubeconfig Setup With Subdir - [Documentation] Set up for test using dynamically created subdir - [Arguments] ${path} + [Documentation] Set up for test using dynamically created subdir + [Arguments] ${path} ${rand}= Generate Random String - Setup ${path}/${rand} + Setup ${path}/${rand} Teardown With Subdir - [Documentation] Remove MANIFEST_DIR and clean up - ${stdout} ${rc}= Execute Command + [Documentation] Remove MANIFEST_DIR and clean up + ${stdout} ${rc}= Execute Command ... rm -rf ${MANIFEST_DIR} - ... sudo=True return_rc=True - Should Be Equal As Integers 0 ${rc} + ... sudo=True return_rc=True + Should Be Equal As Integers 0 ${rc} Teardown -Setup With Config # robocop: disable=too-many-calls-in-keyword - [Documentation] Set up for test using non-default directory - [Arguments] ${path} - Set Suite Variable \${MANIFEST_DIR} ${path} +Setup With Config # robocop: disable=too-many-calls-in-keyword + [Documentation] Set up for test using non-default directory + [Arguments] ${path} + Set Suite Variable \${MANIFEST_DIR} ${path} Check Required Env Variables Login MicroShift Host - Setup Kubeconfig # for readiness checks + Setup Kubeconfig # for readiness checks # Extend the configuration setting to add the path Save Default MicroShift Config - ${config_content}= Catenate SEPARATOR=\n - ... manifests: - ... \ \ kustomizePaths: - ... \ \ \ \ - ${path} - ${merged}= Extend MicroShift Config ${config_content} - Upload MicroShift Config ${merged} - - ${ns}= Create Random Namespace - Set Suite Variable \${NAMESPACE} ${ns} + ${config_content}= Catenate SEPARATOR=\n + ... manifests: + ... \ \ kustomizePaths: + ... \ \ \ \ - ${path} + ${merged}= Extend MicroShift Config ${config_content} + Upload MicroShift Config ${merged} + + ${ns}= Create Random Namespace + Set Suite Variable \${NAMESPACE} ${ns} Clear Manifest Directory Write Manifests Restart MicroShift Teardown With Config - [Documentation] Restore default config and clean up + [Documentation] Restore default config and clean up Restore Default Config Teardown With Subdir -Setup With Limited Config # robocop: disable=too-many-calls-in-keyword - [Documentation] Ensure the configuration does *not* include the manifest directory - Set Suite Variable \${MANIFEST_DIR} /usr/lib/microshift/manifests +Setup With Limited Config # robocop: disable=too-many-calls-in-keyword + [Documentation] Ensure the configuration does *not* include the manifest directory + Set Suite Variable \${MANIFEST_DIR} /usr/lib/microshift/manifests Check Required Env Variables Login MicroShift Host - Setup Kubeconfig # for readiness checks + Setup Kubeconfig # for readiness checks # Write a config that does not include our path Save Default MicroShift Config - ${config_content}= Catenate SEPARATOR=\n - ... manifests: - ... \ \ kustomizePaths: - ... \ \ \ \ - /etc/microshift/manifests - ${merged}= Extend MicroShift Config ${config_content} - Upload MicroShift Config ${merged} - - ${ns}= Create Random Namespace - Set Suite Variable \${NAMESPACE} ${ns} + ${config_content}= Catenate SEPARATOR=\n + ... manifests: + ... \ \ kustomizePaths: + ... \ \ \ \ - /etc/microshift/manifests + ${merged}= Extend MicroShift Config ${config_content} + Upload MicroShift Config ${merged} + + ${ns}= Create Random Namespace + Set Suite Variable \${NAMESPACE} ${ns} Clear Manifest Directory Write Manifests Restart MicroShift Restore Default Config - [Documentation] Remove any custom config and restart MicroShift + [Documentation] Remove any custom config and restart MicroShift Restore Default MicroShift Config Restart MicroShift - Sleep 10 seconds # Wait for systemd to catch up + Sleep 10 seconds # Wait for systemd to catch up ConfigMap Path Should Match - [Documentation] Ensure the config map path value matches the manifest dir - ${configmap}= Oc Get configmap ${NAMESPACE} ${CONFIGMAP_NAME} - Should Be Equal ${MANIFEST_DIR} ${configmap.data.path} + [Documentation] Ensure the config map path value matches the manifest dir + ${configmap}= Oc Get configmap ${NAMESPACE} ${CONFIGMAP_NAME} + Should Be Equal ${MANIFEST_DIR} ${configmap.data.path} ConfigMap Should Be Missing - [Documentation] Ensure the config map was not created + [Documentation] Ensure the config map was not created ${result}= Run Process oc get configmap -n ${NAMESPACE} ${CONFIGMAP_NAME} - ... env:KUBECONFIG=${KUBECONFIG} - ... stderr=STDOUT - ... shell=True - Should Be Equal As Integers ${result.rc} 1 + ... env:KUBECONFIG=${KUBECONFIG} + ... stderr=STDOUT + ... shell=True + Should Be Equal As Integers ${result.rc} 1 Clear Manifest Directory - [Documentation] Remove the contents of the manifest directory - ${stdout} ${rc}= Execute Command + [Documentation] Remove the contents of the manifest directory + ${stdout} ${rc}= Execute Command ... rm -rf ${MANIFEST_DIR}/* - ... sudo=True return_rc=True - Should Be Equal As Integers 0 ${rc} + ... sudo=True return_rc=True + Should Be Equal As Integers 0 ${rc} Write Manifests - [Documentation] Install manifests + [Documentation] Install manifests # Make sure the manifest directory exists - ${stdout} ${rc}= Execute Command + ${stdout} ${rc}= Execute Command ... mkdir -p ${MANIFEST_DIR} - ... sudo=True return_rc=True - Should Be Equal As Integers 0 ${rc} + ... sudo=True return_rc=True + Should Be Equal As Integers 0 ${rc} # Configure kustomization to use the namespace created in Setup - ${kustomization}= Catenate SEPARATOR=\n - ... resources: - ... - configmap.yaml - ... namespace: ${NAMESPACE} + ${kustomization}= Catenate SEPARATOR=\n + ... resources: + ... - configmap.yaml + ... namespace: ${NAMESPACE} ... - Upload String To File ${kustomization} ${MANIFEST_DIR}/kustomization.yaml + Upload String To File ${kustomization} ${MANIFEST_DIR}/kustomization.yaml # Build a configmap with unique data for this scenario - ${configmap}= Catenate SEPARATOR=\n - ... apiVersion: v1 - ... kind: ConfigMap - ... metadata: - ... \ \ name: ${CONFIGMAP_NAME} - ... data: - ... \ \ path: ${MANIFEST_DIR} + ${configmap}= Catenate SEPARATOR=\n + ... apiVersion: v1 + ... kind: ConfigMap + ... metadata: + ... \ \ name: ${CONFIGMAP_NAME} + ... data: + ... \ \ path: ${MANIFEST_DIR} ... - Upload String To File ${configmap} ${MANIFEST_DIR}/configmap.yaml + Upload String To File ${configmap} ${MANIFEST_DIR}/configmap.yaml diff --git a/test/suites/load-balancer.robot b/test/suites/load-balancer.robot index dda830fcd1..ae9bdda090 100644 --- a/test/suites/load-balancer.robot +++ b/test/suites/load-balancer.robot @@ -1,17 +1,16 @@ *** Settings *** -Documentation Load balancer test suite. +Documentation Load balancer test suite. -Library Process +Library Process +Resource ../resources/common.resource +Resource ../resources/kubeconfig.resource -Resource ../resources/common.resource -Resource ../resources/kubeconfig.resource - -Suite Setup Setup Suite With Namespace -Suite Teardown Teardown Suite With Namespace +Suite Setup Setup Suite With Namespace +Suite Teardown Teardown Suite With Namespace *** Variables *** -${HELLO_USHIFT} assets/hello-microshift.yaml +${HELLO_USHIFT} assets/hello-microshift.yaml *** Test Cases *** @@ -19,10 +18,12 @@ Load Balancer Smoke Test [Documentation] Verify that Load Balancer correctly exposes HTTP service [Tags] smoke [Setup] Run Keywords - ... Create Hello MicroShift Pod AND + ... Create Hello MicroShift Pod + ... AND ... Expose Hello MicroShift Pod Via LB - Wait Until Keyword Succeeds 3x 3s Access Hello Microshift Via LB + Wait Until Keyword Succeeds 3x 3s + ... Access Hello Microshift Via LB [Teardown] Run Keywords ... Delete Hello MicroShift Pod Route And Service @@ -42,7 +43,8 @@ Access Hello Microshift Via LB [Documentation] Try to retrieve data from the "hello microshift" service end point ${result}= Run Process ... curl -i http://hello-microshift.cluster.local --connect-to "hello-microshift.cluster.local:80:${USHIFT_HOST}:5678" - ... shell=True timeout=15s + ... shell=True + ... timeout=15s Log Many ${result.rc} ${result.stdout} ${result.stderr} Should Be Equal As Integers ${result.rc} 0 Should Match Regexp ${result.stdout} HTTP.*200 @@ -51,5 +53,5 @@ Access Hello Microshift Via LB Delete Hello MicroShift Pod Route And Service [Documentation] Remove the "hello microshift" resources Run With Kubeconfig oc delete route hello-microshift -n ${NAMESPACE} True - Run With Kubeconfig oc delete service hello-microshift -n ${NAMESPACE} True + Run With Kubeconfig oc delete service hello-microshift -n ${NAMESPACE} True Run With Kubeconfig oc delete -f ${HELLO_USHIFT} -n ${NAMESPACE} True diff --git a/test/suites/show-config.robot b/test/suites/show-config.robot index 70b48a733f..be99073b13 100644 --- a/test/suites/show-config.robot +++ b/test/suites/show-config.robot @@ -1,71 +1,71 @@ *** Settings *** -Documentation show-config command tests +Documentation show-config command tests -Resource ../resources/common.resource -Resource ../resources/microshift-config.resource -Resource ../resources/microshift-host.resource -Resource ../resources/microshift-process.resource -Library ../resources/DataFormats.py +Resource ../resources/common.resource +Resource ../resources/microshift-config.resource +Resource ../resources/microshift-host.resource +Resource ../resources/microshift-process.resource +Library ../resources/DataFormats.py -Suite Setup Setup -Suite Teardown Teardown +Suite Setup Setup +Suite Teardown Teardown *** Variables *** ${MEMLIMIT128} SEPARATOR=\n -... --- -... etcd: -... \ \ memoryLimitMB: 128 +... --- +... etcd: +... \ \ memoryLimitMB: 128 *** Test Cases *** No Mode Argument - [Documentation] Test without any explicit --mode - ${output} ${rc}= Execute Command + [Documentation] Test without any explicit --mode + ${output} ${rc}= Execute Command ... microshift show-config - ... sudo=True return_rc=True - Should Be Equal As Integers 0 ${rc} - ${config}= Yaml Parse ${output} - Should Be Equal As Integers 128 ${config.etcd.memoryLimitMB} + ... sudo=True return_rc=True + Should Be Equal As Integers 0 ${rc} + ${config}= Yaml Parse ${output} + Should Be Equal As Integers 128 ${config.etcd.memoryLimitMB} Explicit Mode Default - [Documentation] Test with explicit '--mode default' - ${config}= Show Config default - Should Be Equal As Integers 0 ${config.etcd.memoryLimitMB} + [Documentation] Test with explicit '--mode default' + ${config}= Show Config default + Should Be Equal As Integers 0 ${config.etcd.memoryLimitMB} Explicit Mode Effective - [Documentation] Test with explicit '--mode effective' - ${config}= Show Config effective - Should Be Equal As Integers 128 ${config.etcd.memoryLimitMB} + [Documentation] Test with explicit '--mode effective' + ${config}= Show Config effective + Should Be Equal As Integers 128 ${config.etcd.memoryLimitMB} Mode Unknown - [Documentation] Test with explicit '--mode no-such-mode' - ${output} ${rc}= Execute Command + [Documentation] Test with explicit '--mode no-such-mode' + ${output} ${rc}= Execute Command ... microshift show-config --mode no-such-mode - ... sudo=True return_rc=True - Should Not Be Equal As Integers 0 ${rc} + ... sudo=True return_rc=True + Should Not Be Equal As Integers 0 ${rc} *** Keywords *** Setup - [Documentation] Test suite setup + [Documentation] Test suite setup Check Required Env Variables Login MicroShift Host Save Default MicroShift Config - ${newconfig}= Extend MicroShift Config ${MEMLIMIT128} - Upload MicroShift Config ${newconfig} + ${newconfig}= Extend MicroShift Config ${MEMLIMIT128} + Upload MicroShift Config ${newconfig} Teardown - [Documentation] Test suite teardown + [Documentation] Test suite teardown Restore Default MicroShift Config Logout MicroShift Host Show Config - [Documentation] Run microshift show-config with ${mode} - [Arguments] ${mode} - ${output} ${rc}= Execute Command + [Documentation] Run microshift show-config with ${mode} + [Arguments] ${mode} + ${output} ${rc}= Execute Command ... microshift show-config --mode ${mode} - ... sudo=True return_rc=True - Should Be Equal As Integers 0 ${rc} - ${yaml_data}= Yaml Parse ${output} - RETURN ${yaml_data} + ... sudo=True return_rc=True + Should Be Equal As Integers 0 ${rc} + ${yaml_data}= Yaml Parse ${output} + RETURN ${yaml_data} diff --git a/test/suites/version.robot b/test/suites/version.robot index 09b85aba6a..9761b31afb 100755 --- a/test/suites/version.robot +++ b/test/suites/version.robot @@ -18,68 +18,68 @@ ${USHIFT_USER} ${EMPTY} *** Test Cases *** ConfigMap Contents - [Documentation] Check the version of the server + [Documentation] Check the version of the server - ${configmap}= Oc Get configmap kube-public microshift-version + ${configmap}= Oc Get configmap kube-public microshift-version Should Be Equal As Integers ${configmap.data.major} ${MAJOR_VERSION} Should Be Equal As Integers ${configmap.data.minor} ${MINOR_VERSION} CLI Output - [Documentation] Check the version reported by the process + [Documentation] Check the version reported by the process - ${version}= MicroShift Version + ${version}= MicroShift Version Should Be Equal As Integers ${version.major} ${MAJOR_VERSION} Should Be Equal As Integers ${version.minor} ${MINOR_VERSION} - Should Start With ${version.gitVersion} ${Y_STREAM} + Should Start With ${version.gitVersion} ${Y_STREAM} ConfigMap Matches CLI - [Documentation] Ensure the ConfigMap is being updated based on the actual binary version + [Documentation] Ensure the ConfigMap is being updated based on the actual binary version - ${configmap}= Oc Get configmap kube-public microshift-version - ${cli}= MicroShift Version - Should Be Equal ${configmap.data.version} ${cli.gitVersion} + ${configmap}= Oc Get configmap kube-public microshift-version + ${cli}= MicroShift Version + Should Be Equal ${configmap.data.version} ${cli.gitVersion} *** Keywords *** Setup - [Documentation] Test suite setup + [Documentation] Test suite setup Check Required Env Variables Login MicroShift Host Setup Kubeconfig Read Expected Versions Teardown - [Documentation] Test suite teardown + [Documentation] Test suite teardown Remove Kubeconfig Logout MicroShift Host -Read Expected Versions # robocop: disable=too-many-calls-in-keyword - [Documentation] Read ../Makefile.version.aarch64.var to find the expected versions - ... Sets suite variables FULL_VERSION, MAJOR_VERSION, MINOR_VERSION, and Y_STREAM based on - ... the content. +Read Expected Versions # robocop: disable=too-many-calls-in-keyword + [Documentation] Read ../Makefile.version.aarch64.var to find the expected versions + ... Sets suite variables FULL_VERSION, MAJOR_VERSION, MINOR_VERSION, and Y_STREAM based on + ... the content. # The file contains content in this format: # # OCP_VERSION := 4.14.0-0.nightly-arm64-2023-05-04-012046 - ${unparsed}= OperatingSystem.Get File ../Makefile.version.aarch64.var + ${unparsed}= OperatingSystem.Get File ../Makefile.version.aarch64.var # 4.14.0-0.nightly-arm64-2023-05-04-012046 - ${version_full_raw}= Fetch From Right ${unparsed} := - ${version_full}= Strip String ${version_full_raw} - Set Suite Variable \${FULL_VERSION} ${version_full} + ${version_full_raw}= Fetch From Right ${unparsed} := + ${version_full}= Strip String ${version_full_raw} + Set Suite Variable \${FULL_VERSION} ${version_full} # 4 - ${major}= Fetch From Left ${version_full} . - Set Suite Variable \${MAJOR_VERSION} ${major} + ${major}= Fetch From Left ${version_full} . + Set Suite Variable \${MAJOR_VERSION} ${major} # 14.0-0.nightly-arm64-2023-05-04-012046 - ${without_major}= Get Substring ${version_full} 2 + ${without_major}= Get Substring ${version_full} 2 # 14 - ${minor}= Fetch From Left ${without_major} . - Set Suite Variable \${MINOR_VERSION} ${minor} + ${minor}= Fetch From Left ${without_major} . + Set Suite Variable \${MINOR_VERSION} ${minor} # 4.14 - ${ystream}= Format String {}.{} ${major} ${minor} - Set Suite Variable \${Y_STREAM} ${ystream} + ${ystream}= Format String {}.{} ${major} ${minor} + Set Suite Variable \${Y_STREAM} ${ystream}