{"code":"*** Settings ***\nDocumentation Keywords common to many test suites\n\nLibrary OperatingSystem\nLibrary String\nLibrary SSHLibrary\nResource ..\/resources\/kubeconfig.resource\n\n\n*** Keywords ***\nSetup Suite\n [Documentation] Setup a namespace-less test suite by configuring Kubeconfig\n Check Required Env Variables\n Login MicroShift Host\n Setup Kubeconfig\n\nSetup Suite With Namespace\n [Documentation] Setup a test suite by creating a unique namespace and configuring Kubeconfig\n Check Required Env Variables\n Login MicroShift Host\n Setup Kubeconfig\n ${ns}= Create Unique Namespace\n Set Suite Variable \\${NAMESPACE} ${ns}\n\nCreate Unique Namespace\n [Documentation] Creates a namespace with a unique suffix\n ${rand}= Generate Random String\n ${rand}= Convert To Lower Case ${rand}\n ${ns}= Catenate SEPARATOR=- test ${rand}\n\n Create Namespace ${ns}\n RETURN ${ns}\n\nTeardown Suite\n [Documentation] Teardown the namespace-less test suite by removing the Kubeconfig.\n Remove Kubeconfig\n Login MicroShift Host\n\nTeardown Suite With Namespace\n [Documentation] Teardown the namespaced test suite by removing the namespace and removing the Kubeconfig.\n Remove Namespace ${NAMESPACE}\n Remove Kubeconfig\n\nCheck Required Env Variables\n [Documentation] Fail if any of the required environment variables is missing.\n IF \"${USHIFT_HOST}\"==\"${EMPTY}\"\n Fatal Error USHIFT_HOST variable is required\n END\n IF \"${USHIFT_USER}\"==\"${EMPTY}\"\n Fatal Error USHIFT_USER variable is required\n END\n\nCreate Random Temp File\n [Documentation] Create a random temp file\n [Arguments] ${content}=\"\"\n ${rand}= Generate Random String\n ${path}= Join Path \/tmp ${rand}\n Create File ${path} ${content}\n RETURN ${path}\n\nUpload String To File # robocop: disable=too-many-calls-in-keyword\n [Documentation] Write the string to a remote file\n [Arguments] ${content} ${remote_filename}\n ${rand}= Generate Random String\n ${local_tmp}= Join Path \/tmp ${rand}\n Create File ${local_tmp} ${content}\n ${rand}= Generate Random String\n ${remote_tmp}= Join Path \/tmp ${rand}\n Put File ${local_tmp} ${remote_tmp} mode=0644\n Remove File ${local_tmp}\n ${stdout} ${stderr} ${rc}= Execute Command\n ... mv -Z ${remote_tmp} ${remote_filename}\n ... sudo=True return_rc=True return_stdout=True return_stderr=True\n Should Be Equal As Integers 0 ${rc}\n ${stdout} ${stderr} ${rc}= Execute Command\n ... chown root:root ${remote_filename}\n ... sudo=True return_rc=True return_stdout=True return_stderr=True\n Should Be Equal As Integers 0 ${rc}\n\nVerify Remote Directory Exists With Sudo\n [Documentation] Use sudo to verify that the specified directory exists\n [Arguments] ${remote_dir}\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... test -d ${remote_dir}\n ... sudo=True return_rc=True return_stdout=True return_stderr=True\n Should Be Equal As Integers 0 ${rc}\n\nVerify Remote Directory Does Not Exist With Sudo\n [Documentation] Use sudo to verify that the specified directory does not exist\n [Arguments] ${remote_dir}\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... test -d ${remote_dir}\n ... sudo=True return_rc=True return_stdout=True return_stderr=True\n Should Not Be Equal As Integers 0 ${rc}\n\nVerify Remote File Exists With Sudo\n [Documentation] Use sudo to verify that the specified file exists\n [Arguments] ${remote_file}\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... test -f ${remote_file}\n ... sudo=True return_rc=True return_stdout=True return_stderr=True\n Should Be Equal As Integers 0 ${rc}\n\nVerify Remote File Does Not Exist With Sudo\n [Documentation] Use sudo to verify that the specified file does not exist\n [Arguments] ${remote_file}\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... test -f ${remote_file}\n ... sudo=True return_rc=True return_stdout=True return_stderr=True\n Should Not Be Equal As Integers 0 ${rc}\n\nCreate Random Temp Directory\n [Documentation] Create a random temp file\n [Arguments] ${root_path}=\/tmp\/certs\n ${rand}= Generate Random String\n ${path}= Join Path ${root_path} ${rand}\n Create Directory ${path}\n RETURN ${path}\n\nCreate Remote Dir For Path\n [Documentation] Create parent dirname if doesnt exist\n [Arguments] ${file_path}\n ${stdout} ${stderr} ${rc}= Execute Command\n ... mkdir -pZ $(dirname ${file_path})\n ... sudo=True return_rc=True return_stdout=True return_stderr=True\n Should Be Equal As Integers 0 ${rc}\n\nLocal Command Should Work\n [Documentation] Run a command localy, log stdout, fail if RC is not 0, return stdout.\n ... stderr is redirected to the stdout\n [Arguments] ${command}\n ${rc} ${stdout}= Run And Return RC And Output\n ... ${command} 2>&1\n Log ${stdout}\n Should Be Equal As Integers 0 ${rc}\n RETURN ${stdout}\n","name":"\/tmp\/repos\/microshift\/test\/resources\/common.resource","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/common.resource","element_type":"resource","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Setup Suite\n [Documentation] Setup a namespace-less test suite by configuring Kubeconfig\n Check Required Env Variables\n Login MicroShift Host\n Setup Kubeconfig","name":"Setup Suite","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/common.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Check Required Env Variables"} {"code":"Setup Suite With Namespace\n [Documentation] Setup a test suite by creating a unique namespace and configuring Kubeconfig\n Check Required Env Variables\n Login MicroShift Host\n Setup Kubeconfig\n ${ns}= Create Unique Namespace\n Set Suite Variable \\${NAMESPACE} ${ns}","name":"Setup Suite With Namespace","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/common.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Check Required Env Variables"} {"code":"Create Unique Namespace\n [Documentation] Creates a namespace with a unique suffix\n ${rand}= Generate Random String\n ${rand}= Convert To Lower Case ${rand}\n ${ns}= Catenate SEPARATOR=- test ${rand}\n\n Create Namespace ${ns}\n RETURN ${ns}","name":"Create Unique Namespace","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/common.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${rand}= Generate Random String"} {"code":"Teardown Suite\n [Documentation] Teardown the namespace-less test suite by removing the Kubeconfig.\n Remove Kubeconfig\n Login MicroShift Host","name":"Teardown Suite","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/common.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Remove Kubeconfig"} {"code":"Teardown Suite With Namespace\n [Documentation] Teardown the namespaced test suite by removing the namespace and removing the Kubeconfig.\n Remove Namespace ${NAMESPACE}\n Remove Kubeconfig","name":"Teardown Suite With Namespace","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/common.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Remove Namespace ${NAMESPACE}"} {"code":"Check Required Env Variables\n [Documentation] Fail if any of the required environment variables is missing.\n IF \"${USHIFT_HOST}\"==\"${EMPTY}\"\n Fatal Error USHIFT_HOST variable is required\n END\n IF \"${USHIFT_USER}\"==\"${EMPTY}\"\n Fatal Error USHIFT_USER variable is required\n END","name":"Check Required Env Variables","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/common.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"IF \"${USHIFT_HOST}\"==\"${EMPTY}\""} {"code":"Create Random Temp File\n [Documentation] Create a random temp file\n [Arguments] ${content}=\"\"\n ${rand}= Generate Random String\n ${path}= Join Path \/tmp ${rand}\n Create File ${path} ${content}\n RETURN ${path}","name":"Create Random Temp File","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/common.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${content}=\"\""} {"code":"Upload String To File # robocop: disable=too-many-calls-in-keyword\n [Documentation] Write the string to a remote file\n [Arguments] ${content} ${remote_filename}\n ${rand}= Generate Random String\n ${local_tmp}= Join Path \/tmp ${rand}\n Create File ${local_tmp} ${content}\n ${rand}= Generate Random String\n ${remote_tmp}= Join Path \/tmp ${rand}\n Put File ${local_tmp} ${remote_tmp} mode=0644\n Remove File ${local_tmp}\n ${stdout} ${stderr} ${rc}= Execute Command\n ... mv -Z ${remote_tmp} ${remote_filename}\n ... sudo=True return_rc=True return_stdout=True return_stderr=True\n Should Be Equal As Integers 0 ${rc}\n ${stdout} ${stderr} ${rc}= Execute Command\n ... chown root:root ${remote_filename}\n ... sudo=True return_rc=True return_stdout=True return_stderr=True\n Should Be Equal As Integers 0 ${rc}","name":"Upload String To File","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/common.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${content} ${remote_filename}"} {"code":"Verify Remote Directory Exists With Sudo\n [Documentation] Use sudo to verify that the specified directory exists\n [Arguments] ${remote_dir}\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... test -d ${remote_dir}\n ... sudo=True return_rc=True return_stdout=True return_stderr=True\n Should Be Equal As Integers 0 ${rc}","name":"Verify Remote Directory Exists With Sudo","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/common.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${remote_dir}"} {"code":"Verify Remote Directory Does Not Exist With Sudo\n [Documentation] Use sudo to verify that the specified directory does not exist\n [Arguments] ${remote_dir}\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... test -d ${remote_dir}\n ... sudo=True return_rc=True return_stdout=True return_stderr=True\n Should Not Be Equal As Integers 0 ${rc}","name":"Verify Remote Directory Does Not Exist With Sudo","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/common.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${remote_dir}"} {"code":"Verify Remote File Exists With Sudo\n [Documentation] Use sudo to verify that the specified file exists\n [Arguments] ${remote_file}\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... test -f ${remote_file}\n ... sudo=True return_rc=True return_stdout=True return_stderr=True\n Should Be Equal As Integers 0 ${rc}","name":"Verify Remote File Exists With Sudo","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/common.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${remote_file}"} {"code":"Verify Remote File Does Not Exist With Sudo\n [Documentation] Use sudo to verify that the specified file does not exist\n [Arguments] ${remote_file}\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... test -f ${remote_file}\n ... sudo=True return_rc=True return_stdout=True return_stderr=True\n Should Not Be Equal As Integers 0 ${rc}","name":"Verify Remote File Does Not Exist With Sudo","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/common.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${remote_file}"} {"code":"Create Random Temp Directory\n [Documentation] Create a random temp file\n [Arguments] ${root_path}=\/tmp\/certs\n ${rand}= Generate Random String\n ${path}= Join Path ${root_path} ${rand}\n Create Directory ${path}\n RETURN ${path}","name":"Create Random Temp Directory","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/common.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${root_path}=\/tmp\/certs"} {"code":"Create Remote Dir For Path\n [Documentation] Create parent dirname if doesnt exist\n [Arguments] ${file_path}\n ${stdout} ${stderr} ${rc}= Execute Command\n ... mkdir -pZ $(dirname ${file_path})\n ... sudo=True return_rc=True return_stdout=True return_stderr=True\n Should Be Equal As Integers 0 ${rc}","name":"Create Remote Dir For Path","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/common.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${file_path}"} {"code":"Local Command Should Work\n [Documentation] Run a command localy, log stdout, fail if RC is not 0, return stdout.\n ... stderr is redirected to the stdout\n [Arguments] ${command}\n ${rc} ${stdout}= Run And Return RC And Output\n ... ${command} 2>&1\n Log ${stdout}\n Should Be Equal As Integers 0 ${rc}\n RETURN ${stdout}","name":"Local Command Should Work","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/common.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"stderr is redirected to the stdout"} {"code":"*** Settings ***\nDocumentation Keywords for accessing a kubeconfig file for the MicroShift host\n\nLibrary OperatingSystem\nLibrary Process\nLibrary String\nLibrary DataFormats.py\nLibrary libipv6.py\nResource ..\/resources\/microshift-host.resource\nResource ..\/resources\/common.resource\n\n\n*** Variables ***\n${API_PORT} ${EMPTY} # overridden by scenario.sh in CI\n\n\n*** Keywords ***\nGet Kubeconfig\n [Documentation] Get the kubeconfig file from the host argument and return contents\n [Arguments] ${host}\n ${kubeconfig} ${rc}= Execute Command\n ... cat \/var\/lib\/microshift\/resources\/kubeadmin\/${host}\/kubeconfig\n ... sudo=True return_rc=True\n Should Be Equal As Integers ${rc} 0\n Should Not Be Empty ${kubeconfig}\n RETURN ${kubeconfig}\n\nSetup Kubeconfig\n [Documentation] Get the kubeconfig file from the configured $USHIFT_HOST,\n ... update the server URL based on the API_PORT, create a temporary file,\n ... and export it as $KUBECONFIG variable.\n ${kubeconfig}= Get Kubeconfig ${USHIFT_HOST}\n # If we have been given an explicit API port to use, make sure that\n # port appears in the kubeconfig file.\n IF \"${API_PORT}\"!=\"${EMPTY}\"\n ${ip}= Add Brackets If Ipv6 ${USHIFT_HOST}\n ${kubeconfig}= Update Kubeconfig Server Url\n ... ${kubeconfig}\n ... https:\/\/${ip}:${API_PORT}\n END\n ${path}= Create Random Temp File ${kubeconfig}\n Set Suite Variable \\${KUBECONFIG} ${path}\n\nSetup Custom Kubeconfig\n [Documentation] Get the kubeconfig file from the path,\n ... and export it as $KUBECONFIG variable.\n [Arguments] ${custom_path}\n ${kubeconfig}= Get Kubeconfig ${custom_path}\n ${path}= Create Random Temp File ${kubeconfig}\n Set Suite Variable \\${KUBECONFIG} ${path}\n\nRemove Kubeconfig\n [Documentation] Remove kubeconfig ${KUBECONFIG} file.\n Remove File ${KUBECONFIG}\n\nRun With Kubeconfig\n [Documentation] Run a command using KUBECONFIG from the test suite.\n [Arguments] ${cmd} ${allow_fail}=False ${return_rc}=False\n ${stdout_file}= Create Random Temp File\n ${result}= Process.Run Process ${cmd} env:KUBECONFIG=${KUBECONFIG}\n ... stderr=STDOUT shell=True\n ... stdout=${stdout_file}\n\n Log ${result.stdout}\n Log ${result.stderr}\n IF ${allow_fail} == False\n Should Be Equal As Integers ${result.rc} 0\n END\n ${stdout}= OperatingSystem.Get File ${stdout_file}\n ${stdout}= Strip String ${stdout} # strip \\n character at the end\n IF ${return_rc} RETURN ${stdout} ${result.rc}\n RETURN ${stdout}\n\nCreate Namespace\n [Documentation] Creates a namespace with the given name.\n [Arguments] ${ns}\n Run With Kubeconfig oc create namespace ${ns}\n\nCreate Random Namespace\n [Documentation] Creates a namespace with a random name and return the name.\n ${rand}= Generate Random String\n ${rand}= Convert To Lowercase ${rand}\n Run With Kubeconfig oc create namespace test-${rand}\n RETURN test-${rand}\n\nRemove Namespace\n [Documentation] Removes the given namespace.\n [Arguments] ${ns}\n Run With Kubeconfig oc delete namespace ${ns}\n","name":"\/tmp\/repos\/microshift\/test\/resources\/kubeconfig.resource","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/kubeconfig.resource","element_type":"resource","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Get Kubeconfig\n [Documentation] Get the kubeconfig file from the host argument and return contents\n [Arguments] ${host}\n ${kubeconfig} ${rc}= Execute Command\n ... cat \/var\/lib\/microshift\/resources\/kubeadmin\/${host}\/kubeconfig\n ... sudo=True return_rc=True\n Should Be Equal As Integers ${rc} 0\n Should Not Be Empty ${kubeconfig}\n RETURN ${kubeconfig}","name":"Get Kubeconfig","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/kubeconfig.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${host}"} {"code":"Setup Kubeconfig\n [Documentation] Get the kubeconfig file from the configured $USHIFT_HOST,\n ... update the server URL based on the API_PORT, create a temporary file,\n ... and export it as $KUBECONFIG variable.\n ${kubeconfig}= Get Kubeconfig ${USHIFT_HOST}\n # If we have been given an explicit API port to use, make sure that\n # port appears in the kubeconfig file.\n IF \"${API_PORT}\"!=\"${EMPTY}\"\n ${ip}= Add Brackets If Ipv6 ${USHIFT_HOST}\n ${kubeconfig}= Update Kubeconfig Server Url\n ... ${kubeconfig}\n ... https:\/\/${ip}:${API_PORT}\n END\n ${path}= Create Random Temp File ${kubeconfig}\n Set Suite Variable \\${KUBECONFIG} ${path}","name":"Setup Kubeconfig","imports_file_locations":"{'..\/resources\/common.resource': 'test\/resources\/common.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/kubeconfig.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'API_PORT': {'text': '${API_PORT} ${EMPTY} # overridden by scenario.sh in CI'}}","documentation":"update the server URL based on the API_PORT, create a temporary file,\n ... and export it as $KUBECONFIG variable."} {"code":"Setup Custom Kubeconfig\n [Documentation] Get the kubeconfig file from the path,\n ... and export it as $KUBECONFIG variable.\n [Arguments] ${custom_path}\n ${kubeconfig}= Get Kubeconfig ${custom_path}\n ${path}= Create Random Temp File ${kubeconfig}\n Set Suite Variable \\${KUBECONFIG} ${path}","name":"Setup Custom Kubeconfig","imports_file_locations":"{'..\/resources\/common.resource': 'test\/resources\/common.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/kubeconfig.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${custom_path}"} {"code":"Remove Kubeconfig\n [Documentation] Remove kubeconfig ${KUBECONFIG} file.\n Remove File ${KUBECONFIG}","name":"Remove Kubeconfig","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/kubeconfig.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Remove File ${KUBECONFIG}"} {"code":"Run With Kubeconfig\n [Documentation] Run a command using KUBECONFIG from the test suite.\n [Arguments] ${cmd} ${allow_fail}=False ${return_rc}=False\n ${stdout_file}= Create Random Temp File\n ${result}= Process.Run Process ${cmd} env:KUBECONFIG=${KUBECONFIG}\n ... stderr=STDOUT shell=True\n ... stdout=${stdout_file}\n\n Log ${result.stdout}\n Log ${result.stderr}\n IF ${allow_fail} == False\n Should Be Equal As Integers ${result.rc} 0\n END\n ${stdout}= OperatingSystem.Get File ${stdout_file}\n ${stdout}= Strip String ${stdout} # strip \\n character at the end\n IF ${return_rc} RETURN ${stdout} ${result.rc}\n RETURN ${stdout}","name":"Run With Kubeconfig","imports_file_locations":"{'..\/resources\/common.resource': 'test\/resources\/common.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/kubeconfig.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${cmd} ${allow_fail}=False ${return_rc}=False"} {"code":"Create Namespace\n [Documentation] Creates a namespace with the given name.\n [Arguments] ${ns}\n Run With Kubeconfig oc create namespace ${ns}","name":"Create Namespace","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/kubeconfig.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${ns}"} {"code":"Create Random Namespace\n [Documentation] Creates a namespace with a random name and return the name.\n ${rand}= Generate Random String\n ${rand}= Convert To Lowercase ${rand}\n Run With Kubeconfig oc create namespace test-${rand}\n RETURN test-${rand}","name":"Create Random Namespace","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/kubeconfig.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${rand}= Generate Random String"} {"code":"Remove Namespace\n [Documentation] Removes the given namespace.\n [Arguments] ${ns}\n Run With Kubeconfig oc delete namespace ${ns}","name":"Remove Namespace","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/kubeconfig.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${ns}"} {"code":"*** Settings ***\nDocumentation Keywords for interacting with the libvirt host via the virsh command.\n\nLibrary Process\nLibrary String\n\n\n*** Keywords ***\nReboot MicroShift Host\n [Documentation] Reboot the MicroShift host.\n [Arguments] ${vm_name}\n ${result}= Virsh ${vm_name} reboot\n Wait For MicroShift Host To Reboot ${vm_name}\n RETURN ${result}\n\nShutdown MicroShift Host\n [Documentation] Shutdown the MicroShift host.\n [Arguments] ${vm_name}\n ${result}= Virsh ${vm_name} shutdown\n RETURN ${result}\n\nStart MicroShift Host\n [Documentation] Start the MicroShift host.\n [Arguments] ${vm_name}\n ${result}= Virsh ${vm_name} start\n RETURN ${result}\n\nWait For MicroShift Host To Reboot\n [Documentation] Wait for the MicroShift host to reboot.\n [Arguments] ${vm_name} ${timeout}=300\n Wait Until Keyword Succeeds ${timeout}s 5s\n ... MicroShift Host Should Be Running ${vm_name}\n\nMicroShift Host Should Be Running\n [Documentation] Verify that the MicroShift host rebooted successfully.\n [Arguments] ${vm_name}\n ${result}= Virsh ${vm_name} domstate\n ${state}= Strip String ${result.stdout}\n Should Be Equal As Strings ${state} running\n\nMicroShift Host Should Be Shutdown\n [Documentation] Verify that the MicroShift host shutdown successfully.\n [Arguments] ${vm_name}\n ${result}= Virsh ${vm_name} domstate\n ${state}= Strip String ${result.stdout}\n Should Be Equal As Strings ${state} shut off\n\nGet Vnet Devices For MicroShift Host\n [Documentation] Get the vnet device for the MicroShift host.\n [Arguments] ${vm_name}\n ${result}= Virsh ${vm_name} domifaddr\n ${vnet_ifaces}= Get Regexp Matches ${result.stdout} vnet[0-9]+ flags=MULTILINE\n RETURN ${vnet_ifaces}\n\nEnable NIC For MicroShift Host\n [Documentation] Enable the NIC on the MicroShift host.\n ... ${vnet_iface} is the vnet device for the MicroShift host, found via the dom. It can be either name of the\n ... device, i.e. vnet123, or the device's MAC address. It is not the interface name on the host, i.e. eth0.\n [Arguments] ${vm_name} ${vnet_iface}\n ${result}= Virsh ${vm_name} domif-setlink --state\\=up --interface\\=${vnet_iface}\n\nDisable NIC For MicroShift Host\n [Documentation] Disable the NIC on the MicroShift host.\n ... ${vnet_iface} is the vnet device for the MicroShift host, found via the dom. It can be either name of the\n ... device, i.e. vnet123, or the device's MAC address. It is not the interface name on the host, i.e. eth0.\n [Arguments] ${vm_name} ${vnet_iface}\n ${result}= Virsh ${vm_name} domif-setlink --state\\=down --interface\\=${vnet_iface}\n\nGet MicroShift Host NIC State\n [Documentation] Get the state of the NIC on the MicroShift host.\n ... ${vnet_iface} is the vnet device for the MicroShift host, found via the dom. It can be either name of the\n ... device, i.e. vnet123, or the device's MAC address. It is not the interface name on the host, i.e. eth0.\n [Arguments] ${vm_name} ${vnet_iface}\n ${result}= Virsh ${vm_name} domif-getlink --interface\\=${vnet_iface}\n ${state}= Remove String ${result.stdout} ${vnet_iface} \\: \\\"\n ${state}= Strip String ${state}\n RETURN ${state}\n\nMicroShift Host NIC Has State\n [Documentation] Verify that host's NIC has the specified state.\n ... ${state} valid states are 'up' and 'down'.\n ... ${vnet_iface} is the vnet device for the MicroShift host, found via the dom. It can be either name of the\n ... device, i.e. vnet123, or the device's MAC address. It is not the interface name on the host, i.e. eth0.\n [Arguments] ${vm_name} ${vnet_iface} ${state}\n ${state_actual}= Get MicroShift Host NIC State ${vm_name} ${vnet_iface}\n Should Be Equal As Strings ${state_actual} ${state}\n\nVirsh\n [Documentation] Run a virsh command.\n [Arguments] ${domain} ${command_with_args}\n ${result}= Run Process\n ... virsh --connect\\=qemu:\/\/\/system ${command_with_args} --domain\\=${domain}\n ... shell=True\n Log Many ${result.stdout} ${result.stderr}\n Should Be Equal As Integers ${result.rc} 0\n RETURN ${result}\n","name":"\/tmp\/repos\/microshift\/test\/resources\/libvirt.resource","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/libvirt.resource","element_type":"resource","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Reboot MicroShift Host\n [Documentation] Reboot the MicroShift host.\n [Arguments] ${vm_name}\n ${result}= Virsh ${vm_name} reboot\n Wait For MicroShift Host To Reboot ${vm_name}\n RETURN ${result}","name":"Reboot MicroShift Host","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/libvirt.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${vm_name}"} {"code":"Shutdown MicroShift Host\n [Documentation] Shutdown the MicroShift host.\n [Arguments] ${vm_name}\n ${result}= Virsh ${vm_name} shutdown\n RETURN ${result}","name":"Shutdown MicroShift Host","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/libvirt.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${vm_name}"} {"code":"Start MicroShift Host\n [Documentation] Start the MicroShift host.\n [Arguments] ${vm_name}\n ${result}= Virsh ${vm_name} start\n RETURN ${result}","name":"Start MicroShift Host","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/libvirt.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${vm_name}"} {"code":"Wait For MicroShift Host To Reboot\n [Documentation] Wait for the MicroShift host to reboot.\n [Arguments] ${vm_name} ${timeout}=300\n Wait Until Keyword Succeeds ${timeout}s 5s\n ... MicroShift Host Should Be Running ${vm_name}","name":"Wait For MicroShift Host To Reboot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/libvirt.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${vm_name} ${timeout}=300"} {"code":"MicroShift Host Should Be Running\n [Documentation] Verify that the MicroShift host rebooted successfully.\n [Arguments] ${vm_name}\n ${result}= Virsh ${vm_name} domstate\n ${state}= Strip String ${result.stdout}\n Should Be Equal As Strings ${state} running","name":"MicroShift Host Should Be Running","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/libvirt.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${vm_name}"} {"code":"MicroShift Host Should Be Shutdown\n [Documentation] Verify that the MicroShift host shutdown successfully.\n [Arguments] ${vm_name}\n ${result}= Virsh ${vm_name} domstate\n ${state}= Strip String ${result.stdout}\n Should Be Equal As Strings ${state} shut off","name":"MicroShift Host Should Be Shutdown","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/libvirt.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${vm_name}"} {"code":"Get Vnet Devices For MicroShift Host\n [Documentation] Get the vnet device for the MicroShift host.\n [Arguments] ${vm_name}\n ${result}= Virsh ${vm_name} domifaddr\n ${vnet_ifaces}= Get Regexp Matches ${result.stdout} vnet[0-9]+ flags=MULTILINE\n RETURN ${vnet_ifaces}","name":"Get Vnet Devices For MicroShift Host","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/libvirt.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${vm_name}"} {"code":"Enable NIC For MicroShift Host\n [Documentation] Enable the NIC on the MicroShift host.\n ... ${vnet_iface} is the vnet device for the MicroShift host, found via the dom. It can be either name of the\n ... device, i.e. vnet123, or the device's MAC address. It is not the interface name on the host, i.e. eth0.\n [Arguments] ${vm_name} ${vnet_iface}\n ${result}= Virsh ${vm_name} domif-setlink --state\\=up --interface\\=${vnet_iface}","name":"Enable NIC For MicroShift Host","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/libvirt.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${vm_name} ${vnet_iface}"} {"code":"Disable NIC For MicroShift Host\n [Documentation] Disable the NIC on the MicroShift host.\n ... ${vnet_iface} is the vnet device for the MicroShift host, found via the dom. It can be either name of the\n ... device, i.e. vnet123, or the device's MAC address. It is not the interface name on the host, i.e. eth0.\n [Arguments] ${vm_name} ${vnet_iface}\n ${result}= Virsh ${vm_name} domif-setlink --state\\=down --interface\\=${vnet_iface}","name":"Disable NIC For MicroShift Host","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/libvirt.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${vm_name} ${vnet_iface}"} {"code":"Get MicroShift Host NIC State\n [Documentation] Get the state of the NIC on the MicroShift host.\n ... ${vnet_iface} is the vnet device for the MicroShift host, found via the dom. It can be either name of the\n ... device, i.e. vnet123, or the device's MAC address. It is not the interface name on the host, i.e. eth0.\n [Arguments] ${vm_name} ${vnet_iface}\n ${result}= Virsh ${vm_name} domif-getlink --interface\\=${vnet_iface}\n ${state}= Remove String ${result.stdout} ${vnet_iface} \\: \\\"\n ${state}= Strip String ${state}\n RETURN ${state}","name":"Get MicroShift Host NIC State","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/libvirt.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${vm_name} ${vnet_iface}"} {"code":"MicroShift Host NIC Has State\n [Documentation] Verify that host's NIC has the specified state.\n ... ${state} valid states are 'up' and 'down'.\n ... ${vnet_iface} is the vnet device for the MicroShift host, found via the dom. It can be either name of the\n ... device, i.e. vnet123, or the device's MAC address. It is not the interface name on the host, i.e. eth0.\n [Arguments] ${vm_name} ${vnet_iface} ${state}\n ${state_actual}= Get MicroShift Host NIC State ${vm_name} ${vnet_iface}\n Should Be Equal As Strings ${state_actual} ${state}","name":"MicroShift Host NIC Has State","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/libvirt.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${vm_name} ${vnet_iface} ${state}"} {"code":"Virsh\n [Documentation] Run a virsh command.\n [Arguments] ${domain} ${command_with_args}\n ${result}= Run Process\n ... virsh --connect\\=qemu:\/\/\/system ${command_with_args} --domain\\=${domain}\n ... shell=True\n Log Many ${result.stdout} ${result.stderr}\n Should Be Equal As Integers ${result.rc} 0\n RETURN ${result}","name":"Virsh","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/libvirt.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${domain} ${command_with_args}"} {"code":"*** Settings ***\nDocumentation Keywords for running the microshift command line.\n\nLibrary Process\nLibrary String\nLibrary OperatingSystem\nLibrary SSHLibrary\nLibrary DataFormats.py\nResource common.resource\n\n\n*** Variables ***\n${LVMD_VG_OVERRIDE}= ${EMPTY}\n\n\n*** Keywords ***\nSave Default MicroShift Config\n [Documentation] Fetch the current config settings and preserve them as the default\n ...\n ... Sets the suite variable DEFAULT_MICROSHIFT_CONFIG to the text value\n ... based on the contents of \/etc\/microshift\/config.yaml, if it exists, or\n ... an empty string if the file does not exist.\n ...\n ... This keyword is meant to be used from a Setup step.\n ${stdout} ${rc}= Execute Command\n ... cat \/etc\/microshift\/config.yaml\n ... sudo=True return_rc=True\n IF ${rc} == 0\n Set Suite Variable \\${DEFAULT_MICROSHIFT_CONFIG} ${stdout}\n ELSE\n Set Suite Variable \\${DEFAULT_MICROSHIFT_CONFIG} ${EMPTY}\n END\n\nRestore Default MicroShift Config\n [Documentation] Replace the microshift config file with the original defaults.\n ...\n ... If there was no configuration file originally, delete any file that is there now.\n ${len}= Get Length ${DEFAULT_MICROSHIFT_CONFIG}\n IF ${len} == 0\n # If there was no configuration file to start with, we do not want to create\n # a new one, even if it is empty.\n Clear MicroShift Config\n ELSE\n Upload MicroShift Config ${DEFAULT_MICROSHIFT_CONFIG}\n END\n\nExtend MicroShift Config\n [Documentation] Return combination of default config and input argument as a string.\n ...\n ... The values are parsed as YAML and merged additively (no keys are deleted\n ... and list values are extended but not replaced) by 'Yaml Merge'.\n [Arguments] ${config}\n ${merged}= Yaml Merge ${DEFAULT_MICROSHIFT_CONFIG} ${config}\n RETURN ${merged}\n\nReplace MicroShift Config\n [Documentation] Return a replacement of the input argument in the default config\n ... as a string.\n [Arguments] ${config}\n ${replaced}= Yaml Replace ${DEFAULT_MICROSHIFT_CONFIG} ${config}\n RETURN ${replaced}\n\nClear MicroShift Config\n [Documentation] Remove any configuration file\n ${stdout} ${rc}= Execute Command\n ... rm -f \/etc\/microshift\/config.yaml\n ... sudo=True return_rc=True\n\nUpload MicroShift Config\n [Documentation] Upload a new configuration file to the MicroShift host\n [Arguments] ${config_content}\n Upload String To File ${config_content} \/etc\/microshift\/config.yaml\n\nDrop In MicroShift Config\n [Documentation] Upload a drop-in configuration file to the MicroShift host\n [Arguments] ${config_content} ${name}\n Upload String To File ${config_content} \/etc\/microshift\/config.d\/${name}.yaml\n\nRemove Drop In MicroShift Config\n [Documentation] Remove a drop-in configuration file from MicroShift host\n [Arguments] ${name}\n ${stdout} ${rc}= Execute Command\n ... rm -f \/etc\/microshift\/config.d\/${name}.yaml\n ... sudo=True return_rc=True\n\nSave Lvmd Config\n [Documentation] If an lvmd.yaml file already exists, preserver it\n ${stdout} ${rc}= Execute Command\n ... cat \/etc\/microshift\/lvmd.yaml\n ... sudo=True return_rc=True\n IF ${rc} == 0\n Set Suite Variable \\${DEFAULT_LVMD_CONFIG} ${stdout}\n ELSE\n Set Suite Variable \\${DEFAULT_LVMD_CONFIG} ${EMPTY}\n END\n\nExtend Lvmd Config\n [Documentation] Combines the test's device-classes with the remote's lvmd.yaml.\n ${cfg}= OperatingSystem.Get File .\/assets\/storage\/lvmd.yaml\n ${lvmd_vg}= Set Variable If '${LVMD_VG_OVERRIDE}' != '' ${LVMD_VG_OVERRIDE} rhel\n ${templated}= Replace Variables ${cfg}\n ${merged_cfg}= Lvmd Merge ${DEFAULT_LVMD_CONFIG} ${templated}\n RETURN ${merged_cfg}\n\nRestore Lvmd Config\n [Documentation] Replace the lvmd config file with the original defaults.\n ${len}= Get Length ${DEFAULT_LVMD_CONFIG}\n IF ${len} == 0\n Clear Lvmd Config\n ELSE\n Upload Lvmd Config ${DEFAULT_LVMD_CONFIG}\n END\n\nUpload Lvmd Config\n [Documentation] Upload a test's lvmd.yaml file to the MicroShift host\n [Arguments] ${config_content}\n Upload String To File ${config_content} \/etc\/microshift\/lvmd.yaml\n\nClear Lvmd Config\n [Documentation] Removes the LVMD configuration as part of restoring test environment\n ${stderr} ${rc}= sshLibrary.Execute Command rm -f \/etc\/microshift\/lvmd.yaml\n ... sudo=True return_rc=True return_stderr=True return_stdout=False\n Log ${stderr}\n Should Be Equal As Integers 0 ${rc}\n\nShow Config\n [Documentation] Run microshift show-config with ${mode}\n [Arguments] ${mode}\n ${output} ${rc}= Execute Command\n ... microshift show-config --mode ${mode}\n ... sudo=True return_rc=True\n Should Be Equal As Integers 0 ${rc}\n ${yaml_data}= Yaml Parse ${output}\n RETURN ${yaml_data}\n","name":"\/tmp\/repos\/microshift\/test\/resources\/microshift-config.resource","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-config.resource","element_type":"resource","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Save Default MicroShift Config\n [Documentation] Fetch the current config settings and preserve them as the default\n ...\n ... Sets the suite variable DEFAULT_MICROSHIFT_CONFIG to the text value\n ... based on the contents of \/etc\/microshift\/config.yaml, if it exists, or\n ... an empty string if the file does not exist.\n ...\n ... This keyword is meant to be used from a Setup step.\n ${stdout} ${rc}= Execute Command\n ... cat \/etc\/microshift\/config.yaml\n ... sudo=True return_rc=True\n IF ${rc} == 0\n Set Suite Variable \\${DEFAULT_MICROSHIFT_CONFIG} ${stdout}\n ELSE\n Set Suite Variable \\${DEFAULT_MICROSHIFT_CONFIG} ${EMPTY}\n END","name":"Save Default MicroShift Config","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-config.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${stdout} ${rc}= Execute Command\n ... cat \/etc\/microshift\/config.yaml"} {"code":"Restore Default MicroShift Config\n [Documentation] Replace the microshift config file with the original defaults.\n ...\n ... If there was no configuration file originally, delete any file that is there now.\n ${len}= Get Length ${DEFAULT_MICROSHIFT_CONFIG}\n IF ${len} == 0\n # If there was no configuration file to start with, we do not want to create\n # a new one, even if it is empty.\n Clear MicroShift Config\n ELSE\n Upload MicroShift Config ${DEFAULT_MICROSHIFT_CONFIG}\n END","name":"Restore Default MicroShift Config","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-config.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"If there was no configuration file originally, delete any file that is there now."} {"code":"Extend MicroShift Config\n [Documentation] Return combination of default config and input argument as a string.\n ...\n ... The values are parsed as YAML and merged additively (no keys are deleted\n ... and list values are extended but not replaced) by 'Yaml Merge'.\n [Arguments] ${config}\n ${merged}= Yaml Merge ${DEFAULT_MICROSHIFT_CONFIG} ${config}\n RETURN ${merged}","name":"Extend MicroShift Config","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-config.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${config}"} {"code":"Replace MicroShift Config\n [Documentation] Return a replacement of the input argument in the default config\n ... as a string.\n [Arguments] ${config}\n ${replaced}= Yaml Replace ${DEFAULT_MICROSHIFT_CONFIG} ${config}\n RETURN ${replaced}","name":"Replace MicroShift Config","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-config.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${config}"} {"code":"Clear MicroShift Config\n [Documentation] Remove any configuration file\n ${stdout} ${rc}= Execute Command\n ... rm -f \/etc\/microshift\/config.yaml\n ... sudo=True return_rc=True","name":"Clear MicroShift Config","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-config.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${stdout} ${rc}= Execute Command\n ... rm -f \/etc\/microshift\/config.yaml\n ... sudo=True return_rc=True"} {"code":"Upload MicroShift Config\n [Documentation] Upload a new configuration file to the MicroShift host\n [Arguments] ${config_content}\n Upload String To File ${config_content} \/etc\/microshift\/config.yaml","name":"Upload MicroShift Config","imports_file_locations":"{'common.resource': 'test\/resources\/common.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-config.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${config_content}"} {"code":"Drop In MicroShift Config\n [Documentation] Upload a drop-in configuration file to the MicroShift host\n [Arguments] ${config_content} ${name}\n Upload String To File ${config_content} \/etc\/microshift\/config.d\/${name}.yaml","name":"Drop In MicroShift Config","imports_file_locations":"{'common.resource': 'test\/resources\/common.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-config.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${config_content} ${name}"} {"code":"Remove Drop In MicroShift Config\n [Documentation] Remove a drop-in configuration file from MicroShift host\n [Arguments] ${name}\n ${stdout} ${rc}= Execute Command\n ... rm -f \/etc\/microshift\/config.d\/${name}.yaml\n ... sudo=True return_rc=True","name":"Remove Drop In MicroShift Config","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-config.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${name}"} {"code":"Save Lvmd Config\n [Documentation] If an lvmd.yaml file already exists, preserver it\n ${stdout} ${rc}= Execute Command\n ... cat \/etc\/microshift\/lvmd.yaml\n ... sudo=True return_rc=True\n IF ${rc} == 0\n Set Suite Variable \\${DEFAULT_LVMD_CONFIG} ${stdout}\n ELSE\n Set Suite Variable \\${DEFAULT_LVMD_CONFIG} ${EMPTY}\n END","name":"Save Lvmd Config","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-config.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${stdout} ${rc}= Execute Command\n ... cat \/etc\/microshift\/lvmd.yaml\n ... sudo=True return_rc=True"} {"code":"Extend Lvmd Config\n [Documentation] Combines the test's device-classes with the remote's lvmd.yaml.\n ${cfg}= OperatingSystem.Get File .\/assets\/storage\/lvmd.yaml\n ${lvmd_vg}= Set Variable If '${LVMD_VG_OVERRIDE}' != '' ${LVMD_VG_OVERRIDE} rhel\n ${templated}= Replace Variables ${cfg}\n ${merged_cfg}= Lvmd Merge ${DEFAULT_LVMD_CONFIG} ${templated}\n RETURN ${merged_cfg}","name":"Extend Lvmd Config","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-config.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'LVMD_VG_OVERRIDE': {'text': '${LVMD_VG_OVERRIDE}= ${EMPTY}'}}","documentation":"${cfg}= OperatingSystem.Get File .\/assets\/storage\/lvmd.yaml"} {"code":"Restore Lvmd Config\n [Documentation] Replace the lvmd config file with the original defaults.\n ${len}= Get Length ${DEFAULT_LVMD_CONFIG}\n IF ${len} == 0\n Clear Lvmd Config\n ELSE\n Upload Lvmd Config ${DEFAULT_LVMD_CONFIG}\n END","name":"Restore Lvmd Config","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-config.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${len}= Get Length ${DEFAULT_LVMD_CONFIG}"} {"code":"Upload Lvmd Config\n [Documentation] Upload a test's lvmd.yaml file to the MicroShift host\n [Arguments] ${config_content}\n Upload String To File ${config_content} \/etc\/microshift\/lvmd.yaml","name":"Upload Lvmd Config","imports_file_locations":"{'common.resource': 'test\/resources\/common.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-config.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${config_content}"} {"code":"Clear Lvmd Config\n [Documentation] Removes the LVMD configuration as part of restoring test environment\n ${stderr} ${rc}= sshLibrary.Execute Command rm -f \/etc\/microshift\/lvmd.yaml\n ... sudo=True return_rc=True return_stderr=True return_stdout=False\n Log ${stderr}\n Should Be Equal As Integers 0 ${rc}","name":"Clear Lvmd Config","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-config.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${stderr} ${rc}= sshLibrary.Execute Command rm -f \/etc\/microshift\/lvmd.yaml\n ... sudo=True return_rc=True return_stderr=True return_stdout=False"} {"code":"Show Config\n [Documentation] Run microshift show-config with ${mode}\n [Arguments] ${mode}\n ${output} ${rc}= Execute Command\n ... microshift show-config --mode ${mode}\n ... sudo=True return_rc=True\n Should Be Equal As Integers 0 ${rc}\n ${yaml_data}= Yaml Parse ${output}\n RETURN ${yaml_data}","name":"Show Config","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-config.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${mode}"} {"code":"*** Settings ***\nDocumentation Keywords for running the microshift-etcd command line.\n\nLibrary Process\nLibrary String\nLibrary OperatingSystem\nLibrary SSHLibrary\nResource oc.resource\nResource systemd.resource\nLibrary DataFormats.py\n\n\n*** Keywords ***\nMicroShift Etcd Process ID\n [Documentation] Return the current MicroShift Etcd process ID\n ${stdout} ${stderr} ${rc}= Execute Command\n ... pidof microshift-etcd\n ... return_stdout=True return_stderr=True return_rc=True\n Log ${stderr}\n RETURN ${stdout}\n\nMicroShift Etcd Process ID Changed\n [Documentation] Compare the specified and current MicroShift Etcd process ID\n [Arguments] ${old_pid}\n ${cur_pid}= MicroShift Etcd Process ID\n Should Not Be Equal ${cur_pid} ${old_pid}\n\nWait Until MicroShift Etcd Process ID Changes\n [Documentation] Wait until the current MicroShift Etcd process ID changes\n [Arguments] ${old_pid}\n\n Wait Until Keyword Succeeds 30x 10s\n ... MicroShift Etcd Process ID Changed ${old_pid}\n","name":"\/tmp\/repos\/microshift\/test\/resources\/microshift-etcd-process.resource","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-etcd-process.resource","element_type":"resource","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"MicroShift Etcd Process ID\n [Documentation] Return the current MicroShift Etcd process ID\n ${stdout} ${stderr} ${rc}= Execute Command\n ... pidof microshift-etcd\n ... return_stdout=True return_stderr=True return_rc=True\n Log ${stderr}\n RETURN ${stdout}","name":"MicroShift Etcd Process ID","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-etcd-process.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${stdout} ${stderr} ${rc}= Execute Command\n ... pidof microshift-etcd\n ... return_stdout=True return_stderr=True return_rc=True"} {"code":"MicroShift Etcd Process ID Changed\n [Documentation] Compare the specified and current MicroShift Etcd process ID\n [Arguments] ${old_pid}\n ${cur_pid}= MicroShift Etcd Process ID\n Should Not Be Equal ${cur_pid} ${old_pid}","name":"MicroShift Etcd Process ID Changed","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-etcd-process.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${old_pid}"} {"code":"Wait Until MicroShift Etcd Process ID Changes\n [Documentation] Wait until the current MicroShift Etcd process ID changes\n [Arguments] ${old_pid}\n\n Wait Until Keyword Succeeds 30x 10s\n ... MicroShift Etcd Process ID Changed ${old_pid}","name":"Wait Until MicroShift Etcd Process ID Changes","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-etcd-process.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${old_pid}"} {"code":"*** Settings ***\nDocumentation Keywords for working with the MicroShift host\n\nLibrary OperatingSystem\nLibrary SSHLibrary\nLibrary libostree.py\n\n\n*** Keywords ***\nLogin MicroShift Host\n [Documentation] Login to the MicroShift host via ssh and leave the connection open\n ...\n ... This keyword is meant to be used at the suite level. This ensures\n ... most tests already have an open connection. Any tests that will take\n ... action that disrupt that connection are responsible for restoring it.\n\n Log Host: ${USHIFT_HOST}\n IF '${SSH_PORT}'\n SSHLibrary.Open Connection ${USHIFT_HOST} port=${SSH_PORT}\n ELSE\n SSHLibrary.Open Connection ${USHIFT_HOST}\n END\n # If there is an ssh key set in the global configuration, use that to\n # login to the host. Otherwise assume that the ssh agent is running\n # and configured properly.\n IF '${SSH_PRIV_KEY}'\n SSHLibrary.Login With Public Key ${USHIFT_USER} ${SSH_PRIV_KEY} keep_alive_interval=30\n ELSE\n SSHLibrary.Login ${USHIFT_USER} allow_agent=True keep_alive_interval=30\n END\n\nLogout MicroShift Host\n [Documentation] Close the open ssh connection to the MicroShift host\n SSHLibrary.Close Connection\n\nMake New SSH Connection\n [Documentation] Closes all SSH connections and makes a new one.\n # Staging deployments potentially introduces multiple reboots\n # which could break existing SSH connection\n\n Logout MicroShift Host\n Login MicroShift Host\n\nSSH Connection To MicroShift Host Should Be Functional\n [Documentation] Creates new SSH connection and checks if is working\n Make New SSH Connection\n ${rc}= SSHLibrary.Execute Command true return_stdout=False return_rc=True\n Should Be Equal As Integers 0 ${rc}\n\nReboot MicroShift Host\n [Documentation] Reboot the MicroShift host and wait until\n ... SSH connection is working again and boot identifier changes\n ...\n ... Expects that initial SSH connection to MicroShift host is active.\n\n ${bootid}= Get Current Boot Id\n SSHLibrary.Start Command reboot sudo=True\n Sleep 30s\n\n Wait Until Keyword Succeeds 5m 15s\n ... System Should Be Rebooted ${bootid}\n\nCreate Thin Storage Pool\n [Documentation] Create a new thin storage pool\n ${lvmd_vg}= Set Variable If '${LVMD_VG_OVERRIDE}' != '' ${LVMD_VG_OVERRIDE} rhel\n ${stderr} ${rc}= SSHLibrary.Execute Command lvcreate --size 2G --thin \/dev\/${lvmd_vg} --name thin\n ... sudo=True return_rc=True return_stderr=True return_stdout=False\n Log ${stderr}\n Should Be Equal As Integers 0 ${rc}\n\nDelete Thin Storage Pool\n [Documentation] Delete the thin storage pool as part of restoring test env\n ${lvmd_vg}= Set Variable If '${LVMD_VG_OVERRIDE}' != '' ${LVMD_VG_OVERRIDE} rhel\n ${stderr} ${rc}= SSHLibrary.Execute Command lvremove -y ${lvmd_vg}\/thin\n ... sudo=True return_rc=True return_stderr=True return_stdout=False\n Log ${stderr}\n Should Be Equal As Integers 0 ${rc}\n\nIs System Bootc\n [Documentation] Returns true if system is bootc-based.\n\n ${stdout} ${stderr} ${rc}= SSHLibrary.Execute Command\n ... bootc status --booted --json\n ... sudo=True return_stderr=True return_stdout=True return_rc=True\n IF ${rc} != 0 RETURN ${FALSE}\n\n ${json_status}= Json Parse ${stdout}\n ${bootc_type}= Set Variable ${json_status}[status][type]\n IF '${bootc_type}' == 'bootcHost'\n RETURN ${TRUE}\n ELSE\n RETURN ${FALSE}\n END\n\nIs System OSTree\n [Documentation] Returns true if system is ostree-based.\n\n ${rc}= Execute Command stat \/run\/ostree-booted\n ... sudo=True return_stderr=False return_stdout=False return_rc=True\n IF ${rc} == 0 RETURN ${TRUE} ELSE RETURN ${FALSE}\n\nSystem Should Be Rebooted\n [Documentation] Assert if the system rebooted comparing the current and provided boot identifier\n [Arguments] ${old_bootid}\n ${rebooted}= Is System Rebooted ${old_bootid}\n Should Be True ${rebooted}\n\nIs System Rebooted\n [Documentation] Check if the system rebooted comparing the current and provided boot identifier\n [Arguments] ${old_bootid}\n\n Make New SSH Connection\n ${cur_bootid}= Get Current Boot Id\n ${len}= Get Length ${cur_bootid}\n IF ${len} == 0\n RETURN False\n ELSE\n ${system_rebooted}= Evaluate '${old_bootid}' != '${cur_bootid}'\n RETURN ${system_rebooted}\n END\n\nChange Hostname\n [Documentation] Changes hostname to the argument. Returns old hostname\n [Arguments] ${hostname}\n\n ${old_hostname} ${stderr} ${rc}= SSHLibrary.Execute Command hostname\n ... sudo=True return_rc=True return_stdout=True return_stderr=True\n Log ${stderr}\n Should Be Equal As Integers 0 ${rc}\n\n ${stderr} ${rc}= SSHLibrary.Execute Command hostnamectl hostname ${hostname}\n ... sudo=True return_rc=True return_stderr=True return_stdout=False\n Log ${stderr}\n Should Be Equal As Integers 0 ${rc}\n\n RETURN ${old_hostname}\n\nCommand Should Work\n [Documentation] Run a command remotely, log stderr, fail if RC is not 0, return stdout\n [Arguments] ${command}\n ${stdout} ${stderr} ${rc}= SSHLibrary.Execute Command\n ... ${command}\n ... sudo=True\n ... return_rc=True\n ... return_stderr=True\n ... return_stdout=True\n Log ${stderr}\n Should Be Equal As Integers 0 ${rc}\n RETURN ${stdout}\n\nCommand Should Fail\n [Documentation] Run a command remotely, expect command to fail\n [Arguments] ${command}\n ${stdout} ${stderr} ${rc}= SSHLibrary.Execute Command\n ... ${command}\n ... sudo=True\n ... return_rc=True\n ... return_stderr=True\n ... return_stdout=True\n Should Not Be Equal As Integers 0 ${rc}\n","name":"\/tmp\/repos\/microshift\/test\/resources\/microshift-host.resource","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-host.resource","element_type":"resource","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Login MicroShift Host\n [Documentation] Login to the MicroShift host via ssh and leave the connection open\n ...\n ... This keyword is meant to be used at the suite level. This ensures\n ... most tests already have an open connection. Any tests that will take\n ... action that disrupt that connection are responsible for restoring it.\n\n Log Host: ${USHIFT_HOST}\n IF '${SSH_PORT}'\n SSHLibrary.Open Connection ${USHIFT_HOST} port=${SSH_PORT}\n ELSE\n SSHLibrary.Open Connection ${USHIFT_HOST}\n END\n # If there is an ssh key set in the global configuration, use that to\n # login to the host. Otherwise assume that the ssh agent is running\n # and configured properly.\n IF '${SSH_PRIV_KEY}'\n SSHLibrary.Login With Public Key ${USHIFT_USER} ${SSH_PRIV_KEY} keep_alive_interval=30\n ELSE\n SSHLibrary.Login ${USHIFT_USER} allow_agent=True keep_alive_interval=30\n END","name":"Login MicroShift Host","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-host.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"most tests already have an open connection. Any tests that will take\n ... action that disrupt that connection are responsible for restoring it."} {"code":"Logout MicroShift Host\n [Documentation] Close the open ssh connection to the MicroShift host\n SSHLibrary.Close Connection","name":"Logout MicroShift Host","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-host.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"SSHLibrary.Close Connection"} {"code":"Make New SSH Connection\n [Documentation] Closes all SSH connections and makes a new one.\n # Staging deployments potentially introduces multiple reboots\n # which could break existing SSH connection\n\n Logout MicroShift Host\n Login MicroShift Host","name":"Make New SSH Connection","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-host.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Closes all SSH connections and makes a new one."} {"code":"SSH Connection To MicroShift Host Should Be Functional\n [Documentation] Creates new SSH connection and checks if is working\n Make New SSH Connection\n ${rc}= SSHLibrary.Execute Command true return_stdout=False return_rc=True\n Should Be Equal As Integers 0 ${rc}","name":"SSH Connection To MicroShift Host Should Be Functional","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-host.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Make New SSH Connection"} {"code":"Reboot MicroShift Host\n [Documentation] Reboot the MicroShift host and wait until\n ... SSH connection is working again and boot identifier changes\n ...\n ... Expects that initial SSH connection to MicroShift host is active.\n\n ${bootid}= Get Current Boot Id\n SSHLibrary.Start Command reboot sudo=True\n Sleep 30s\n\n Wait Until Keyword Succeeds 5m 15s\n ... System Should Be Rebooted ${bootid}","name":"Reboot MicroShift Host","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-host.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Expects that initial SSH connection to MicroShift host is active."} {"code":"Create Thin Storage Pool\n [Documentation] Create a new thin storage pool\n ${lvmd_vg}= Set Variable If '${LVMD_VG_OVERRIDE}' != '' ${LVMD_VG_OVERRIDE} rhel\n ${stderr} ${rc}= SSHLibrary.Execute Command lvcreate --size 2G --thin \/dev\/${lvmd_vg} --name thin\n ... sudo=True return_rc=True return_stderr=True return_stdout=False\n Log ${stderr}\n Should Be Equal As Integers 0 ${rc}","name":"Create Thin Storage Pool","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-host.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${lvmd_vg}= Set Variable If '${LVMD_VG_OVERRIDE}' != '' ${LVMD_VG_OVERRIDE} rhel"} {"code":"Delete Thin Storage Pool\n [Documentation] Delete the thin storage pool as part of restoring test env\n ${lvmd_vg}= Set Variable If '${LVMD_VG_OVERRIDE}' != '' ${LVMD_VG_OVERRIDE} rhel\n ${stderr} ${rc}= SSHLibrary.Execute Command lvremove -y ${lvmd_vg}\/thin\n ... sudo=True return_rc=True return_stderr=True return_stdout=False\n Log ${stderr}\n Should Be Equal As Integers 0 ${rc}","name":"Delete Thin Storage Pool","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-host.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${lvmd_vg}= Set Variable If '${LVMD_VG_OVERRIDE}' != '' ${LVMD_VG_OVERRIDE} rhel"} {"code":"Is System Bootc\n [Documentation] Returns true if system is bootc-based.\n\n ${stdout} ${stderr} ${rc}= SSHLibrary.Execute Command\n ... bootc status --booted --json\n ... sudo=True return_stderr=True return_stdout=True return_rc=True\n IF ${rc} != 0 RETURN ${FALSE}\n\n ${json_status}= Json Parse ${stdout}\n ${bootc_type}= Set Variable ${json_status}[status][type]\n IF '${bootc_type}' == 'bootcHost'\n RETURN ${TRUE}\n ELSE\n RETURN ${FALSE}\n END","name":"Is System Bootc","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-host.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${stdout} ${stderr} ${rc}= SSHLibrary.Execute Command\n ... bootc status --booted --json\n ... sudo=True return_stderr=True return_stdout=True return_rc=True"} {"code":"Is System OSTree\n [Documentation] Returns true if system is ostree-based.\n\n ${rc}= Execute Command stat \/run\/ostree-booted\n ... sudo=True return_stderr=False return_stdout=False return_rc=True\n IF ${rc} == 0 RETURN ${TRUE} ELSE RETURN ${FALSE}","name":"Is System OSTree","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-host.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${rc}= Execute Command stat \/run\/ostree-booted\n ... sudo=True return_stderr=False return_stdout=False return_rc=True"} {"code":"System Should Be Rebooted\n [Documentation] Assert if the system rebooted comparing the current and provided boot identifier\n [Arguments] ${old_bootid}\n ${rebooted}= Is System Rebooted ${old_bootid}\n Should Be True ${rebooted}","name":"System Should Be Rebooted","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-host.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${old_bootid}"} {"code":"Is System Rebooted\n [Documentation] Check if the system rebooted comparing the current and provided boot identifier\n [Arguments] ${old_bootid}\n\n Make New SSH Connection\n ${cur_bootid}= Get Current Boot Id\n ${len}= Get Length ${cur_bootid}\n IF ${len} == 0\n RETURN False\n ELSE\n ${system_rebooted}= Evaluate '${old_bootid}' != '${cur_bootid}'\n RETURN ${system_rebooted}\n END","name":"Is System Rebooted","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-host.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${old_bootid}"} {"code":"Change Hostname\n [Documentation] Changes hostname to the argument. Returns old hostname\n [Arguments] ${hostname}\n\n ${old_hostname} ${stderr} ${rc}= SSHLibrary.Execute Command hostname\n ... sudo=True return_rc=True return_stdout=True return_stderr=True\n Log ${stderr}\n Should Be Equal As Integers 0 ${rc}\n\n ${stderr} ${rc}= SSHLibrary.Execute Command hostnamectl hostname ${hostname}\n ... sudo=True return_rc=True return_stderr=True return_stdout=False\n Log ${stderr}\n Should Be Equal As Integers 0 ${rc}\n\n RETURN ${old_hostname}","name":"Change Hostname","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-host.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${hostname}"} {"code":"Command Should Work\n [Documentation] Run a command remotely, log stderr, fail if RC is not 0, return stdout\n [Arguments] ${command}\n ${stdout} ${stderr} ${rc}= SSHLibrary.Execute Command\n ... ${command}\n ... sudo=True\n ... return_rc=True\n ... return_stderr=True\n ... return_stdout=True\n Log ${stderr}\n Should Be Equal As Integers 0 ${rc}\n RETURN ${stdout}","name":"Command Should Work","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-host.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${command}"} {"code":"Command Should Fail\n [Documentation] Run a command remotely, expect command to fail\n [Arguments] ${command}\n ${stdout} ${stderr} ${rc}= SSHLibrary.Execute Command\n ... ${command}\n ... sudo=True\n ... return_rc=True\n ... return_stderr=True\n ... return_stdout=True\n Should Not Be Equal As Integers 0 ${rc}","name":"Command Should Fail","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-host.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${command}"} {"code":"*** Settings ***\nDocumentation Keywords for testing the MicroShift network\n\nLibrary Process\nLibrary SSHLibrary\nLibrary libipv6.py\nResource oc.resource\nResource common.resource\n\n\n*** Variables ***\n${HELLO_USHIFT} .\/assets\/hello\/hello-microshift.yaml\n${LB_PORT} 5678\n${NP_PORT} 32222\n${HTTP_PORT} 80\n${HTTPS_PORT} 443\n\n\n*** Keywords ***\nCreate Hello MicroShift Pod\n [Documentation] Create a pod running the \"hello microshift\" application\n [Arguments] ${ns}=${NAMESPACE}\n Oc Create -f ${HELLO_USHIFT} -n ${ns}\n Labeled Pod Should Be Ready app\\=hello-microshift timeout=120s ns=${ns}\n\nExpose Hello MicroShift\n [Documentation] Expose the \"hello microshift\" application via cluster ip service\n [Arguments] ${ns}=${NAMESPACE}\n Run With Kubeconfig oc expose pod hello-microshift -n ${ns}\n\nExpose Hello MicroShift Pod Via LB\n [Documentation] Expose the \"hello microshift\" application through the load balancer\n Run With Kubeconfig oc create service loadbalancer hello-microshift --tcp=${LB_PORT}:8080 -n ${NAMESPACE}\n\nExpose Hello MicroShift Pod Via NodePort\n [Documentation] Expose the \"hello microshift\" application through the NodePort\n Run With Kubeconfig\n ... oc create service nodeport hello-microshift --node-port=${NP_PORT} --tcp=8080 -n ${NAMESPACE}\n\nAccess Hello Microshift\n [Documentation] Use curl to make a GET request to the specified scheme, host, port and path.\n ... Use hello-microshift as authority and swap it with --connect-to option.\n ... Returns all output and return code.\n ... Times out after 15s.\n [Arguments]\n ... ${ushift_port}\n ... ${ushift_ip}=${USHIFT_HOST}\n ... ${path}=${EMPTY}\n ... ${scheme}=http\n ... ${hostname}=hello-microshift.cluster.local\n\n ${ip}= Add Brackets If Ipv6 ${ushift_ip}\n\n ${connect_to}= Set Variable \"${hostname}::${ip}:\"\n ${url_path}= Set Variable \"${scheme}:\/\/${hostname}:${ushift_port}${path}\"\n\n ${result}= Run Process\n ... curl -k -i ${url_path} --connect-to ${connect_to}\n ... shell=True\n ... timeout=15s\n RETURN ${result.rc} ${result.stdout} ${result.stderr}\n\nAccess Hello MicroShift Success\n [Documentation] Expect 200 OK when accessing \"hello microshift\" through the router.\n [Arguments]\n ... ${ushift_port}\n ... ${ushift_ip}=${USHIFT_HOST}\n ... ${path}=${EMPTY}\n ... ${scheme}=http\n ... ${hostname}=hello-microshift.cluster.local\n\n ${rc} ${stdout} ${stderr}= Access Hello MicroShift\n ... ushift_port=${ushift_port}\n ... ushift_ip=${ushift_ip}\n ... path=${path}\n ... scheme=${scheme}\n ... hostname=${hostname}\n Should Be Equal As Integers ${rc} 0\n Should Match Regexp ${stdout} HTTP.*200\n Should Match ${stdout} *Hello MicroShift*\n\nAccess Hello MicroShift No Route\n [Documentation] Expect 503 Service Unavailable when accessing \"hello microshift\" through the router.\n [Arguments]\n ... ${ushift_port}\n ... ${ushift_ip}=${USHIFT_HOST}\n ... ${path}=${EMPTY}\n ... ${scheme}=http\n ... ${hostname}=hello-microshift.cluster.local\n\n ${rc} ${stdout} ${stderr}= Access Hello MicroShift\n ... ushift_port=${ushift_port}\n ... ushift_ip=${ushift_ip}\n ... path=${path}\n ... scheme=${scheme}\n ... hostname=${hostname}\n Should Be Equal As Integers ${rc} 0\n Should Match Regexp ${stdout} HTTP.*503\n\nVerify Hello MicroShift LB\n [Documentation] Run Hello MicroShift Load Balancer verification\n Create Hello MicroShift Pod\n Expose Hello MicroShift Pod Via LB\n Wait Until Keyword Succeeds 30x 10s\n ... Access Hello Microshift ${LB_PORT}\n\n [Teardown] Run Keywords\n ... Delete Hello MicroShift Pod And Service\n\nDelete Hello MicroShift Pod And Service\n [Documentation] Delete service and pod for cleanup.\n [Arguments] ${ns}=${NAMESPACE}\n Oc Delete service\/hello-microshift -n ${ns}\n Oc Delete -f ${HELLO_USHIFT} -n ${ns}\n","name":"\/tmp\/repos\/microshift\/test\/resources\/microshift-network.resource","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-network.resource","element_type":"resource","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Create Hello MicroShift Pod\n [Documentation] Create a pod running the \"hello microshift\" application\n [Arguments] ${ns}=${NAMESPACE}\n Oc Create -f ${HELLO_USHIFT} -n ${ns}\n Labeled Pod Should Be Ready app\\=hello-microshift timeout=120s ns=${ns}","name":"Create Hello MicroShift Pod","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-network.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'HELLO_USHIFT': {'text': '${HELLO_USHIFT} .\/assets\/hello\/hello-microshift.yaml'}}","documentation":"[Arguments] ${ns}=${NAMESPACE}"} {"code":"Expose Hello MicroShift\n [Documentation] Expose the \"hello microshift\" application via cluster ip service\n [Arguments] ${ns}=${NAMESPACE}\n Run With Kubeconfig oc expose pod hello-microshift -n ${ns}","name":"Expose Hello MicroShift","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-network.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${ns}=${NAMESPACE}"} {"code":"Expose Hello MicroShift Pod Via LB\n [Documentation] Expose the \"hello microshift\" application through the load balancer\n Run With Kubeconfig oc create service loadbalancer hello-microshift --tcp=${LB_PORT}:8080 -n ${NAMESPACE}","name":"Expose Hello MicroShift Pod Via LB","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-network.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'LB_PORT': {'text': '${LB_PORT} 5678'}}","documentation":"Run With Kubeconfig oc create service loadbalancer hello-microshift --tcp=${LB_PORT}:8080 -n ${NAMESPACE}"} {"code":"Expose Hello MicroShift Pod Via NodePort\n [Documentation] Expose the \"hello microshift\" application through the NodePort\n Run With Kubeconfig\n ... oc create service nodeport hello-microshift --node-port=${NP_PORT} --tcp=8080 -n ${NAMESPACE}","name":"Expose Hello MicroShift Pod Via NodePort","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-network.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'NP_PORT': {'text': '${NP_PORT} 32222'}}","documentation":"Run With Kubeconfig\n ... oc create service nodeport hello-microshift --node-port=${NP_PORT} --tcp=8080 -n ${NAMESPACE}"} {"code":"Access Hello Microshift\n [Documentation] Use curl to make a GET request to the specified scheme, host, port and path.\n ... Use hello-microshift as authority and swap it with --connect-to option.\n ... Returns all output and return code.\n ... Times out after 15s.\n [Arguments]\n ... ${ushift_port}\n ... ${ushift_ip}=${USHIFT_HOST}\n ... ${path}=${EMPTY}\n ... ${scheme}=http\n ... ${hostname}=hello-microshift.cluster.local\n\n ${ip}= Add Brackets If Ipv6 ${ushift_ip}\n\n ${connect_to}= Set Variable \"${hostname}::${ip}:\"\n ${url_path}= Set Variable \"${scheme}:\/\/${hostname}:${ushift_port}${path}\"\n\n ${result}= Run Process\n ... curl -k -i ${url_path} --connect-to ${connect_to}\n ... shell=True\n ... timeout=15s\n RETURN ${result.rc} ${result.stdout} ${result.stderr}","name":"Access Hello Microshift","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-network.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments]\n ... ${ushift_port}\n ... ${ushift_ip}=${USHIFT_HOST}\n ... ${path}=${EMPTY}\n ... ${scheme}=http\n ... ${hostname}=hello-microshift.cluster.local"} {"code":"Access Hello MicroShift Success\n [Documentation] Expect 200 OK when accessing \"hello microshift\" through the router.\n [Arguments]\n ... ${ushift_port}\n ... ${ushift_ip}=${USHIFT_HOST}\n ... ${path}=${EMPTY}\n ... ${scheme}=http\n ... ${hostname}=hello-microshift.cluster.local\n\n ${rc} ${stdout} ${stderr}= Access Hello MicroShift\n ... ushift_port=${ushift_port}\n ... ushift_ip=${ushift_ip}\n ... path=${path}\n ... scheme=${scheme}\n ... hostname=${hostname}\n Should Be Equal As Integers ${rc} 0\n Should Match Regexp ${stdout} HTTP.*200\n Should Match ${stdout} *Hello MicroShift*","name":"Access Hello MicroShift Success","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-network.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments]\n ... ${ushift_port}\n ... ${ushift_ip}=${USHIFT_HOST}\n ... ${path}=${EMPTY}\n ... ${scheme}=http\n ... ${hostname}=hello-microshift.cluster.local"} {"code":"Access Hello MicroShift No Route\n [Documentation] Expect 503 Service Unavailable when accessing \"hello microshift\" through the router.\n [Arguments]\n ... ${ushift_port}\n ... ${ushift_ip}=${USHIFT_HOST}\n ... ${path}=${EMPTY}\n ... ${scheme}=http\n ... ${hostname}=hello-microshift.cluster.local\n\n ${rc} ${stdout} ${stderr}= Access Hello MicroShift\n ... ushift_port=${ushift_port}\n ... ushift_ip=${ushift_ip}\n ... path=${path}\n ... scheme=${scheme}\n ... hostname=${hostname}\n Should Be Equal As Integers ${rc} 0\n Should Match Regexp ${stdout} HTTP.*503","name":"Access Hello MicroShift No Route","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-network.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments]\n ... ${ushift_port}\n ... ${ushift_ip}=${USHIFT_HOST}\n ... ${path}=${EMPTY}\n ... ${scheme}=http\n ... ${hostname}=hello-microshift.cluster.local"} {"code":"Verify Hello MicroShift LB\n [Documentation] Run Hello MicroShift Load Balancer verification\n Create Hello MicroShift Pod\n Expose Hello MicroShift Pod Via LB\n Wait Until Keyword Succeeds 30x 10s\n ... Access Hello Microshift ${LB_PORT}\n\n [Teardown] Run Keywords\n ... Delete Hello MicroShift Pod And Service","name":"Verify Hello MicroShift LB","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-network.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'LB_PORT': {'text': '${LB_PORT} 5678'}}","documentation":"Create Hello MicroShift Pod"} {"code":"Delete Hello MicroShift Pod And Service\n [Documentation] Delete service and pod for cleanup.\n [Arguments] ${ns}=${NAMESPACE}\n Oc Delete service\/hello-microshift -n ${ns}\n Oc Delete -f ${HELLO_USHIFT} -n ${ns}","name":"Delete Hello MicroShift Pod And Service","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-network.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'HELLO_USHIFT': {'text': '${HELLO_USHIFT} .\/assets\/hello\/hello-microshift.yaml'}}","documentation":"[Arguments] ${ns}=${NAMESPACE}"} {"code":"*** Settings ***\nDocumentation Keywords for running the microshift command line.\n\nLibrary Process\nLibrary String\nLibrary OperatingSystem\nLibrary SSHLibrary\nResource oc.resource\nResource systemd.resource\nResource microshift-host.resource\nResource microshift-etcd-process.resource\nLibrary DataFormats.py\n\n\n*** Keywords ***\nMicroShift Version\n [Documentation] Run the version command\n ${version_text} ${rc}= Execute Command\n ... microshift version -o yaml\n ... sudo=True return_rc=True\n Should Be Equal As Integers ${rc} 0\n Should Not Be Empty ${version_text}\n ${version}= Yaml Parse ${version_text}\n RETURN ${version}\n\nMicroShift Is Ready\n [Documentation] Check the \/readyz endpoint\n ${stdout}= Run With Kubeconfig oc get --raw='\/readyz'\n Should Be Equal As Strings ${stdout} ok strip_spaces=True\n\nMicroShift Is Live\n [Documentation] Check the \/livez endpoint\n [Arguments] ${extra_args}=${EMPTY}\n ${stdout}= Run With Kubeconfig oc get --raw='\/livez' ${extra_args}\n Should Be Equal As Strings ${stdout} ok strip_spaces=True\n\nWait For MicroShift\n [Documentation] Wait for various checks to ensure MicroShift is online.\n Wait For MicroShift Service\n Wait Until Keyword Succeeds 30x 10s\n ... MicroShift Is Ready\n Wait Until Keyword Succeeds 30x 10s\n ... MicroShift Is Live\n # We could also wait for relevant pods. Can we restructure the\n # greenboot check script to let us use it even when not on a\n # greenboot host?\n\nMicroShift Process ID\n [Documentation] Return the current MicroShift process ID\n ${stdout} ${stderr} ${rc}= Execute Command\n ... pidof microshift\n ... return_stdout=True return_stderr=True return_rc=True\n Log ${stderr}\n RETURN ${stdout}\n\nMicroShift Process ID Changed\n [Documentation] Compare the specified and current MicroShift process ID\n [Arguments] ${old_pid}\n ${cur_pid}= MicroShift Process ID\n Should Not Be Equal ${cur_pid} ${old_pid}\n\nWait Until MicroShift Process ID Changes\n [Documentation] Wait until the current MicroShift process ID changes\n [Arguments] ${old_pid}\n\n Wait Until Keyword Succeeds 30x 10s\n ... MicroShift Process ID Changed ${old_pid}\n\nMicroShift Service Is Active\n [Documentation] Check if microshift.service is active\n ... (process announced readiness)\n ${state}= Get Systemd Setting microshift.service ActiveState\n Should Be Equal As Strings ${state} active\n\nWait For MicroShift Service\n [Documentation] Wait for MicroShift service to be active\n Wait Until Keyword Succeeds 50x 10s\n ... MicroShift Service Is Active\n\nRestart MicroShift\n [Documentation] Restart the MicroShift service\n ${ushift_pid}= MicroShift Process ID\n ${ushift_etcd_pid}= MicroShift Etcd Process ID\n Systemctl restart microshift.service\n Wait Until MicroShift Process ID Changes ${ushift_pid}\n Wait Until MicroShift Etcd Process ID Changes ${ushift_etcd_pid}\n # Kubeconfig may change between restarts, ensure we are taking the latest one.\n Setup Kubeconfig\n Wait For MicroShift\n\nStop MicroShift\n [Documentation] Stop the MicroShift service\n Systemctl stop microshift.service\n\nStart MicroShift\n [Documentation] Start the MicroShift service\n Systemctl start microshift.service\n # Kubeconfig may change between restarts, ensure we are taking the latest one.\n Setup Kubeconfig\n\nEnable MicroShift\n [Documentation] Enable the MicroShift service\n Systemctl enable microshift.service\n\nDisable MicroShift\n [Documentation] Disable the MicroShift service\n Systemctl disable microshift.service\n\nCleanup MicroShift\n [Documentation] Cleanup MicroShift data\n [Arguments] ${cmd}=\"--all\" ${opt}=${EMPTY}\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... echo 1 | sudo microshift-cleanup-data ${cmd} ${opt}\n ... return_stdout=True return_stderr=True return_rc=True\n Log Many ${stdout} ${stderr} ${rc}\n Should Be Equal As Integers ${rc} 0\n\n Enable MicroShift\n","name":"\/tmp\/repos\/microshift\/test\/resources\/microshift-process.resource","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-process.resource","element_type":"resource","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"MicroShift Version\n [Documentation] Run the version command\n ${version_text} ${rc}= Execute Command\n ... microshift version -o yaml\n ... sudo=True return_rc=True\n Should Be Equal As Integers ${rc} 0\n Should Not Be Empty ${version_text}\n ${version}= Yaml Parse ${version_text}\n RETURN ${version}","name":"MicroShift Version","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-process.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${version_text} ${rc}= Execute Command\n ... microshift version -o yaml\n ... sudo=True return_rc=True"} {"code":"MicroShift Is Ready\n [Documentation] Check the \/readyz endpoint\n ${stdout}= Run With Kubeconfig oc get --raw='\/readyz'\n Should Be Equal As Strings ${stdout} ok strip_spaces=True","name":"MicroShift Is Ready","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-process.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${stdout}= Run With Kubeconfig oc get --raw='\/readyz'"} {"code":"MicroShift Is Live\n [Documentation] Check the \/livez endpoint\n [Arguments] ${extra_args}=${EMPTY}\n ${stdout}= Run With Kubeconfig oc get --raw='\/livez' ${extra_args}\n Should Be Equal As Strings ${stdout} ok strip_spaces=True","name":"MicroShift Is Live","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-process.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${extra_args}=${EMPTY}"} {"code":"Wait For MicroShift\n [Documentation] Wait for various checks to ensure MicroShift is online.\n Wait For MicroShift Service\n Wait Until Keyword Succeeds 30x 10s\n ... MicroShift Is Ready\n Wait Until Keyword Succeeds 30x 10s\n ... MicroShift Is Live\n # We could also wait for relevant pods. Can we restructure the\n # greenboot check script to let us use it even when not on a\n # greenboot host?","name":"Wait For MicroShift","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-process.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Wait For MicroShift Service"} {"code":"MicroShift Process ID\n [Documentation] Return the current MicroShift process ID\n ${stdout} ${stderr} ${rc}= Execute Command\n ... pidof microshift\n ... return_stdout=True return_stderr=True return_rc=True\n Log ${stderr}\n RETURN ${stdout}","name":"MicroShift Process ID","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-process.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${stdout} ${stderr} ${rc}= Execute Command\n ... pidof microshift\n ... return_stdout=True return_stderr=True return_rc=True"} {"code":"MicroShift Process ID Changed\n [Documentation] Compare the specified and current MicroShift process ID\n [Arguments] ${old_pid}\n ${cur_pid}= MicroShift Process ID\n Should Not Be Equal ${cur_pid} ${old_pid}","name":"MicroShift Process ID Changed","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-process.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${old_pid}"} {"code":"Wait Until MicroShift Process ID Changes\n [Documentation] Wait until the current MicroShift process ID changes\n [Arguments] ${old_pid}\n\n Wait Until Keyword Succeeds 30x 10s\n ... MicroShift Process ID Changed ${old_pid}","name":"Wait Until MicroShift Process ID Changes","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-process.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${old_pid}"} {"code":"MicroShift Service Is Active\n [Documentation] Check if microshift.service is active\n ... (process announced readiness)\n ${state}= Get Systemd Setting microshift.service ActiveState\n Should Be Equal As Strings ${state} active","name":"MicroShift Service Is Active","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-process.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"(process announced readiness)"} {"code":"Wait For MicroShift Service\n [Documentation] Wait for MicroShift service to be active\n Wait Until Keyword Succeeds 50x 10s\n ... MicroShift Service Is Active","name":"Wait For MicroShift Service","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-process.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Wait Until Keyword Succeeds 50x 10s\n ... MicroShift Service Is Active"} {"code":"Restart MicroShift\n [Documentation] Restart the MicroShift service\n ${ushift_pid}= MicroShift Process ID\n ${ushift_etcd_pid}= MicroShift Etcd Process ID\n Systemctl restart microshift.service\n Wait Until MicroShift Process ID Changes ${ushift_pid}\n Wait Until MicroShift Etcd Process ID Changes ${ushift_etcd_pid}\n # Kubeconfig may change between restarts, ensure we are taking the latest one.\n Setup Kubeconfig\n Wait For MicroShift","name":"Restart MicroShift","imports_file_locations":"{'microshift-etcd-process.resource': 'test\/resources\/microshift-etcd-process.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-process.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${ushift_pid}= MicroShift Process ID"} {"code":"Stop MicroShift\n [Documentation] Stop the MicroShift service\n Systemctl stop microshift.service","name":"Stop MicroShift","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-process.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Systemctl stop microshift.service"} {"code":"Start MicroShift\n [Documentation] Start the MicroShift service\n Systemctl start microshift.service\n # Kubeconfig may change between restarts, ensure we are taking the latest one.\n Setup Kubeconfig","name":"Start MicroShift","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-process.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Systemctl start microshift.service"} {"code":"Enable MicroShift\n [Documentation] Enable the MicroShift service\n Systemctl enable microshift.service","name":"Enable MicroShift","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-process.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Systemctl enable microshift.service"} {"code":"Disable MicroShift\n [Documentation] Disable the MicroShift service\n Systemctl disable microshift.service","name":"Disable MicroShift","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-process.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Systemctl disable microshift.service"} {"code":"Cleanup MicroShift\n [Documentation] Cleanup MicroShift data\n [Arguments] ${cmd}=\"--all\" ${opt}=${EMPTY}\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... echo 1 | sudo microshift-cleanup-data ${cmd} ${opt}\n ... return_stdout=True return_stderr=True return_rc=True\n Log Many ${stdout} ${stderr} ${rc}\n Should Be Equal As Integers ${rc} 0\n\n Enable MicroShift","name":"Cleanup MicroShift","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-process.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${cmd}=\"--all\" ${opt}=${EMPTY}"} {"code":"*** Settings ***\nDocumentation Keywords for working with the MicroShift on a non-ostree system\n\nResource common.resource\nLibrary String\nLibrary SSHLibrary\nResource microshift-host.resource\n\n\n*** Variables ***\n${REPO_FILE_NAME} \"\/etc\/yum.repos.d\/microshift-local.repo\"\n\n\n*** Keywords ***\nInstall MicroShift RPM Packages From System Repo\n [Documentation] Installs MicroShift RPM packages from a system repository\n [Arguments] ${version} ${check_warnings}=True\n # Allow erasing because update may require a new version of openvswitch\n # and major versions of openvswitch are separate packages that obsolete\n # each other. Override default timeout to 2 min (-R 2) because the transmission rate sometimes dips below the\n # minrate threshold. This is not a fatal error and should not fail the test, so raising the timeout only helps to\n # keep logs clean of flakey error messages.\n ${stdout}= Command Should Work dnf install -q -R 2 -y --allowerasing 'microshift-${version}'\n IF ${check_warnings}\n # Look for all warnings and errors before testing so that the log\n # shows the output for both.\n ${warnings}= Get Lines Containing String ${stdout} warning ignore_case=True\n ${errors}= Get Lines Containing String ${stdout} error ignore_case=True\n Should Not Contain ${stdout} warning ignore_case=True\n Should Not Contain ${stdout} error ignore_case=True\n END\n\nInstall MicroShift RPM Packages From Repo\n [Documentation] Installs MicroShift RPM packages from the specified URL\n [Arguments] ${repo_url} ${version}\n Configure MicroShift Repository ${repo_url}\n Install MicroShift RPM Packages From System Repo ${version}\n Unconfigure MicroShift Repository\n\nConfigure MicroShift Repository\n [Documentation] Sets up repository\n [Arguments] ${repo_url}\n ${repo_file_contents}= Catenate SEPARATOR=\\n\n ... [microshift-local]\n ... name=Microshift Local Repository\n ... baseurl=${repo_url}\n ... enabled=1\n ... gpgcheck=0\n\n Upload String To File ${repo_file_contents} ${REPO_FILE_NAME}\n Update Dnf Cache\n\nUnconfigure MicroShift Repository\n [Documentation] Remove repo\n ${rc}= SSHLibrary.Execute Command rm -f \"${REPO_FILE_NAME}\"\n ... sudo=True return_rc=True return_stderr=False return_stdout=False\n Should Be Equal As Integers 0 ${rc}\n\n Update Dnf Cache\n\nUninstall MicroShift RPM Packages\n [Documentation] Uninstalls MicroShift RPM packages\n\n ${stdout} ${stderr} ${rc}= SSHLibrary.Execute Command\n ... dnf remove -y --exclude=microshift-test-agent microshift\\*\n ... sudo=True return_rc=True return_stderr=True return_stdout=True\n Log ${stderr}\n Should Be Equal As Integers 0 ${rc}\n\nUpdate Dnf Cache\n [Documentation] Updates dnf cache\n\n ${stderr} ${rc}= SSHLibrary.Execute Command dnf makecache\n ... sudo=True return_rc=True return_stderr=True return_stdout=False\n Log ${stderr}\n Should Be Equal As Integers 0 ${rc}\n\nGet Version Of MicroShift RPM\n [Documentation] Returns the version of the installed MicroShift RPM as a string\n ${rpm_cmd_output} ${stderr} ${rc}= SSHLibrary.Execute Command\n ... rpm -q microshift\n ... sudo=True return_rc=True return_stdout=True return_stderr=True\n Log ${stderr}\n Should Be Equal As Integers 0 ${rc}\n # rpm_cmd_output will look like:\n # microshift-4.15.0_0.nightly_2023_11_01_080931_20231103152813_3f5593fca_dirty-1.el9.x86_64\n ${ignored} ${version_string_raw}= Split String ${rpm_cmd_output} - 1\n # version_string_raw should be:\n # 4.15.0_0.nightly_2023_11_01_080931_20231103152813_3f5593fca_dirty-1.el9.x86_64\n ${version_string}= Strip String ${version_string_raw}\n RETURN ${version_string}\n\nVerify MicroShift RPM Install\n [Documentation] Run 'rpm -V' package verification command\n ... on all the installed MicroShift RPM packages.\n # The ostree-based file system does not preserve modification\n # times of the installed files\n ${is_ostree}= Is System OSTree\n IF ${is_ostree}\n ${nomtime}= Set Variable --nomtime\n ELSE\n ${nomtime}= Set Variable ${EMPTY}\n END\n\n ${stdout} ${stderr} ${rc}= SSHLibrary.Execute Command\n ... rpm -qa microshift\\* | xargs -I {} bash -c 'echo {}; sudo rpm -V ${nomtime} {}'\n ... sudo=True return_rc=True return_stdout=True return_stderr=True\n Log ${stdout}\n Log ${stderr}\n Should Be Equal As Integers 0 ${rc}\n","name":"\/tmp\/repos\/microshift\/test\/resources\/microshift-rpm.resource","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-rpm.resource","element_type":"resource","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Install MicroShift RPM Packages From System Repo\n [Documentation] Installs MicroShift RPM packages from a system repository\n [Arguments] ${version} ${check_warnings}=True\n # Allow erasing because update may require a new version of openvswitch\n # and major versions of openvswitch are separate packages that obsolete\n # each other. Override default timeout to 2 min (-R 2) because the transmission rate sometimes dips below the\n # minrate threshold. This is not a fatal error and should not fail the test, so raising the timeout only helps to\n # keep logs clean of flakey error messages.\n ${stdout}= Command Should Work dnf install -q -R 2 -y --allowerasing 'microshift-${version}'\n IF ${check_warnings}\n # Look for all warnings and errors before testing so that the log\n # shows the output for both.\n ${warnings}= Get Lines Containing String ${stdout} warning ignore_case=True\n ${errors}= Get Lines Containing String ${stdout} error ignore_case=True\n Should Not Contain ${stdout} warning ignore_case=True\n Should Not Contain ${stdout} error ignore_case=True\n END","name":"Install MicroShift RPM Packages From System Repo","imports_file_locations":"{'microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-rpm.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${version} ${check_warnings}=True"} {"code":"Install MicroShift RPM Packages From Repo\n [Documentation] Installs MicroShift RPM packages from the specified URL\n [Arguments] ${repo_url} ${version}\n Configure MicroShift Repository ${repo_url}\n Install MicroShift RPM Packages From System Repo ${version}\n Unconfigure MicroShift Repository","name":"Install MicroShift RPM Packages From Repo","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-rpm.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${repo_url} ${version}"} {"code":"Configure MicroShift Repository\n [Documentation] Sets up repository\n [Arguments] ${repo_url}\n ${repo_file_contents}= Catenate SEPARATOR=\\n\n ... [microshift-local]\n ... name=Microshift Local Repository\n ... baseurl=${repo_url}\n ... enabled=1\n ... gpgcheck=0\n\n Upload String To File ${repo_file_contents} ${REPO_FILE_NAME}\n Update Dnf Cache","name":"Configure MicroShift Repository","imports_file_locations":"{'common.resource': 'test\/resources\/common.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-rpm.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'REPO_FILE_NAME': {'text': '${REPO_FILE_NAME} \"\/etc\/yum.repos.d\/microshift-local.repo\"'}}","documentation":"[Arguments] ${repo_url}"} {"code":"Unconfigure MicroShift Repository\n [Documentation] Remove repo\n ${rc}= SSHLibrary.Execute Command rm -f \"${REPO_FILE_NAME}\"\n ... sudo=True return_rc=True return_stderr=False return_stdout=False\n Should Be Equal As Integers 0 ${rc}\n\n Update Dnf Cache","name":"Unconfigure MicroShift Repository","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-rpm.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'REPO_FILE_NAME': {'text': '${REPO_FILE_NAME} \"\/etc\/yum.repos.d\/microshift-local.repo\"'}}","documentation":"${rc}= SSHLibrary.Execute Command rm -f \"${REPO_FILE_NAME}\"\n ... sudo=True return_rc=True return_stderr=False return_stdout=False"} {"code":"Uninstall MicroShift RPM Packages\n [Documentation] Uninstalls MicroShift RPM packages\n\n ${stdout} ${stderr} ${rc}= SSHLibrary.Execute Command\n ... dnf remove -y --exclude=microshift-test-agent microshift\\*\n ... sudo=True return_rc=True return_stderr=True return_stdout=True\n Log ${stderr}\n Should Be Equal As Integers 0 ${rc}","name":"Uninstall MicroShift RPM Packages","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-rpm.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${stdout} ${stderr} ${rc}= SSHLibrary.Execute Command\n ... dnf remove -y --exclude=microshift-test-agent microshift\\*\n ... sudo=True return_rc=True return_stderr=True return_stdout=True"} {"code":"Update Dnf Cache\n [Documentation] Updates dnf cache\n\n ${stderr} ${rc}= SSHLibrary.Execute Command dnf makecache\n ... sudo=True return_rc=True return_stderr=True return_stdout=False\n Log ${stderr}\n Should Be Equal As Integers 0 ${rc}","name":"Update Dnf Cache","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-rpm.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${stderr} ${rc}= SSHLibrary.Execute Command dnf makecache\n ... sudo=True return_rc=True return_stderr=True return_stdout=False"} {"code":"Get Version Of MicroShift RPM\n [Documentation] Returns the version of the installed MicroShift RPM as a string\n ${rpm_cmd_output} ${stderr} ${rc}= SSHLibrary.Execute Command\n ... rpm -q microshift\n ... sudo=True return_rc=True return_stdout=True return_stderr=True\n Log ${stderr}\n Should Be Equal As Integers 0 ${rc}\n # rpm_cmd_output will look like:\n # microshift-4.15.0_0.nightly_2023_11_01_080931_20231103152813_3f5593fca_dirty-1.el9.x86_64\n ${ignored} ${version_string_raw}= Split String ${rpm_cmd_output} - 1\n # version_string_raw should be:\n # 4.15.0_0.nightly_2023_11_01_080931_20231103152813_3f5593fca_dirty-1.el9.x86_64\n ${version_string}= Strip String ${version_string_raw}\n RETURN ${version_string}","name":"Get Version Of MicroShift RPM","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-rpm.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${rpm_cmd_output} ${stderr} ${rc}= SSHLibrary.Execute Command\n ... rpm -q microshift\n ... sudo=True return_rc=True return_stdout=True return_stderr=True"} {"code":"Verify MicroShift RPM Install\n [Documentation] Run 'rpm -V' package verification command\n ... on all the installed MicroShift RPM packages.\n # The ostree-based file system does not preserve modification\n # times of the installed files\n ${is_ostree}= Is System OSTree\n IF ${is_ostree}\n ${nomtime}= Set Variable --nomtime\n ELSE\n ${nomtime}= Set Variable ${EMPTY}\n END\n\n ${stdout} ${stderr} ${rc}= SSHLibrary.Execute Command\n ... rpm -qa microshift\\* | xargs -I {} bash -c 'echo {}; sudo rpm -V ${nomtime} {}'\n ... sudo=True return_rc=True return_stdout=True return_stderr=True\n Log ${stdout}\n Log ${stderr}\n Should Be Equal As Integers 0 ${rc}","name":"Verify MicroShift RPM Install","imports_file_locations":"{'microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/microshift-rpm.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"on all the installed MicroShift RPM packages."} {"code":"*** Settings ***\nDocumentation Multus-related keywords used in different test suites.\n\nResource common.resource\nLibrary DataFormats.py\n\n\n*** Keywords ***\nCreate NAD And Pod\n [Documentation] Creates provided NetworkAttachmentDefinition and Pod.\n [Arguments] ${nad} ${pod}\n Oc Create -n ${NAMESPACE} -f ${nad}\n Oc Create -n ${NAMESPACE} -f ${pod}\n\nRemove NAD And Pod\n [Documentation] Removes provided NetworkAttachmentDefinition and Pod.\n [Arguments] ${nad} ${pod}\n Run Keyword And Continue On Failure\n ... Oc Delete -n ${NAMESPACE} -f ${pod}\n Run Keyword And Continue On Failure\n ... Oc Delete -n ${NAMESPACE} -f ${nad}\n\nConnect To Pod Over Local Interface\n [Documentation] Makes a HTTP request to 8080 for a given Pod over given interface.\n [Arguments] ${pod} ${ns} ${if}\n\n ${networks}= Get And Verify Pod Networks ${pod} ${ns} ${NAMESPACE}\/bridge*-conf\n ${extra_ip}= Set Variable ${networks}[1][ips][0]\n\n ${stdout}= Command Should Work curl -v --interface ${if} ${extra_ip}:8080\n Should Contain ${stdout} Hello MicroShift\n\nSet IP For Host Interface\n [Documentation] Sets IP address for the interface.\n [Arguments] ${if} ${cidr}\n Command Should Work ip addr add ${cidr} dev ${if}\n\nGet And Verify Pod Networks\n [Documentation] Obtains interfaces of the Pod from its annotation.\n ... The annotation is managed by Multus.\n [Arguments] ${pod} ${ns} ${extra_cni_name}\n\n ${networks_str}= Oc Get JsonPath\n ... pod\n ... ${ns}\n ... ${pod}\n ... .metadata.annotations.k8s\\\\.v1\\\\.cni\\\\.cncf\\\\.io\/network-status\n Should Not Be Empty ${networks_str}\n\n ${networks}= Json Parse ${networks_str}\n ${n}= Get Length ${networks}\n Should Be Equal As Integers ${n} 2\n Should Be Equal As Strings ${networks}[0][name] ovn-kubernetes\n Should Match ${networks}[1][name] ${extra_cni_name}\n\n RETURN ${networks}\n","name":"\/tmp\/repos\/microshift\/test\/resources\/multus.resource","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/multus.resource","element_type":"resource","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Create NAD And Pod\n [Documentation] Creates provided NetworkAttachmentDefinition and Pod.\n [Arguments] ${nad} ${pod}\n Oc Create -n ${NAMESPACE} -f ${nad}\n Oc Create -n ${NAMESPACE} -f ${pod}","name":"Create NAD And Pod","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/multus.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${nad} ${pod}"} {"code":"Remove NAD And Pod\n [Documentation] Removes provided NetworkAttachmentDefinition and Pod.\n [Arguments] ${nad} ${pod}\n Run Keyword And Continue On Failure\n ... Oc Delete -n ${NAMESPACE} -f ${pod}\n Run Keyword And Continue On Failure\n ... Oc Delete -n ${NAMESPACE} -f ${nad}","name":"Remove NAD And Pod","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/multus.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${nad} ${pod}"} {"code":"Connect To Pod Over Local Interface\n [Documentation] Makes a HTTP request to 8080 for a given Pod over given interface.\n [Arguments] ${pod} ${ns} ${if}\n\n ${networks}= Get And Verify Pod Networks ${pod} ${ns} ${NAMESPACE}\/bridge*-conf\n ${extra_ip}= Set Variable ${networks}[1][ips][0]\n\n ${stdout}= Command Should Work curl -v --interface ${if} ${extra_ip}:8080\n Should Contain ${stdout} Hello MicroShift","name":"Connect To Pod Over Local Interface","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/multus.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${pod} ${ns} ${if}"} {"code":"Set IP For Host Interface\n [Documentation] Sets IP address for the interface.\n [Arguments] ${if} ${cidr}\n Command Should Work ip addr add ${cidr} dev ${if}","name":"Set IP For Host Interface","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/multus.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${if} ${cidr}"} {"code":"Get And Verify Pod Networks\n [Documentation] Obtains interfaces of the Pod from its annotation.\n ... The annotation is managed by Multus.\n [Arguments] ${pod} ${ns} ${extra_cni_name}\n\n ${networks_str}= Oc Get JsonPath\n ... pod\n ... ${ns}\n ... ${pod}\n ... .metadata.annotations.k8s\\\\.v1\\\\.cni\\\\.cncf\\\\.io\/network-status\n Should Not Be Empty ${networks_str}\n\n ${networks}= Json Parse ${networks_str}\n ${n}= Get Length ${networks}\n Should Be Equal As Integers ${n} 2\n Should Be Equal As Strings ${networks}[0][name] ovn-kubernetes\n Should Match ${networks}[1][name] ${extra_cni_name}\n\n RETURN ${networks}","name":"Get And Verify Pod Networks","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/multus.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${pod} ${ns} ${extra_cni_name}"} {"code":"*** Settings ***\nDocumentation Keywords for using the oc command line.\n...\n... Requires that the openshift-clients package be installed and\n... 'oc' is in the $PATH.\n\nResource common.resource\nLibrary DataFormats.py\n\n\n*** Variables ***\n${DEFAULT_WAIT_TIMEOUT} 60s\n\n\n*** Keywords ***\nOc Get\n [Documentation] Run 'oc get' for a specific instance of a type in a namespace.\n ... Returns the YAML output parsed to a DottedDict for use in\n ... other keywords.\n [Arguments] ${type} ${namespace} ${resource}\n\n ${yaml_text}= Run With Kubeconfig oc get -n ${namespace} -o yaml ${type} ${resource}\n ${yaml_data}= Yaml Parse ${yaml_text}\n\n RETURN ${yaml_data}\n\nOc Get JsonPath\n [Documentation] Run 'oc get' for a specific instance of a type in a namespace\n ... with jsonpath provided. Returns output of the command without any parsing.\n [Arguments] ${type} ${namespace} ${resource} ${jsonpath}\n\n IF \"${namespace}\"==\"${EMPTY}\"\n ${namespace_arg}= Set Variable -A\n ELSE\n ${namespace_arg}= Set Variable -n ${namespace}\n END\n\n ${text}= Run With Kubeconfig oc get ${namespace_arg} -o=jsonpath='{ ${jsonpath} }' ${type} ${resource}\n\n RETURN ${text}\n\nOc Apply\n [Documentation] Run 'oc apply' on a specific pod in the curret test namespace\n ... Returns the command's combined STDOUT\/STDER\n [Arguments] ${opts}\n ${output}= Run With Kubeconfig oc apply ${opts}\n RETURN ${output}\n\nOc Delete\n [Documentation] Run 'oc delete' on a specific pod in the curret test namespace\n ... Returns the command's combined STDOUT\/STDER\n [Arguments] ${opts}\n ${output}= Run With Kubeconfig oc delete ${opts}\n RETURN ${output}\n\nOc Exec\n [Documentation] Run 'oc exec' on a specific pod in the curret test namespace\n ... Returns the command's combined STDOUT\/STDER\n [Arguments] ${pod} ${cmd} ${ns}=${NAMESPACE}\n ${output}= Run With Kubeconfig oc exec -n ${ns} pod\/${pod} -- \/bin\/bash -c '${cmd}'\n RETURN ${output}\n\nOc Wait\n [Documentation] Run 'oc wait' on a specific resource.\n ... 'resource' should contain: \"-n namespace\" (if applicable), name, and kind.\n ... For example: \"-n test-ns pod test-pod\".\n ... 'opts' should contain a condition and additional parameters like timeout.\n ... Returns the combined STDOUT\/STDERR output of the command.\n [Arguments] ${resource} ${opts}\n ${output} ${rc}= Run With Kubeconfig\n ... oc wait ${resource} ${opts}\n ... allow_fail=${TRUE}\n ... return_rc=${TRUE}\n IF ${rc} != 0\n Run With Kubeconfig oc describe ${resource} allow_fail=${TRUE}\n Log 'oc wait ${resource} ${opts}' failed\n Should Be Equal As Integers ${rc} 0\n END\n RETURN ${output}\n\nNamed Pod Should Be Ready\n [Documentation] Wait for pod with name \\${name} to become \"Ready\"\n ... ${name} Name of pod to wait for\n ... ${ns} Namespace of named pod. Defaults to NAMESPACE suite variable\n ... ${timeout} Period of time to wait for pod to reach ready status. Default 60s.\n [Arguments] ${name} ${ns}=${NAMESPACE} ${timeout}=${DEFAULT_WAIT_TIMEOUT}\n\n Oc Wait -n ${ns} pod\/${name} --for=\"condition=Ready\" --timeout=${timeout}\n\nNamed Pod Should Be Deleted\n [Documentation] Wait for pod with ${name} to be deleted\n ... ${name} Name of pod to wait for\n ... ${ns} Namespace of named pod. Defaults to NAMESPACE suite variable\n ... ${timeout} Period of time to wait for pod to reach ready status. Default 60s.\n [Arguments] ${name} ${ns}=${NAMESPACE} ${timeout}=${DEFAULT_WAIT_TIMEOUT}\n Oc Wait -n ${ns} pod\/${name} --for=delete --timeout=${timeout}\n\nLabeled Pod Should Be Ready\n [Documentation] Wait for pod(s) ready by ${label} to become \"Ready\"\n ... ${label} A label selector value to match by (e.g. \"app\\=my_app\"). Note that '=' must be escaped with '\\'.\n ... ${ns} Namespace of named pod. Defaults to NAMESPACE suite variable\n ... ${timeout} Period of time to wait for pod to reach ready status. Default 60s.\n [Arguments] ${label} ${ns}=${NAMESPACE} ${timeout}=${DEFAULT_WAIT_TIMEOUT}\n Oc Wait -n ${ns} pod --selector=\"${label}\" --for=condition=Ready --timeout=${timeout}\n\nNamed Deployment Should Be Available\n [Documentation] Wait for a given deployment's Available condition to be true\n ... ${name} Name of deployment to wait for\n ... ${ns} Namespace of named deployment. Defaults to NAMESPACE suite variable\n ... ${timeout} Period of time to wait for deployment to reach ready status. Default 60s.\n [Arguments] ${name} ${ns}=${NAMESPACE} ${timeout}=${DEFAULT_WAIT_TIMEOUT}\n Oc Wait -n ${ns} deploy ${name} --for=condition=Available --timeout=${timeout}\n\nNamed Daemonset Should Be Available\n [Documentation] Wait for a given daemonset's Available condition to be true\n ... ${name} Name of daemonset to wait for\n ... ${ns} Namespace of named daemonset. Defaults to NAMESPACE suite variable\n ... ${timeout} Period of time to wait for daemonset to reach ready status. Default 60s.\n [Arguments] ${name} ${ns}=${NAMESPACE} ${timeout}=${DEFAULT_WAIT_TIMEOUT}\n Oc Wait -n ${ns} daemonset ${name} --for=jsonpath='{.status.numberAvailable}'=1 --timeout=${timeout}\n\nWait Until Resource Exists\n [Documentation] Waits for a resource to exist.\n [Arguments] ${type} ${name} ${ns}=${NAMESPACE} ${timeout}=${DEFAULT_WAIT_TIMEOUT}\n Wait Until Keyword Succeeds ${timeout} 5s\n ... Oc Get ${type} ${ns} ${name}\n\nNamed PVC Should Be Resized\n [Documentation] Wait for pvc with ${name} to resize to ${to_size}\n ... ${name} Name of pvc to wait for\n ... ${ns} Namespace of named pvc. Defaults to NAMESPACE suite variable\n ... ${to_size} Size pvc is expected to be updated to\n ... ${timeout} Period of time to wait for pvc to resize to new size. Default 60s.\n [Arguments] ${name} ${to_size} ${ns}=${NAMESPACE} ${timeout}=${DEFAULT_WAIT_TIMEOUT}\n Oc Wait -n ${ns} pvc\/${name}\n ... --for=jsonpath=\"{.spec.resources.requests.storage}\"=${to_size} --timeout=${timeout}\n\nNamed PVC Should Be Deleted\n [Documentation] Wait for pvc with ${name} to be deleted\n ... ${name} Name of pvc to wait for\n ... ${ns} Namespace of named pvc. Defaults to NAMESPACE suite variable\n ... ${timeout} Period of time to wait for pvc to be deleted. Default 60s.\n [Arguments] ${name} ${ns}=${NAMESPACE} ${timeout}=${DEFAULT_WAIT_TIMEOUT}\n ${output}= Oc Wait -n ${ns} pvc\/${name} --for=Delete --timeout=${timeout}\n RETURN ${output}\n\nNamed VolumeSnapshot Should Be Ready\n [Documentation] Wait for a volumesnap ${name} to become \"readyToUse\"\n ... ${name} Name of volumesnapshot to wait for\n ... ${timeout} Period of time to wait for volumeSnapshot ready \"readyToUse\" state. Default 60s.\n [Arguments] ${name} ${timeout}=${DEFAULT_WAIT_TIMEOUT}\n Oc Wait volumesnapshot\/${name} -n ${NAMESPACE} --for=jsonpath='{.status.readyToUse}=true'\n\nNamed VolumeSnapshot Should Be Deleted\n [Documentation] Wait for volumesnapshot with ${name} to be deleted\n ... ${name} Name of volumesnapshot to wait for\n ... ${ns} Namespace of named pod. Defaults to NAMESPACE suite variable, specified by\n ... ${timeout} Period of time to wait for volumesnapshot to reach ready status. Default 60s.\n [Arguments] ${name} ${ns}=${NAMESPACE} ${timeout}=${DEFAULT_WAIT_TIMEOUT}\n Oc Wait -n ${ns} volumesnapshot\/${name} --for=Delete --timeout=${timeout}\n\nOc Create\n [Documentation] Run 'oc create' on a specific resource in the current test namespace\n ... Returns the combined STDOUT\/STDERR output of the command.\n [Arguments] ${opts}\n ${output}= Run With Kubeconfig oc create ${opts}\n RETURN ${output}\n\nOc Expose\n [Documentation] Run 'oc expose' on a specific resource in the current test namespace\n ... Returns the combined STDOUT\/STDERR output of the command.\n [Arguments] ${opts}\n ${output}= Run With Kubeconfig oc expose ${opts}\n RETURN ${output}\n\nOc Patch\n [Documentation] Run 'oc patch' on a specific resource in the current test namespace\n ... Returns the combined STDOUT\/STDER output of the command.\n [Arguments] ${type_name} ${opts}\n ${output}= Run With Kubeconfig oc patch -n ${NAMESPACE} ${type_name} -p ${opts}\n RETURN ${output}\n\nOc Logs\n [Documentation] Run 'oc logs' on a specific resource in the given namespace.\n ... Returns the combined STDOUT\/STDER output of the command.\n [Arguments] ${opts} ${namespace}\n ${output}= Run With Kubeconfig oc logs -n ${namespace} ${opts}\n RETURN ${output}\n","name":"\/tmp\/repos\/microshift\/test\/resources\/oc.resource","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/oc.resource","element_type":"resource","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Oc Get\n [Documentation] Run 'oc get' for a specific instance of a type in a namespace.\n ... Returns the YAML output parsed to a DottedDict for use in\n ... other keywords.\n [Arguments] ${type} ${namespace} ${resource}\n\n ${yaml_text}= Run With Kubeconfig oc get -n ${namespace} -o yaml ${type} ${resource}\n ${yaml_data}= Yaml Parse ${yaml_text}\n\n RETURN ${yaml_data}","name":"Oc Get","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/oc.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${type} ${namespace} ${resource}"} {"code":"Oc Get JsonPath\n [Documentation] Run 'oc get' for a specific instance of a type in a namespace\n ... with jsonpath provided. Returns output of the command without any parsing.\n [Arguments] ${type} ${namespace} ${resource} ${jsonpath}\n\n IF \"${namespace}\"==\"${EMPTY}\"\n ${namespace_arg}= Set Variable -A\n ELSE\n ${namespace_arg}= Set Variable -n ${namespace}\n END\n\n ${text}= Run With Kubeconfig oc get ${namespace_arg} -o=jsonpath='{ ${jsonpath} }' ${type} ${resource}\n\n RETURN ${text}","name":"Oc Get JsonPath","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/oc.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${type} ${namespace} ${resource} ${jsonpath}"} {"code":"Oc Apply\n [Documentation] Run 'oc apply' on a specific pod in the curret test namespace\n ... Returns the command's combined STDOUT\/STDER\n [Arguments] ${opts}\n ${output}= Run With Kubeconfig oc apply ${opts}\n RETURN ${output}","name":"Oc Apply","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/oc.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${opts}"} {"code":"Oc Delete\n [Documentation] Run 'oc delete' on a specific pod in the curret test namespace\n ... Returns the command's combined STDOUT\/STDER\n [Arguments] ${opts}\n ${output}= Run With Kubeconfig oc delete ${opts}\n RETURN ${output}","name":"Oc Delete","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/oc.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${opts}"} {"code":"Oc Exec\n [Documentation] Run 'oc exec' on a specific pod in the curret test namespace\n ... Returns the command's combined STDOUT\/STDER\n [Arguments] ${pod} ${cmd} ${ns}=${NAMESPACE}\n ${output}= Run With Kubeconfig oc exec -n ${ns} pod\/${pod} -- \/bin\/bash -c '${cmd}'\n RETURN ${output}","name":"Oc Exec","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/oc.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${pod} ${cmd} ${ns}=${NAMESPACE}"} {"code":"Oc Wait\n [Documentation] Run 'oc wait' on a specific resource.\n ... 'resource' should contain: \"-n namespace\" (if applicable), name, and kind.\n ... For example: \"-n test-ns pod test-pod\".\n ... 'opts' should contain a condition and additional parameters like timeout.\n ... Returns the combined STDOUT\/STDERR output of the command.\n [Arguments] ${resource} ${opts}\n ${output} ${rc}= Run With Kubeconfig\n ... oc wait ${resource} ${opts}\n ... allow_fail=${TRUE}\n ... return_rc=${TRUE}\n IF ${rc} != 0\n Run With Kubeconfig oc describe ${resource} allow_fail=${TRUE}\n Log 'oc wait ${resource} ${opts}' failed\n Should Be Equal As Integers ${rc} 0\n END\n RETURN ${output}","name":"Oc Wait","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/oc.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"'opts' should contain a condition and additional parameters like timeout.\n ... Returns the combined STDOUT\/STDERR output of the command."} {"code":"Named Pod Should Be Ready\n [Documentation] Wait for pod with name \\${name} to become \"Ready\"\n ... ${name} Name of pod to wait for\n ... ${ns} Namespace of named pod. Defaults to NAMESPACE suite variable\n ... ${timeout} Period of time to wait for pod to reach ready status. Default 60s.\n [Arguments] ${name} ${ns}=${NAMESPACE} ${timeout}=${DEFAULT_WAIT_TIMEOUT}\n\n Oc Wait -n ${ns} pod\/${name} --for=\"condition=Ready\" --timeout=${timeout}","name":"Named Pod Should Be Ready","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/oc.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'DEFAULT_WAIT_TIMEOUT': {'text': '${DEFAULT_WAIT_TIMEOUT} 60s'}}","documentation":"[Arguments] ${name} ${ns}=${NAMESPACE} ${timeout}=${DEFAULT_WAIT_TIMEOUT}"} {"code":"Named Pod Should Be Deleted\n [Documentation] Wait for pod with ${name} to be deleted\n ... ${name} Name of pod to wait for\n ... ${ns} Namespace of named pod. Defaults to NAMESPACE suite variable\n ... ${timeout} Period of time to wait for pod to reach ready status. Default 60s.\n [Arguments] ${name} ${ns}=${NAMESPACE} ${timeout}=${DEFAULT_WAIT_TIMEOUT}\n Oc Wait -n ${ns} pod\/${name} --for=delete --timeout=${timeout}","name":"Named Pod Should Be Deleted","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/oc.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'DEFAULT_WAIT_TIMEOUT': {'text': '${DEFAULT_WAIT_TIMEOUT} 60s'}}","documentation":"${ns} Namespace of named pod. Defaults to NAMESPACE suite variable\n ... ${timeout} Period of time to wait for pod to reach ready status. Default 60s."} {"code":"Labeled Pod Should Be Ready\n [Documentation] Wait for pod(s) ready by ${label} to become \"Ready\"\n ... ${label} A label selector value to match by (e.g. \"app\\=my_app\"). Note that '=' must be escaped with '\\'.\n ... ${ns} Namespace of named pod. Defaults to NAMESPACE suite variable\n ... ${timeout} Period of time to wait for pod to reach ready status. Default 60s.\n [Arguments] ${label} ${ns}=${NAMESPACE} ${timeout}=${DEFAULT_WAIT_TIMEOUT}\n Oc Wait -n ${ns} pod --selector=\"${label}\" --for=condition=Ready --timeout=${timeout}","name":"Labeled Pod Should Be Ready","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/oc.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'DEFAULT_WAIT_TIMEOUT': {'text': '${DEFAULT_WAIT_TIMEOUT} 60s'}}","documentation":"${ns} Namespace of named pod. Defaults to NAMESPACE suite variable\n ... ${timeout} Period of time to wait for pod to reach ready status. Default 60s."} {"code":"Named Deployment Should Be Available\n [Documentation] Wait for a given deployment's Available condition to be true\n ... ${name} Name of deployment to wait for\n ... ${ns} Namespace of named deployment. Defaults to NAMESPACE suite variable\n ... ${timeout} Period of time to wait for deployment to reach ready status. Default 60s.\n [Arguments] ${name} ${ns}=${NAMESPACE} ${timeout}=${DEFAULT_WAIT_TIMEOUT}\n Oc Wait -n ${ns} deploy ${name} --for=condition=Available --timeout=${timeout}","name":"Named Deployment Should Be Available","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/oc.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'DEFAULT_WAIT_TIMEOUT': {'text': '${DEFAULT_WAIT_TIMEOUT} 60s'}}","documentation":"${ns} Namespace of named deployment. Defaults to NAMESPACE suite variable\n ... ${timeout} Period of time to wait for deployment to reach ready status. Default 60s."} {"code":"Named Daemonset Should Be Available\n [Documentation] Wait for a given daemonset's Available condition to be true\n ... ${name} Name of daemonset to wait for\n ... ${ns} Namespace of named daemonset. Defaults to NAMESPACE suite variable\n ... ${timeout} Period of time to wait for daemonset to reach ready status. Default 60s.\n [Arguments] ${name} ${ns}=${NAMESPACE} ${timeout}=${DEFAULT_WAIT_TIMEOUT}\n Oc Wait -n ${ns} daemonset ${name} --for=jsonpath='{.status.numberAvailable}'=1 --timeout=${timeout}","name":"Named Daemonset Should Be Available","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/oc.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'DEFAULT_WAIT_TIMEOUT': {'text': '${DEFAULT_WAIT_TIMEOUT} 60s'}}","documentation":"${ns} Namespace of named daemonset. Defaults to NAMESPACE suite variable\n ... ${timeout} Period of time to wait for daemonset to reach ready status. Default 60s."} {"code":"Wait Until Resource Exists\n [Documentation] Waits for a resource to exist.\n [Arguments] ${type} ${name} ${ns}=${NAMESPACE} ${timeout}=${DEFAULT_WAIT_TIMEOUT}\n Wait Until Keyword Succeeds ${timeout} 5s\n ... Oc Get ${type} ${ns} ${name}","name":"Wait Until Resource Exists","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/oc.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'DEFAULT_WAIT_TIMEOUT': {'text': '${DEFAULT_WAIT_TIMEOUT} 60s'}}","documentation":"[Arguments] ${type} ${name} ${ns}=${NAMESPACE} ${timeout}=${DEFAULT_WAIT_TIMEOUT}"} {"code":"Named PVC Should Be Resized\n [Documentation] Wait for pvc with ${name} to resize to ${to_size}\n ... ${name} Name of pvc to wait for\n ... ${ns} Namespace of named pvc. Defaults to NAMESPACE suite variable\n ... ${to_size} Size pvc is expected to be updated to\n ... ${timeout} Period of time to wait for pvc to resize to new size. Default 60s.\n [Arguments] ${name} ${to_size} ${ns}=${NAMESPACE} ${timeout}=${DEFAULT_WAIT_TIMEOUT}\n Oc Wait -n ${ns} pvc\/${name}\n ... --for=jsonpath=\"{.spec.resources.requests.storage}\"=${to_size} --timeout=${timeout}","name":"Named PVC Should Be Resized","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/oc.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'DEFAULT_WAIT_TIMEOUT': {'text': '${DEFAULT_WAIT_TIMEOUT} 60s'}}","documentation":"${to_size} Size pvc is expected to be updated to\n ... ${timeout} Period of time to wait for pvc to resize to new size. Default 60s."} {"code":"Named PVC Should Be Deleted\n [Documentation] Wait for pvc with ${name} to be deleted\n ... ${name} Name of pvc to wait for\n ... ${ns} Namespace of named pvc. Defaults to NAMESPACE suite variable\n ... ${timeout} Period of time to wait for pvc to be deleted. Default 60s.\n [Arguments] ${name} ${ns}=${NAMESPACE} ${timeout}=${DEFAULT_WAIT_TIMEOUT}\n ${output}= Oc Wait -n ${ns} pvc\/${name} --for=Delete --timeout=${timeout}\n RETURN ${output}","name":"Named PVC Should Be Deleted","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/oc.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'DEFAULT_WAIT_TIMEOUT': {'text': '${DEFAULT_WAIT_TIMEOUT} 60s'}}","documentation":"[Arguments] ${name} ${ns}=${NAMESPACE} ${timeout}=${DEFAULT_WAIT_TIMEOUT}"} {"code":"Named VolumeSnapshot Should Be Ready\n [Documentation] Wait for a volumesnap ${name} to become \"readyToUse\"\n ... ${name} Name of volumesnapshot to wait for\n ... ${timeout} Period of time to wait for volumeSnapshot ready \"readyToUse\" state. Default 60s.\n [Arguments] ${name} ${timeout}=${DEFAULT_WAIT_TIMEOUT}\n Oc Wait volumesnapshot\/${name} -n ${NAMESPACE} --for=jsonpath='{.status.readyToUse}=true'","name":"Named VolumeSnapshot Should Be Ready","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/oc.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'DEFAULT_WAIT_TIMEOUT': {'text': '${DEFAULT_WAIT_TIMEOUT} 60s'}}","documentation":"${name} Name of volumesnapshot to wait for\n ... ${timeout} Period of time to wait for volumeSnapshot ready \"readyToUse\" state. Default 60s."} {"code":"Named VolumeSnapshot Should Be Deleted\n [Documentation] Wait for volumesnapshot with ${name} to be deleted\n ... ${name} Name of volumesnapshot to wait for\n ... ${ns} Namespace of named pod. Defaults to NAMESPACE suite variable, specified by\n ... ${timeout} Period of time to wait for volumesnapshot to reach ready status. Default 60s.\n [Arguments] ${name} ${ns}=${NAMESPACE} ${timeout}=${DEFAULT_WAIT_TIMEOUT}\n Oc Wait -n ${ns} volumesnapshot\/${name} --for=Delete --timeout=${timeout}","name":"Named VolumeSnapshot Should Be Deleted","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/oc.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'DEFAULT_WAIT_TIMEOUT': {'text': '${DEFAULT_WAIT_TIMEOUT} 60s'}}","documentation":"${ns} Namespace of named pod. Defaults to NAMESPACE suite variable, specified by\n ... ${timeout} Period of time to wait for volumesnapshot to reach ready status. Default 60s."} {"code":"Oc Create\n [Documentation] Run 'oc create' on a specific resource in the current test namespace\n ... Returns the combined STDOUT\/STDERR output of the command.\n [Arguments] ${opts}\n ${output}= Run With Kubeconfig oc create ${opts}\n RETURN ${output}","name":"Oc Create","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/oc.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${opts}"} {"code":"Oc Expose\n [Documentation] Run 'oc expose' on a specific resource in the current test namespace\n ... Returns the combined STDOUT\/STDERR output of the command.\n [Arguments] ${opts}\n ${output}= Run With Kubeconfig oc expose ${opts}\n RETURN ${output}","name":"Oc Expose","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/oc.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${opts}"} {"code":"Oc Patch\n [Documentation] Run 'oc patch' on a specific resource in the current test namespace\n ... Returns the combined STDOUT\/STDER output of the command.\n [Arguments] ${type_name} ${opts}\n ${output}= Run With Kubeconfig oc patch -n ${NAMESPACE} ${type_name} -p ${opts}\n RETURN ${output}","name":"Oc Patch","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/oc.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${type_name} ${opts}"} {"code":"Oc Logs\n [Documentation] Run 'oc logs' on a specific resource in the given namespace.\n ... Returns the combined STDOUT\/STDER output of the command.\n [Arguments] ${opts} ${namespace}\n ${output}= Run With Kubeconfig oc logs -n ${namespace} ${opts}\n RETURN ${output}","name":"Oc Logs","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/oc.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${opts} ${namespace}"} {"code":"*** Settings ***\nDocumentation Keyword for offline (isolated) test suites\n\nLibrary OperatingSystem\nLibrary qemu-guest-agent.py\nResource libvirt.resource\n\n\n*** Variables ***\n${GUEST_NAME} ${EMPTY}\n${NODE_IP} 10.44.0.1\n\n\n*** Keywords ***\nSetup Suite\n [Documentation] Setup offline test suite.\n Should Not Be Equal As Strings ${GUEST_NAME} '' The guest name must be set.\n Wait Until Keyword Succeeds 5m 10s\n ... Guest Agent Is Ready ${GUEST_NAME}\n\n # Verify that no active ethernet connections exist. The grep\n # command returns 1 when no lines are selected.\n ${result} ${ignore}= Run Guest Process ${GUEST_NAME}\n ... bash\n ... -c\n ... nmcli connection show | grep -q ethernet\n Should Be Equal As Integers ${result[\"rc\"]} 1\n\n # Verify MicroShift successful start on first boot\n Wait For Greenboot Health Check To Exit\n\nWait For Greenboot Health Check To Exit\n [Documentation] Wait for the Greenboot Health Check systemd service to exit\n Wait Until Keyword Succeeds 10m 15s\n ... Greenboot Health Check Exited\n\nGreenboot Health Check Exited\n [Documentation] Check that the Greenboot Health Check systemd service has state \"exited\"\n ${result} ${exited}= Wait Until Keyword Succeeds 5x 5s\n ... Run Guest Process ${GUEST_NAME}\n ... systemctl\n ... show\n ... --property\\=SubState\n ... --value\n ... greenboot-healthcheck.service\n Should Be Equal As Integers ${result[\"rc\"]} 0\n Should Be Equal As Strings ${result[\"stdout\"]} exited\n\nReboot MicroShift Host\n [Documentation] Reboot the MicroShift host and wait for the boot ID to change. This has the intended\n ... side effect of waiting for the qemu-guest-agent service to come back online after the reboot.\n ${boot_id}= Guest Has Boot ID\n libvirt.Reboot MicroShift Host ${GUEST_NAME}\n Wait Until Keyword Succeeds 5m 1s\n ... System Is Rebooted ${boot_id}\n\nSystem Is Rebooted\n [Documentation] Verify that the guest's boot ID matches the specified boot ID.\n [Arguments] ${boot_id}\n ${boot_id_actual}= Guest Has Boot ID\n Should Not Be Equal As Strings ${boot_id} ${boot_id_actual}\n\nGuest Has Boot ID\n [Documentation] Get the boot ID of the guest.\n ${boot_id}= Read From File ${GUEST_NAME} \/proc\/sys\/kernel\/random\/boot_id\n ${len}= Get Length ${boot_id}\n Should Not Be Equal As Integers ${len} 0\n RETURN ${boot_id}\n\nSend File\n [Documentation] Send a file to the guest. Does not retain permissions or ownership.\n [Arguments] ${src} ${dest}\n ${data}= OperatingSystem.Get File ${src}\n ${len}= Get Length ${data}\n ${w_len}= Write To File ${GUEST_NAME} ${dest} ${data}\n Should Be Equal As Integers ${len} ${w_len}\n\nRun With Kubeconfig\n [Documentation] Run a guest-command with the KUBECONFIG environment variable set\n ... ${command} The command to run. Should but `oc` or `kubectl` but this is not enforced\n ... @{args} The arguments to pass to the command. See ..\/..\/resources\/qemu-guest-agent.py for syntax\n [Arguments] ${command} @{args}\n ${env}= Create Dictionary KUBECONFIG=\/var\/lib\/microshift\/resources\/kubeadmin\/kubeconfig\n ${result} ${ignore}= Wait Until Keyword Succeeds 5x 2s\n ... Run Guest Process ${GUEST_NAME} ${command} @{args} env=&{env}\n Log Many ${result[\"stdout\"]} ${result[\"stderr\"]}\n Should Be Equal As Integers ${result[\"rc\"]} 0\n RETURN ${result}\n\nSystemctl\n [Documentation] Run systemctl on the guest\n [Arguments] ${verb} ${service} @{args}\n ${result} ${exited}= Wait Until Keyword Succeeds 5m 10s\n ... Run Guest Process ${GUEST_NAME} systemctl ${verb} ${service} @{args}\n Log Many ${result[\"stdout\"]} ${result[\"stderr\"]}\n Should Be Equal As Integers ${result[\"rc\"]} 0\n","name":"\/tmp\/repos\/microshift\/test\/resources\/offline.resource","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/offline.resource","element_type":"resource","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Setup Suite\n [Documentation] Setup offline test suite.\n Should Not Be Equal As Strings ${GUEST_NAME} '' The guest name must be set.\n Wait Until Keyword Succeeds 5m 10s\n ... Guest Agent Is Ready ${GUEST_NAME}\n\n # Verify that no active ethernet connections exist. The grep\n # command returns 1 when no lines are selected.\n ${result} ${ignore}= Run Guest Process ${GUEST_NAME}\n ... bash\n ... -c\n ... nmcli connection show | grep -q ethernet\n Should Be Equal As Integers ${result[\"rc\"]} 1\n\n # Verify MicroShift successful start on first boot\n Wait For Greenboot Health Check To Exit","name":"Setup Suite","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/offline.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'GUEST_NAME': {'text': '${GUEST_NAME} ${EMPTY}'}}","documentation":"Should Not Be Equal As Strings ${GUEST_NAME} '' The guest name must be set."} {"code":"Wait For Greenboot Health Check To Exit\n [Documentation] Wait for the Greenboot Health Check systemd service to exit\n Wait Until Keyword Succeeds 10m 15s\n ... Greenboot Health Check Exited","name":"Wait For Greenboot Health Check To Exit","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/offline.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Wait Until Keyword Succeeds 10m 15s\n ... Greenboot Health Check Exited"} {"code":"Greenboot Health Check Exited\n [Documentation] Check that the Greenboot Health Check systemd service has state \"exited\"\n ${result} ${exited}= Wait Until Keyword Succeeds 5x 5s\n ... Run Guest Process ${GUEST_NAME}\n ... systemctl\n ... show\n ... --property\\=SubState\n ... --value\n ... greenboot-healthcheck.service\n Should Be Equal As Integers ${result[\"rc\"]} 0\n Should Be Equal As Strings ${result[\"stdout\"]} exited","name":"Greenboot Health Check Exited","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/offline.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'GUEST_NAME': {'text': '${GUEST_NAME} ${EMPTY}'}}","documentation":"${result} ${exited}= Wait Until Keyword Succeeds 5x 5s\n ... Run Guest Process ${GUEST_NAME}\n ... systemctl\n ... show\n ... --property\\=SubState\n ... --value\n ... greenboot-healthcheck.service"} {"code":"Reboot MicroShift Host\n [Documentation] Reboot the MicroShift host and wait for the boot ID to change. This has the intended\n ... side effect of waiting for the qemu-guest-agent service to come back online after the reboot.\n ${boot_id}= Guest Has Boot ID\n libvirt.Reboot MicroShift Host ${GUEST_NAME}\n Wait Until Keyword Succeeds 5m 1s\n ... System Is Rebooted ${boot_id}","name":"Reboot MicroShift Host","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/offline.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'GUEST_NAME': {'text': '${GUEST_NAME} ${EMPTY}'}}","documentation":"side effect of waiting for the qemu-guest-agent service to come back online after the reboot."} {"code":"System Is Rebooted\n [Documentation] Verify that the guest's boot ID matches the specified boot ID.\n [Arguments] ${boot_id}\n ${boot_id_actual}= Guest Has Boot ID\n Should Not Be Equal As Strings ${boot_id} ${boot_id_actual}","name":"System Is Rebooted","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/offline.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${boot_id}"} {"code":"Guest Has Boot ID\n [Documentation] Get the boot ID of the guest.\n ${boot_id}= Read From File ${GUEST_NAME} \/proc\/sys\/kernel\/random\/boot_id\n ${len}= Get Length ${boot_id}\n Should Not Be Equal As Integers ${len} 0\n RETURN ${boot_id}","name":"Guest Has Boot ID","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/offline.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'GUEST_NAME': {'text': '${GUEST_NAME} ${EMPTY}'}}","documentation":"${boot_id}= Read From File ${GUEST_NAME} \/proc\/sys\/kernel\/random\/boot_id"} {"code":"Send File\n [Documentation] Send a file to the guest. Does not retain permissions or ownership.\n [Arguments] ${src} ${dest}\n ${data}= OperatingSystem.Get File ${src}\n ${len}= Get Length ${data}\n ${w_len}= Write To File ${GUEST_NAME} ${dest} ${data}\n Should Be Equal As Integers ${len} ${w_len}","name":"Send File","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/offline.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'GUEST_NAME': {'text': '${GUEST_NAME} ${EMPTY}'}}","documentation":"[Arguments] ${src} ${dest}"} {"code":"Run With Kubeconfig\n [Documentation] Run a guest-command with the KUBECONFIG environment variable set\n ... ${command} The command to run. Should but `oc` or `kubectl` but this is not enforced\n ... @{args} The arguments to pass to the command. See ..\/..\/resources\/qemu-guest-agent.py for syntax\n [Arguments] ${command} @{args}\n ${env}= Create Dictionary KUBECONFIG=\/var\/lib\/microshift\/resources\/kubeadmin\/kubeconfig\n ${result} ${ignore}= Wait Until Keyword Succeeds 5x 2s\n ... Run Guest Process ${GUEST_NAME} ${command} @{args} env=&{env}\n Log Many ${result[\"stdout\"]} ${result[\"stderr\"]}\n Should Be Equal As Integers ${result[\"rc\"]} 0\n RETURN ${result}","name":"Run With Kubeconfig","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/offline.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'GUEST_NAME': {'text': '${GUEST_NAME} ${EMPTY}'}}","documentation":"[Arguments] ${command} @{args}"} {"code":"Systemctl\n [Documentation] Run systemctl on the guest\n [Arguments] ${verb} ${service} @{args}\n ${result} ${exited}= Wait Until Keyword Succeeds 5m 10s\n ... Run Guest Process ${GUEST_NAME} systemctl ${verb} ${service} @{args}\n Log Many ${result[\"stdout\"]} ${result[\"stderr\"]}\n Should Be Equal As Integers ${result[\"rc\"]} 0","name":"Systemctl","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/offline.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'GUEST_NAME': {'text': '${GUEST_NAME} ${EMPTY}'}}","documentation":"[Arguments] ${verb} ${service} @{args}"} {"code":"*** Settings ***\nDocumentation Keywords for using the openssl command line.\n...\n\nResource common.resource\n\n\n*** Keywords ***\nOpenssl\n [Documentation] openssl command wrapper\n [Arguments] ${cmd} ${cmd2}=\n ${result}= Run Process openssl ${cmd} ${cmd2} shell=True # robotcode: ignore\n Should Be Equal As Integers ${result.rc} 0\n\nGenerate CSR Config\n [Documentation] Generate csr based on config template file\n [Arguments] ${config_template_file} ${output_file}\n ${template}= OperatingSystem.Get File ${config_template_file}\n ${message}= Replace Variables ${template}\n OperatingSystem.Append To File ${output_file} ${message}\n","name":"\/tmp\/repos\/microshift\/test\/resources\/openssl.resource","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/openssl.resource","element_type":"resource","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Openssl\n [Documentation] openssl command wrapper\n [Arguments] ${cmd} ${cmd2}=\n ${result}= Run Process openssl ${cmd} ${cmd2} shell=True # robotcode: ignore\n Should Be Equal As Integers ${result.rc} 0","name":"Openssl","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/openssl.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${cmd} ${cmd2}=\n ${result}= Run Process openssl ${cmd} ${cmd2} shell=True"} {"code":"Generate CSR Config\n [Documentation] Generate csr based on config template file\n [Arguments] ${config_template_file} ${output_file}\n ${template}= OperatingSystem.Get File ${config_template_file}\n ${message}= Replace Variables ${template}\n OperatingSystem.Append To File ${output_file} ${message}","name":"Generate CSR Config","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/openssl.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${config_template_file} ${output_file}"} {"code":"*** Settings ***\nDocumentation Keywords for OSTree-based systems\n\nResource systemd.resource\nResource microshift-process.resource\nLibrary libostree.py\n\n\n*** Variables ***\n${DATA_DIR} \/var\/lib\/microshift\n${BACKUP_STORAGE} \/var\/lib\/microshift-backups\n\n\n*** Keywords ***\nGet Future Backup Name For Current Boot\n [Documentation] Provides a name for future backup\n ... including deployment ID + boot ID\n\n ${deploy_id}= Get Booted Deployment ID\n ${boot_id}= Get Current Boot Id\n ${backup_name}= Catenate SEPARATOR=_ ${deploy_id} ${boot_id}\n RETURN ${backup_name}\n\nCreate Backup\n [Documentation] Stops MicroShift and creates manual backup\n ... and optional marker file for validating.\n [Arguments] ${backup_name} ${create_marker_file}=${FALSE}\n Systemctl stop microshift.service\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... microshift backup \"${BACKUP_STORAGE}\/${backup_name}\"\n ... sudo=True return_stderr=True return_rc=True\n Should Be Equal As Integers 0 ${rc}\n\n IF ${create_marker_file}\n # create a marker that we expect to show up in data directory after restore\n ${mark_stdout} ${mark_stderr} ${mark_rc}= Execute Command\n ... touch ${BACKUP_STORAGE}\/${backup_name}\/marker\n ... sudo=True return_stderr=True return_rc=True\n Should Be Equal As Integers 0 ${mark_rc}\n END\n\nBackup Should Exist\n [Documentation] Checks if backup identified by deployment ID\n ... and (optionally) boot ID exists\n [Arguments] ${deployment_id} ${boot_id}=${EMPTY}\n ${exists}= Does Backup Exist ${deployment_id} ${boot_id}\n Should Be True ${exists}\n\nBackup Should Not Exist\n [Documentation] Checks if backup identified by deployment ID\n ... and (optionally) boot ID does not exist\n [Arguments] ${deployment_id} ${boot_id}=${EMPTY}\n ${exists}= Does Backup Exist ${deployment_id} ${boot_id}\n Should Not Be True ${exists}\n\nRemove Existing Backup For Current Deployment\n [Documentation] Remove any existing backup for currently running deployment\n ${deploy_id}= Get Booted Deployment Id\n Remove Backups For Deployment ${deploy_id}\n","name":"\/tmp\/repos\/microshift\/test\/resources\/ostree-data.resource","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/ostree-data.resource","element_type":"resource","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Get Future Backup Name For Current Boot\n [Documentation] Provides a name for future backup\n ... including deployment ID + boot ID\n\n ${deploy_id}= Get Booted Deployment ID\n ${boot_id}= Get Current Boot Id\n ${backup_name}= Catenate SEPARATOR=_ ${deploy_id} ${boot_id}\n RETURN ${backup_name}","name":"Get Future Backup Name For Current Boot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/ostree-data.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"including deployment ID + boot ID"} {"code":"Create Backup\n [Documentation] Stops MicroShift and creates manual backup\n ... and optional marker file for validating.\n [Arguments] ${backup_name} ${create_marker_file}=${FALSE}\n Systemctl stop microshift.service\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... microshift backup \"${BACKUP_STORAGE}\/${backup_name}\"\n ... sudo=True return_stderr=True return_rc=True\n Should Be Equal As Integers 0 ${rc}\n\n IF ${create_marker_file}\n # create a marker that we expect to show up in data directory after restore\n ${mark_stdout} ${mark_stderr} ${mark_rc}= Execute Command\n ... touch ${BACKUP_STORAGE}\/${backup_name}\/marker\n ... sudo=True return_stderr=True return_rc=True\n Should Be Equal As Integers 0 ${mark_rc}\n END","name":"Create Backup","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/ostree-data.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'BACKUP_STORAGE': {'text': '${BACKUP_STORAGE} \/var\/lib\/microshift-backups'}}","documentation":"and optional marker file for validating."} {"code":"Backup Should Exist\n [Documentation] Checks if backup identified by deployment ID\n ... and (optionally) boot ID exists\n [Arguments] ${deployment_id} ${boot_id}=${EMPTY}\n ${exists}= Does Backup Exist ${deployment_id} ${boot_id}\n Should Be True ${exists}","name":"Backup Should Exist","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/ostree-data.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${deployment_id} ${boot_id}=${EMPTY}"} {"code":"Backup Should Not Exist\n [Documentation] Checks if backup identified by deployment ID\n ... and (optionally) boot ID does not exist\n [Arguments] ${deployment_id} ${boot_id}=${EMPTY}\n ${exists}= Does Backup Exist ${deployment_id} ${boot_id}\n Should Not Be True ${exists}","name":"Backup Should Not Exist","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/ostree-data.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${deployment_id} ${boot_id}=${EMPTY}"} {"code":"Remove Existing Backup For Current Deployment\n [Documentation] Remove any existing backup for currently running deployment\n ${deploy_id}= Get Booted Deployment Id\n Remove Backups For Deployment ${deploy_id}","name":"Remove Existing Backup For Current Deployment","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/ostree-data.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${deploy_id}= Get Booted Deployment Id"} {"code":"*** Settings ***\nDocumentation Keywords for OSTree-based systems\n\nResource systemd.resource\nResource microshift-process.resource\nResource ostree-data.resource\n\n\n*** Keywords ***\nWait Until Greenboot Health Check Exited\n [Documentation] Wait until greenboot healthchecks are done\n\n Wait Until Keyword Succeeds 10m 15s\n ... Greenboot Health Check Exited\n\nGreenboot Health Check Exited\n [Documentation] Checks if greenboot-healthcheck finished running successfully (exited)\n\n Systemctl Check Service SubState greenboot-healthcheck.service exited\n\nRestart Greenboot And Wait For Success\n [Documentation] Restart the greenboot-healthcheck service and check its status\n\n ${unit_name}= Set Variable greenboot-healthcheck.service\n\n # Note that the Systemctl keyword from systemd.resource cannot be used to\n # restart the greenboot-healthcheck service due to the keyword expecting\n # the 'running' state after the restart. This condition does not apply on\n # services like greenboot that exit after their startup finishes.\n ${stdout} ${stderr} ${rc}= Execute Command\n ... systemctl restart ${unit_name}\n ... sudo=True return_stdout=True return_stderr=True return_rc=True\n IF ${rc} != 0 Systemctl Print Service Status And Logs ${unit_name}\n Should Be Equal As Integers 0 ${rc}\n\n Wait Until Greenboot Health Check Exited\n","name":"\/tmp\/repos\/microshift\/test\/resources\/ostree-health.resource","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/ostree-health.resource","element_type":"resource","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Wait Until Greenboot Health Check Exited\n [Documentation] Wait until greenboot healthchecks are done\n\n Wait Until Keyword Succeeds 10m 15s\n ... Greenboot Health Check Exited","name":"Wait Until Greenboot Health Check Exited","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/ostree-health.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Wait Until Keyword Succeeds 10m 15s\n ... Greenboot Health Check Exited"} {"code":"Greenboot Health Check Exited\n [Documentation] Checks if greenboot-healthcheck finished running successfully (exited)\n\n Systemctl Check Service SubState greenboot-healthcheck.service exited","name":"Greenboot Health Check Exited","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/ostree-health.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Systemctl Check Service SubState greenboot-healthcheck.service exited"} {"code":"Restart Greenboot And Wait For Success\n [Documentation] Restart the greenboot-healthcheck service and check its status\n\n ${unit_name}= Set Variable greenboot-healthcheck.service\n\n # Note that the Systemctl keyword from systemd.resource cannot be used to\n # restart the greenboot-healthcheck service due to the keyword expecting\n # the 'running' state after the restart. This condition does not apply on\n # services like greenboot that exit after their startup finishes.\n ${stdout} ${stderr} ${rc}= Execute Command\n ... systemctl restart ${unit_name}\n ... sudo=True return_stdout=True return_stderr=True return_rc=True\n IF ${rc} != 0 Systemctl Print Service Status And Logs ${unit_name}\n Should Be Equal As Integers 0 ${rc}\n\n Wait Until Greenboot Health Check Exited","name":"Restart Greenboot And Wait For Success","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/ostree-health.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${unit_name}= Set Variable greenboot-healthcheck.service"} {"code":"*** Settings ***\nDocumentation Keywords for OSTree-based systems\n\nResource systemd.resource\nResource microshift-process.resource\nResource ostree-data.resource\nResource ostree-health.resource\nResource microshift-host.resource\nLibrary libostree.py\nLibrary ..\/resources\/TestAgent.py\n\n\n*** Keywords ***\nCurrent Deployment Should Be\n [Documentation] Checks if currently booted deployment is as expected\n [Arguments] ${expected_deploy}\n\n Make New SSH Connection\n\n ${current_deploy}= libostree.Get Booted Deployment Id\n Should Be Equal As Strings ${expected_deploy} ${current_deploy}\n\nDeploy Commit\n [Documentation] Deploys the given reference on ostree or bootc systems.\n ... When the '${registry_url}' argument is not empty, the function assumes\n ... that a bootc deployment needs to be performed.\n [Arguments] ${ref} ${write_agent_cfg} ${registry_url}\n\n # Retry on rebasing is an attempt to work around the issue described in\n # https:\/\/github.com\/ostreedev\/ostree-rs-ext\/issues\/657\n IF \"${registry_url}\"!=\"${EMPTY}\"\n # Allow insecure registry access when pulling the container image to be used\n Write Insecure Registry Url ${registry_url}\n ${deploy_id}= Wait Until Keyword Succeeds 3x 5s\n ... Rebase Bootc System ${registry_url}\/${ref}\n Remove Insecure Registry Url\n ELSE\n ${deploy_id}= Wait Until Keyword Succeeds 3x 5s\n ... Rebase System ${ref}\n END\n IF ${write_agent_cfg} TestAgent.Write\n\n RETURN ${deploy_id}\n\nDeploy Commit Expecting A Rollback\n [Documentation] Deploys given ref and configures test agent for failing greenboot.\n ... It expects the system to roll back. The '${registry_url}' optional\n ... argument should be provided on bootc systems.\n [Arguments] ${ref} ${write_agent_cfg}=${TRUE} ${registry_url}=${EMPTY}\n\n ${initial_deploy_id}= Get Booted Deployment Id\n ${deploy_id}= Deploy Commit ${ref} ${write_agent_cfg} ${registry_url}\n\n Write Greenboot Microshift Wait Timeout 90\n Reboot MicroShift Host\n\n Log To Console \"System rebased to ${ref} and rebooted - waiting for system to roll back\"\n Wait Until Keyword Succeeds 20m 15s\n ... Current Deployment Should Be ${initial_deploy_id}\n Log To Console \"System rolled back\"\n\n [Teardown] Remove Greenboot Microshift Wait Timeout\n\nDeploy Commit Not Expecting A Rollback\n [Documentation] Deploys given ref and configures test agent for failing greenboot.\n ... It does not expect the system to roll back. The '${registry_url}' optional\n ... argument should be provided on bootc systems.\n [Arguments] ${ref} ${write_agent_cfg}=${FALSE} ${registry_url}=${EMPTY}\n\n ${initial_deploy_id}= Get Booted Deployment Id\n ${deploy_id}= Deploy Commit ${ref} ${write_agent_cfg} ${registry_url}\n Reboot MicroShift Host\n\n Log To Console \"System rebased to ${ref} and rebooted - starting health checking\"\n Wait Until Keyword Succeeds 10m 15s\n ... System Is Running Right Ref And Healthy ${deploy_id} ${initial_deploy_id}\n\nSystem Is Running Right Ref And Healthy\n [Documentation] Checks if system is running right reference and is healthy\n [Arguments] ${expected_deploy} ${initial_deploy}\n\n Make New SSH Connection\n\n ${current_deploy}= libostree.Get Booted Deployment Id\n IF \"${current_deploy}\" == \"${initial_deploy}\"\n Fatal Error \"System rolled back to initial deployment\"\n END\n\n Should Be Equal As Strings ${expected_deploy} ${current_deploy}\n Greenboot Health Check Exited\n\nWait For Transaction To End\n [Documentation] Wait for any ostree transaction to end.\n ... When grub boots previous deployment due to greenboot failure,\n ... ostree status is updated by greenboot running `rpm-ostree rollback`,\n ... so test must wait until that transaction is over before staging\n ... new deployment.\n\n Wait Until Keyword Succeeds 2m 15s\n ... No Transaction In Progress\n\nJournal Should Have Information About Failed Version Comparison\n [Documentation] Assert that unhealthy deployment's journal contains\n ... information about failed version compatibility check\n\n FOR ${boot} IN RANGE -3 0\n ${stdout} ${rc}= Execute Command\n ... journalctl --unit=microshift --boot=${boot} | grep \"FAIL version compatibility checks\"\n ... sudo=True\n ... return_stdout=True\n ... return_rc=True\n\n Log Many ${stdout} ${rc}\n Should Be Equal As Integers 0 ${rc}\n END\n\nExpected Boot Count\n [Documentation] Validate that the host rebooted only the specified number of times\n [Arguments] ${reboot_count}\n\n ${stdout}= Execute Command\n ... journalctl --list-boots --quiet | wc -l\n ... sudo=True return_rc=False\n\n Should Be Equal As Integers ${reboot_count} ${stdout}\n\nCreate Usr Directory Overlay\n [Documentation] Make \/usr dir writable by creating an overlay, rebooting\n ... will go back to being immutable.\n\n ${is_bootc}= Is System Bootc\n IF ${is_bootc}\n ${cmd}= Set Variable bootc usr-overlay\n ELSE\n ${cmd}= Set Variable rpm-ostree usroverlay\n END\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... ${cmd}\n ... sudo=True return_rc=True\n ... return_stdout=True return_stderr=True\n Should Be Equal As Integers 0 ${rc}\n","name":"\/tmp\/repos\/microshift\/test\/resources\/ostree.resource","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/ostree.resource","element_type":"resource","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Current Deployment Should Be\n [Documentation] Checks if currently booted deployment is as expected\n [Arguments] ${expected_deploy}\n\n Make New SSH Connection\n\n ${current_deploy}= libostree.Get Booted Deployment Id\n Should Be Equal As Strings ${expected_deploy} ${current_deploy}","name":"Current Deployment Should Be","imports_file_locations":"{'microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/ostree.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${expected_deploy}"} {"code":"Deploy Commit\n [Documentation] Deploys the given reference on ostree or bootc systems.\n ... When the '${registry_url}' argument is not empty, the function assumes\n ... that a bootc deployment needs to be performed.\n [Arguments] ${ref} ${write_agent_cfg} ${registry_url}\n\n # Retry on rebasing is an attempt to work around the issue described in\n # https:\/\/github.com\/ostreedev\/ostree-rs-ext\/issues\/657\n IF \"${registry_url}\"!=\"${EMPTY}\"\n # Allow insecure registry access when pulling the container image to be used\n Write Insecure Registry Url ${registry_url}\n ${deploy_id}= Wait Until Keyword Succeeds 3x 5s\n ... Rebase Bootc System ${registry_url}\/${ref}\n Remove Insecure Registry Url\n ELSE\n ${deploy_id}= Wait Until Keyword Succeeds 3x 5s\n ... Rebase System ${ref}\n END\n IF ${write_agent_cfg} TestAgent.Write\n\n RETURN ${deploy_id}","name":"Deploy Commit","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/ostree.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"When the '${registry_url}' argument is not empty, the function assumes\n ... that a bootc deployment needs to be performed."} {"code":"Deploy Commit Expecting A Rollback\n [Documentation] Deploys given ref and configures test agent for failing greenboot.\n ... It expects the system to roll back. The '${registry_url}' optional\n ... argument should be provided on bootc systems.\n [Arguments] ${ref} ${write_agent_cfg}=${TRUE} ${registry_url}=${EMPTY}\n\n ${initial_deploy_id}= Get Booted Deployment Id\n ${deploy_id}= Deploy Commit ${ref} ${write_agent_cfg} ${registry_url}\n\n Write Greenboot Microshift Wait Timeout 90\n Reboot MicroShift Host\n\n Log To Console \"System rebased to ${ref} and rebooted - waiting for system to roll back\"\n Wait Until Keyword Succeeds 20m 15s\n ... Current Deployment Should Be ${initial_deploy_id}\n Log To Console \"System rolled back\"\n\n [Teardown] Remove Greenboot Microshift Wait Timeout\n\nDeploy Commit Not Expecting A Rollback\n [Documentation] Deploys given ref and configures test agent for failing greenboot.\n ... It does not expect the system to roll back. The '${registry_url}' optional\n ... argument should be provided on bootc systems.\n [Arguments] ${ref} ${write_agent_cfg}=${FALSE} ${registry_url}=${EMPTY}\n\n ${initial_deploy_id}= Get Booted Deployment Id\n ${deploy_id}= Deploy Commit ${ref} ${write_agent_cfg} ${registry_url}\n Reboot MicroShift Host\n\n Log To Console \"System rebased to ${ref} and rebooted - starting health checking\"\n Wait Until Keyword Succeeds 10m 15s\n ... System Is Running Right Ref And Healthy ${deploy_id} ${initial_deploy_id}","name":"Deploy Commit Expecting A Rollback","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/ostree.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${ref} ${write_agent_cfg}=${TRUE} ${registry_url}=${EMPTY}"} {"code":"System Is Running Right Ref And Healthy\n [Documentation] Checks if system is running right reference and is healthy\n [Arguments] ${expected_deploy} ${initial_deploy}\n\n Make New SSH Connection\n\n ${current_deploy}= libostree.Get Booted Deployment Id\n IF \"${current_deploy}\" == \"${initial_deploy}\"\n Fatal Error \"System rolled back to initial deployment\"\n END\n\n Should Be Equal As Strings ${expected_deploy} ${current_deploy}\n Greenboot Health Check Exited","name":"System Is Running Right Ref And Healthy","imports_file_locations":"{'microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/ostree.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${expected_deploy} ${initial_deploy}"} {"code":"Wait For Transaction To End\n [Documentation] Wait for any ostree transaction to end.\n ... When grub boots previous deployment due to greenboot failure,\n ... ostree status is updated by greenboot running `rpm-ostree rollback`,\n ... so test must wait until that transaction is over before staging\n ... new deployment.\n\n Wait Until Keyword Succeeds 2m 15s\n ... No Transaction In Progress","name":"Wait For Transaction To End","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/ostree.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"so test must wait until that transaction is over before staging\n ... new deployment."} {"code":"Journal Should Have Information About Failed Version Comparison\n [Documentation] Assert that unhealthy deployment's journal contains\n ... information about failed version compatibility check\n\n FOR ${boot} IN RANGE -3 0\n ${stdout} ${rc}= Execute Command\n ... journalctl --unit=microshift --boot=${boot} | grep \"FAIL version compatibility checks\"\n ... sudo=True\n ... return_stdout=True\n ... return_rc=True\n\n Log Many ${stdout} ${rc}\n Should Be Equal As Integers 0 ${rc}\n END","name":"Journal Should Have Information About Failed Version Comparison","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/ostree.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"information about failed version compatibility check"} {"code":"Expected Boot Count\n [Documentation] Validate that the host rebooted only the specified number of times\n [Arguments] ${reboot_count}\n\n ${stdout}= Execute Command\n ... journalctl --list-boots --quiet | wc -l\n ... sudo=True return_rc=False\n\n Should Be Equal As Integers ${reboot_count} ${stdout}","name":"Expected Boot Count","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/ostree.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${reboot_count}"} {"code":"Create Usr Directory Overlay\n [Documentation] Make \/usr dir writable by creating an overlay, rebooting\n ... will go back to being immutable.\n\n ${is_bootc}= Is System Bootc\n IF ${is_bootc}\n ${cmd}= Set Variable bootc usr-overlay\n ELSE\n ${cmd}= Set Variable rpm-ostree usroverlay\n END\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... ${cmd}\n ... sudo=True return_rc=True\n ... return_stdout=True return_stderr=True\n Should Be Equal As Integers 0 ${rc}","name":"Create Usr Directory Overlay","imports_file_locations":"{'microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/ostree.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"will go back to being immutable."} {"code":"*** Settings ***\nDocumentation Keywords for OSTree-based systems\n\nResource ostree-data.resource\nLibrary Collections\nLibrary SSHLibrary\nLibrary selinux.py\n\n\n*** Keywords ***\nValidate SELinux With Backup\n [Documentation] Wrapper call for all SELinux checks with extra check inside backup folder\n [Arguments] ${backup_name}\n\n ${result}= Run Access Check On Dir \"${BACKUP_STORAGE}\/${backup_name}\"\n Should Be Empty ${result}\n\n Validate SELinux\n\nValidate SELinux\n [Documentation] Wrapper call for all SELinux checks\n\n Containers Should Not Have Access To Container Var Lib Labels\n Context Traversal Should Not Gain More Access\n Folders Should Have Expected Fcontext Types\n Semanage Fcontext Should Have MicroShift Rules\n Audit Log Should Be Empty For MicroShift\n\nContainers Should Not Have Access To Container Var Lib Labels\n [Documentation] Performs a check to make sure containers can not access\n ... files or folders that are labeled with container var lib as well as the\n ... generated backup file\n\n ${default_result}= Run Default Access Check\n Should Be Empty ${default_result}\n\n # Copy over a test file that forks and execs the given command\n SSHLibrary.Put File .\/assets\/selinux-test-exec.sh \/tmp\/selinux-test-exec.sh\n\n # Here we check that given a priveleged context, it can not domain transition to a context with privelage.\n #\n # Validate that the given path `kubelet_exec_t -> kubelet_t -> container_var_lib_t` should not be possible\n # when running under context container_t\n ${default_transition_result}= Run Default Access Binary Transition Check \/tmp\/selinux-test-exec.sh\n Should Be Empty ${default_transition_result}\n\nFolders Should Have Expected Fcontext Types\n [Documentation] Performs a check to make sure the folders created during rpm install\n ... have the expected fcontext values\n\n ${err_list}= Run Fcontext Check\n Should Be Empty ${err_list}\n\nSemanage Fcontext Should Have MicroShift Rules\n [Documentation] Validates that the fcontext data includes the MicroShift rules\n # Refer to ${reporoot}\/packaging\/selinux\/microshift.fc\n ${result}= Get Fcontext List\n List Should Contain Value ${result} \/etc\/microshift(\/.*)?\n List Should Contain Value ${result} \/usr\/bin\/microshift\n List Should Contain Value ${result} \/usr\/bin\/microshift-etcd\n List Should Contain Value ${result} \/usr\/lib\/microshift(\/.*)?\n List Should Contain Value ${result} \/usr\/local\/bin\/microshift\n List Should Contain Value ${result} \/usr\/local\/bin\/microshift-etcd\n List Should Contain Value ${result} \/var\/lib\/microshift(\/.*)?\n List Should Contain Value ${result} \/var\/lib\/microshift-backups(\/.*)?\n List Should Contain Value ${result} \/var\/lib\/microshift\\\\.saved(\/.*)?\n\nAudit Log Should Be Empty For MicroShift\n [Documentation] Checks that no permission denials have occured during running MicroShift\n\n ${result}= Get Denial Audit Log\n Should Be Empty ${result}\n\nContext Traversal Should Not Gain More Access\n [Documentation] Checks that no extra permissions are gained via domain and context changes.\n\n ${result}= Run Default Traversal Access Check\n Should Be Empty ${result}\n\n# Helper Functions\n\nRun Container Access Check On File\n [Documentation] Given a file path or optional cmd, runcon command as a container_t,\n ... returns a list of errors if access was granted\n [Arguments] ${file_path} ${cmd}=cat\n\n ${cmd_list}= Create List ${cmd}\n ${file_paths_map}= Create Dictionary ${file_path}=${cmd_list}\n ${err_list}= Run Access Check ${file_paths_map}\n RETURN ${err_list}\n","name":"\/tmp\/repos\/microshift\/test\/resources\/selinux.resource","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/selinux.resource","element_type":"resource","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Validate SELinux With Backup\n [Documentation] Wrapper call for all SELinux checks with extra check inside backup folder\n [Arguments] ${backup_name}\n\n ${result}= Run Access Check On Dir \"${BACKUP_STORAGE}\/${backup_name}\"\n Should Be Empty ${result}\n\n Validate SELinux","name":"Validate SELinux With Backup","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/selinux.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${backup_name}"} {"code":"Validate SELinux\n [Documentation] Wrapper call for all SELinux checks\n\n Containers Should Not Have Access To Container Var Lib Labels\n Context Traversal Should Not Gain More Access\n Folders Should Have Expected Fcontext Types\n Semanage Fcontext Should Have MicroShift Rules\n Audit Log Should Be Empty For MicroShift","name":"Validate SELinux","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/selinux.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Containers Should Not Have Access To Container Var Lib Labels"} {"code":"Containers Should Not Have Access To Container Var Lib Labels\n [Documentation] Performs a check to make sure containers can not access\n ... files or folders that are labeled with container var lib as well as the\n ... generated backup file\n\n ${default_result}= Run Default Access Check\n Should Be Empty ${default_result}\n\n # Copy over a test file that forks and execs the given command\n SSHLibrary.Put File .\/assets\/selinux-test-exec.sh \/tmp\/selinux-test-exec.sh\n\n # Here we check that given a priveleged context, it can not domain transition to a context with privelage.\n #\n # Validate that the given path `kubelet_exec_t -> kubelet_t -> container_var_lib_t` should not be possible\n # when running under context container_t\n ${default_transition_result}= Run Default Access Binary Transition Check \/tmp\/selinux-test-exec.sh\n Should Be Empty ${default_transition_result}","name":"Containers Should Not Have Access To Container Var Lib Labels","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/selinux.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"files or folders that are labeled with container var lib as well as the\n ... generated backup file"} {"code":"Folders Should Have Expected Fcontext Types\n [Documentation] Performs a check to make sure the folders created during rpm install\n ... have the expected fcontext values\n\n ${err_list}= Run Fcontext Check\n Should Be Empty ${err_list}","name":"Folders Should Have Expected Fcontext Types","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/selinux.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"have the expected fcontext values"} {"code":"Semanage Fcontext Should Have MicroShift Rules\n [Documentation] Validates that the fcontext data includes the MicroShift rules\n # Refer to ${reporoot}\/packaging\/selinux\/microshift.fc\n ${result}= Get Fcontext List\n List Should Contain Value ${result} \/etc\/microshift(\/.*)?\n List Should Contain Value ${result} \/usr\/bin\/microshift\n List Should Contain Value ${result} \/usr\/bin\/microshift-etcd\n List Should Contain Value ${result} \/usr\/lib\/microshift(\/.*)?\n List Should Contain Value ${result} \/usr\/local\/bin\/microshift\n List Should Contain Value ${result} \/usr\/local\/bin\/microshift-etcd\n List Should Contain Value ${result} \/var\/lib\/microshift(\/.*)?\n List Should Contain Value ${result} \/var\/lib\/microshift-backups(\/.*)?\n List Should Contain Value ${result} \/var\/lib\/microshift\\\\.saved(\/.*)?","name":"Semanage Fcontext Should Have MicroShift Rules","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/selinux.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Validates that the fcontext data includes the MicroShift rules"} {"code":"Audit Log Should Be Empty For MicroShift\n [Documentation] Checks that no permission denials have occured during running MicroShift\n\n ${result}= Get Denial Audit Log\n Should Be Empty ${result}","name":"Audit Log Should Be Empty For MicroShift","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/selinux.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${result}= Get Denial Audit Log"} {"code":"Context Traversal Should Not Gain More Access\n [Documentation] Checks that no extra permissions are gained via domain and context changes.\n\n ${result}= Run Default Traversal Access Check\n Should Be Empty ${result}\n\n# Helper Functions","name":"Context Traversal Should Not Gain More Access","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/selinux.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${result}= Run Default Traversal Access Check"} {"code":"Run Container Access Check On File\n [Documentation] Given a file path or optional cmd, runcon command as a container_t,\n ... returns a list of errors if access was granted\n [Arguments] ${file_path} ${cmd}=cat\n\n ${cmd_list}= Create List ${cmd}\n ${file_paths_map}= Create Dictionary ${file_path}=${cmd_list}\n ${err_list}= Run Access Check ${file_paths_map}\n RETURN ${err_list}","name":"Run Container Access Check On File","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/selinux.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${file_path} ${cmd}=cat"} {"code":"*** Settings ***\nDocumentation Keywords for interacting with systemd\n\nLibrary Process\nLibrary String\nResource ..\/resources\/microshift-host.resource\n\n\n*** Keywords ***\nGet Systemd Setting\n [Documentation] Fetch one setting from systemd for the named unit.\n ... Take care to get the unit_name value _exactly_ right, or\n ... systemd will report a default value without reporting any error\n ... or warning.\n [Arguments] ${unit_name} ${property}\n\n ${stdout} ${rc}= Execute Command\n ... systemctl show --property=${property} --value ${unit_name}\n ... sudo=True return_rc=True\n Should Be Equal As Integers ${rc} 0\n Should Not Be Empty ${stdout}\n\n ${result}= Strip String ${stdout}\n RETURN ${result}\n\nSystemctl Print Service Status And Logs\n [Documentation] Dumps the status and latest logs for a specified service.\n [Arguments] ${unit_name}\n\n ${status_text}= Execute Command\n ... systemctl status ${unit_name}\n ... sudo=True return_stdout=True\n ${log_text}= Execute Command\n ... journalctl -u ${unit_name} -o short | tail -c 32000\n ... sudo=True return_stdout=True\n\nSystemctl Check Service SubState\n [Documentation] Check if the current sub-state of a service is the same\n ... as the expected sub-state.\n [Arguments] ${unit_name} ${expected_state}\n\n ${sub_state}= Get Systemd Setting ${unit_name} SubState\n Should Be Equal As Strings ${sub_state} ${expected_state}\n\nSystemctl\n [Documentation] Run a systemctl command on the microshift host.\n ... The intent is to enable, start, stop, or restart a service.\n ... Other commands should be implemented separately. When the verb\n ... is \"start\" or \"restart\", this keyword will wait for the unit\n ... to report that it is \"running\". When the verb is \"stop\", this\n ... keyword will wait for the unit to report that it is \"dead\".\n ... When the verb is \"enable\", this keyword will only check success\n ... of the operation and not wait for any change to the service.\n [Arguments] ${verb} ${unit_name}\n\n # Verify the input\n Should Be True \"${verb}\" in {\"restart\", \"start\", \"stop\", \"enable\", \"disable\"}\n\n IF \"${verb}\" in {\"restart\", \"start\"}\n ${state}= Set Variable running\n ELSE IF \"${verb}\" in {\"stop\"}\n ${state}= Set Variable dead\n END\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... systemctl ${verb} ${unit_name}\n ... sudo=True return_stdout=True return_stderr=True return_rc=True\n IF ${rc} != 0 Systemctl Print Service Status And Logs ${unit_name}\n Should Be Equal As Integers 0 ${rc}\n\n IF \"${verb}\" in {\"enable\", \"disable\"} RETURN\n\n # It takes a bit for systemd to respond, and if we check too soon\n # then it looks like microshift is up, even though it is about to\n # be restarted.\n Sleep 5s\n\n Wait Until Keyword Succeeds 10x 10s\n ... Systemctl Check Service SubState ${unit_name} ${state}\n\nSystemctl Daemon Reload\n [Documentation] Reload the systemd daemon.\n ${stdout} ${stderr} ${rc}= Execute Command\n ... systemctl daemon-reload\n ... sudo=True return_stdout=True return_stderr=True return_rc=True\n Log Many ${stdout} ${stderr}\n Should Be Equal As Integers 0 ${rc}\n","name":"\/tmp\/repos\/microshift\/test\/resources\/systemd.resource","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/systemd.resource","element_type":"resource","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Get Systemd Setting\n [Documentation] Fetch one setting from systemd for the named unit.\n ... Take care to get the unit_name value _exactly_ right, or\n ... systemd will report a default value without reporting any error\n ... or warning.\n [Arguments] ${unit_name} ${property}\n\n ${stdout} ${rc}= Execute Command\n ... systemctl show --property=${property} --value ${unit_name}\n ... sudo=True return_rc=True\n Should Be Equal As Integers ${rc} 0\n Should Not Be Empty ${stdout}\n\n ${result}= Strip String ${stdout}\n RETURN ${result}","name":"Get Systemd Setting","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/systemd.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"systemd will report a default value without reporting any error\n ... or warning."} {"code":"Systemctl Print Service Status And Logs\n [Documentation] Dumps the status and latest logs for a specified service.\n [Arguments] ${unit_name}\n\n ${status_text}= Execute Command\n ... systemctl status ${unit_name}\n ... sudo=True return_stdout=True\n ${log_text}= Execute Command\n ... journalctl -u ${unit_name} -o short | tail -c 32000\n ... sudo=True return_stdout=True","name":"Systemctl Print Service Status And Logs","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/systemd.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${unit_name}"} {"code":"Systemctl Check Service SubState\n [Documentation] Check if the current sub-state of a service is the same\n ... as the expected sub-state.\n [Arguments] ${unit_name} ${expected_state}\n\n ${sub_state}= Get Systemd Setting ${unit_name} SubState\n Should Be Equal As Strings ${sub_state} ${expected_state}","name":"Systemctl Check Service SubState","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/systemd.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${unit_name} ${expected_state}"} {"code":"Systemctl\n [Documentation] Run a systemctl command on the microshift host.\n ... The intent is to enable, start, stop, or restart a service.\n ... Other commands should be implemented separately. When the verb\n ... is \"start\" or \"restart\", this keyword will wait for the unit\n ... to report that it is \"running\". When the verb is \"stop\", this\n ... keyword will wait for the unit to report that it is \"dead\".\n ... When the verb is \"enable\", this keyword will only check success\n ... of the operation and not wait for any change to the service.\n [Arguments] ${verb} ${unit_name}\n\n # Verify the input\n Should Be True \"${verb}\" in {\"restart\", \"start\", \"stop\", \"enable\", \"disable\"}\n\n IF \"${verb}\" in {\"restart\", \"start\"}\n ${state}= Set Variable running\n ELSE IF \"${verb}\" in {\"stop\"}\n ${state}= Set Variable dead\n END\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... systemctl ${verb} ${unit_name}\n ... sudo=True return_stdout=True return_stderr=True return_rc=True\n IF ${rc} != 0 Systemctl Print Service Status And Logs ${unit_name}\n Should Be Equal As Integers 0 ${rc}\n\n IF \"${verb}\" in {\"enable\", \"disable\"} RETURN\n\n # It takes a bit for systemd to respond, and if we check too soon\n # then it looks like microshift is up, even though it is about to\n # be restarted.\n Sleep 5s\n\n Wait Until Keyword Succeeds 10x 10s\n ... Systemctl Check Service SubState ${unit_name} ${state}","name":"Systemctl","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/systemd.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"When the verb is \"enable\", this keyword will only check success\n ... of the operation and not wait for any change to the service."} {"code":"Systemctl Daemon Reload\n [Documentation] Reload the systemd daemon.\n ${stdout} ${stderr} ${rc}= Execute Command\n ... systemctl daemon-reload\n ... sudo=True return_stdout=True return_stderr=True return_rc=True\n Log Many ${stdout} ${stderr}\n Should Be Equal As Integers 0 ${rc}","name":"Systemctl Daemon Reload","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/resources\/systemd.resource","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${stdout} ${stderr} ${rc}= Execute Command\n ... systemctl daemon-reload\n ... sudo=True return_stdout=True return_stderr=True return_rc=True"} {"code":"*** Settings ***\nDocumentation Sanity test for AI Model Serving\n\nResource ..\/..\/resources\/offline.resource\nLibrary ..\/..\/resources\/DataFormats.py\n\nSuite Setup offline.Setup Suite\n\nTest Tags offline\n\n\n*** Variables ***\n${MODEL_NAME}= openvino-resnet\n${DOMAIN}= ${MODEL_NAME}-predictor-test-ai.apps.example.com\n${IP}= 10.44.0.1\n\n\n*** Test Cases ***\nSanity Test\n [Documentation] Sanity test for AI Model Serving\n\n # Warning: Next keyword will fail if the VM was rebooted.\n # See https:\/\/github.com\/kserve\/kserve\/pull\/4274\n # After the issue is fixed and backported: add reboot and retest\n Wait For A Deployment test-ai openvino-resnet-predictor\n Wait Until Keyword Succeeds 10x 10s\n ... Check If Model Is Ready\n Query Model Metrics\n Prepare Request Data\n Query Model Server\n\n\n*** Keywords ***\nWait For A Deployment\n [Documentation] Wait for a deployment on offline VM\n [Arguments] ${namespace} ${name}\n offline.Run With Kubeconfig oc rollout status -n\\=${namespace} deployment ${name}\n\nCheck If Model Is Ready\n [Documentation] Ask model server is model is ready for inference.\n ${cmd}= Catenate\n ... curl\n ... --fail\n ... -i ${DOMAIN}\/v2\/models\/${MODEL_NAME}\/ready\n ... --connect-to \"${DOMAIN}::${IP}:\"\n Guest Process Should Succeed ${cmd}\n\nQuery Model Metrics\n [Documentation] Makes a query against the model server metrics endpoint.\n ${cmd}= Catenate\n ... curl\n ... --fail\n ... --request GET\n ... ${DOMAIN}\/metrics\n ... --connect-to \"${DOMAIN}::${IP}:\"\n ${output}= Guest Process Should Succeed ${cmd}\n Should Contain ${output} ovms_requests_success Number of successful requests to a model or a DAG.\n\nQuery Model Server\n [Documentation] Makes a query against the model server.\n\n # Inference-Header-Content-Length is the len of the JSON at the begining of the request.json\n ${cmd}= Catenate\n ... curl\n ... --fail\n ... --request POST\n ... --data-binary \"@\/tmp\/request.json\"\n ... --header \"Inference-Header-Content-Length: 63\"\n ... ${DOMAIN}\/v2\/models\/${MODEL_NAME}\/infer\n ... --connect-to \"${DOMAIN}::${IP}:\"\n ${output}= Guest Process Should Succeed ${cmd}\n ${result}= Json Parse ${output}\n ${data}= Set Variable ${result[\"outputs\"][0][\"data\"]}\n # Following expression can be referred to as 'argmax': index of the highest element.\n ${argmax}= Evaluate ${data}.index(max(${data}))\n\n # Request data includes bee.jpeg file so according to the OpenVino examples,\n # we should expect argmax to be 309.\n # See following for reference\n # - https:\/\/github.com\/openvinotoolkit\/model_server\/tree\/releases\/2025\/0\/client\/python\/kserve-api\/samples#run-the-client-to-perform-inference-1\n # - https:\/\/github.com\/openvinotoolkit\/model_server\/blob\/releases\/2025\/0\/demos\/image_classification\/input_images.txt\n Should Be Equal As Integers ${argmax} 309\n\nPrepare Request Data\n [Documentation] Executes a script on the host that prepares a request data.\n ... Refer to the file's contents for explanation.\n\n Guest Process Should Succeed\n ... \/etc\/microshift\/manifests.d\/10-ai-model-serving-test\/prepare-query.sh\n\nGuest Process Should Succeed\n [Documentation] Executes shell command on the VM, checks the return code,\n ... and returns stdout.\n [Arguments] ${cmd}\n ${result} ${ignore}= Run Guest Process ${GUEST_NAME}\n ... bash\n ... -c\n ... ${cmd}\n Should Be Equal As Integers ${result[\"rc\"]} 0\n RETURN ${result[\"stdout\"]}\n","name":"\/tmp\/repos\/microshift\/test\/suites\/ai-model-serving\/ai-model-serving-offline.robot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/ai-model-serving\/ai-model-serving-offline.robot","element_type":"test","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Sanity Test\n [Documentation] Sanity test for AI Model Serving\n\n # Warning: Next keyword will fail if the VM was rebooted.\n # See https:\/\/github.com\/kserve\/kserve\/pull\/4274\n # After the issue is fixed and backported: add reboot and retest\n Wait For A Deployment test-ai openvino-resnet-predictor\n Wait Until Keyword Succeeds 10x 10s\n ... Check If Model Is Ready\n Query Model Metrics\n Prepare Request Data\n Query Model Server","name":"Sanity Test","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/ai-model-serving\/ai-model-serving-offline.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Wait For A Deployment\n [Documentation] Wait for a deployment on offline VM\n [Arguments] ${namespace} ${name}\n offline.Run With Kubeconfig oc rollout status -n\\=${namespace} deployment ${name}","name":"Wait For A Deployment","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/ai-model-serving\/ai-model-serving-offline.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${namespace} ${name}"} {"code":"Check If Model Is Ready\n [Documentation] Ask model server is model is ready for inference.\n ${cmd}= Catenate\n ... curl\n ... --fail\n ... -i ${DOMAIN}\/v2\/models\/${MODEL_NAME}\/ready\n ... --connect-to \"${DOMAIN}::${IP}:\"\n Guest Process Should Succeed ${cmd}","name":"Check If Model Is Ready","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/ai-model-serving\/ai-model-serving-offline.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'DOMAIN': {'text': '${DOMAIN}= ${MODEL_NAME}-predictor-test-ai.apps.example.com'}, 'MODEL_NAME': {'text': '${MODEL_NAME}= openvino-resnet'}, 'IP': {'text': '${IP}= 10.44.0.1'}}","documentation":"${cmd}= Catenate\n ... curl\n ... --fail\n ... -i ${DOMAIN}\/v2\/models\/${MODEL_NAME}\/ready\n ... --connect-to \"${DOMAIN}::${IP}:\""} {"code":"Query Model Metrics\n [Documentation] Makes a query against the model server metrics endpoint.\n ${cmd}= Catenate\n ... curl\n ... --fail\n ... --request GET\n ... ${DOMAIN}\/metrics\n ... --connect-to \"${DOMAIN}::${IP}:\"\n ${output}= Guest Process Should Succeed ${cmd}\n Should Contain ${output} ovms_requests_success Number of successful requests to a model or a DAG.","name":"Query Model Metrics","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/ai-model-serving\/ai-model-serving-offline.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'DOMAIN': {'text': '${DOMAIN}= ${MODEL_NAME}-predictor-test-ai.apps.example.com'}, 'IP': {'text': '${IP}= 10.44.0.1'}}","documentation":"${cmd}= Catenate\n ... curl\n ... --fail\n ... --request GET\n ... ${DOMAIN}\/metrics\n ... --connect-to \"${DOMAIN}::${IP}:\""} {"code":"Query Model Server\n [Documentation] Makes a query against the model server.\n\n # Inference-Header-Content-Length is the len of the JSON at the begining of the request.json\n ${cmd}= Catenate\n ... curl\n ... --fail\n ... --request POST\n ... --data-binary \"@\/tmp\/request.json\"\n ... --header \"Inference-Header-Content-Length: 63\"\n ... ${DOMAIN}\/v2\/models\/${MODEL_NAME}\/infer\n ... --connect-to \"${DOMAIN}::${IP}:\"\n ${output}= Guest Process Should Succeed ${cmd}\n ${result}= Json Parse ${output}\n ${data}= Set Variable ${result[\"outputs\"][0][\"data\"]}\n # Following expression can be referred to as 'argmax': index of the highest element.\n ${argmax}= Evaluate ${data}.index(max(${data}))\n\n # Request data includes bee.jpeg file so according to the OpenVino examples,\n # we should expect argmax to be 309.\n # See following for reference\n # - https:\/\/github.com\/openvinotoolkit\/model_server\/tree\/releases\/2025\/0\/client\/python\/kserve-api\/samples#run-the-client-to-perform-inference-1\n # - https:\/\/github.com\/openvinotoolkit\/model_server\/blob\/releases\/2025\/0\/demos\/image_classification\/input_images.txt\n Should Be Equal As Integers ${argmax} 309","name":"Query Model Server","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/ai-model-serving\/ai-model-serving-offline.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'DOMAIN': {'text': '${DOMAIN}= ${MODEL_NAME}-predictor-test-ai.apps.example.com'}, 'MODEL_NAME': {'text': '${MODEL_NAME}= openvino-resnet'}, 'IP': {'text': '${IP}= 10.44.0.1'}}","documentation":"Makes a query against the model server."} {"code":"Prepare Request Data\n [Documentation] Executes a script on the host that prepares a request data.\n ... Refer to the file's contents for explanation.\n\n Guest Process Should Succeed\n ... \/etc\/microshift\/manifests.d\/10-ai-model-serving-test\/prepare-query.sh","name":"Prepare Request Data","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/ai-model-serving\/ai-model-serving-offline.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Guest Process Should Succeed\n ... \/etc\/microshift\/manifests.d\/10-ai-model-serving-test\/prepare-query.sh"} {"code":"Guest Process Should Succeed\n [Documentation] Executes shell command on the VM, checks the return code,\n ... and returns stdout.\n [Arguments] ${cmd}\n ${result} ${ignore}= Run Guest Process ${GUEST_NAME}\n ... bash\n ... -c\n ... ${cmd}\n Should Be Equal As Integers ${result[\"rc\"]} 0\n RETURN ${result[\"stdout\"]}","name":"Guest Process Should Succeed","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/ai-model-serving\/ai-model-serving-offline.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"and returns stdout."} {"code":"*** Settings ***\nDocumentation Sanity test for AI Model Serving\n\nLibrary ..\/..\/resources\/DataFormats.py\nResource ..\/..\/resources\/common.resource\nResource ..\/..\/resources\/oc.resource\n\nSuite Setup Setup Suite\nSuite Teardown Teardown Suite\n\n\n*** Variables ***\n${USHIFT_HOST}= ${EMPTY}\n${OVMS_KSERVE_MANIFEST}= \/tmp\/ovms-kserve.yaml\n${OVMS_REQUEST}= \/tmp\/ovms-request.json\n\n\n*** Test Cases ***\nTest OpenVINO model\n [Documentation] Sanity test for AI OpenVino Model Serving\n\n Set Test Variable ${MODEL_NAME} openvino-resnet\n Set Test Variable ${DOMAIN} ${MODEL_NAME}-predictor-test-ai.apps.example.com\n ${ns}= Create Unique Namespace\n Set Test Variable ${NAMESPACE} ${ns}\n\n Deploy OpenVINO Serving Runtime\n Deploy OpenVINO Resnet Model\n\n Check If Model Is Ready\n Query Model Metrics Endpoint\n Prepare Request Data\n Query Model Infer Endpoint\n\n [Teardown] Run Keywords\n ... Remove Namespace ${NAMESPACE}\n ... AND\n ... Remove Tmp Data\n\n\n*** Keywords ***\nDeploy OpenVINO Serving Runtime\n [Documentation] Deploys OpenVino server.\n\n ${ovms_image}= Command Should Work\n ... jq -r '.images | with_entries(select(.key == \"ovms-image\")) | .[]' \/usr\/share\/microshift\/release\/release-ai-model-serving-\"$(uname -i)\".json\n SSHLibrary.Get File\n ... \/usr\/lib\/microshift\/manifests.d\/001-microshift-ai-model-serving\/runtimes\/ovms-kserve.yaml\n ... ${OVMS_KSERVE_MANIFEST}\n Local Command Should Work sed -i \"s,image: ovms-image,image: ${ovms_image},\" \"${OVMS_KSERVE_MANIFEST}\"\n Oc Apply -n ${NAMESPACE} -f ${OVMS_KSERVE_MANIFEST}\n\nDeploy OpenVINO Resnet Model\n [Documentation] Deploys InferenceService object to create Deployment and Service to serve the model.\n ... Also creates a Route to export the model endpoint outside the MicroShift cluster.\n\n Oc Apply -n ${NAMESPACE} -f .\/assets\/ai-model-serving\/ovms-resources.yaml\n Wait Until Keyword Succeeds 30x 1s\n ... Run With Kubeconfig oc rollout status -n\\=${NAMESPACE} --timeout=60s deployment openvino-resnet-predictor\n\nCheck If Model Is Ready\n [Documentation] Asks model server is model is ready for inference.\n ${cmd}= Catenate\n ... curl\n ... --fail\n ... -i ${DOMAIN}\/v2\/models\/${MODEL_NAME}\/ready\n ... --connect-to \"${DOMAIN}::${USHIFT_HOST}:\"\n Wait Until Keyword Succeeds 10x 10s\n ... Local Command Should Work ${cmd}\n\nQuery Model Metrics Endpoint\n [Documentation] Makes a query against the model server metrics endpoint.\n\n ${cmd}= Catenate\n ... curl\n ... --fail\n ... --request GET\n ... ${DOMAIN}\/metrics\n ... --connect-to \"${DOMAIN}::${USHIFT_HOST}:\"\n ${output}= Local Command Should Work ${cmd}\n Should Contain ${output} ovms_requests_success Number of successful requests to a model or a DAG.\n\nPrepare Request Data\n [Documentation] Executes a script that prepares a request data.\n\n Local Command Should Work bash -x assets\/ai-model-serving\/ovms-query-preparation.sh ${OVMS_REQUEST}\n\nRemove Tmp Data\n [Documentation] Remove temp data for this test.\n\n Local Command Should Work rm ${OVMS_REQUEST} ${OVMS_KSERVE_MANIFEST}\n\nQuery Model Infer Endpoint\n [Documentation] Makes a query against the model server.\n\n # Inference-Header-Content-Length is the len of the JSON at the begining of the request.json\n ${cmd}= Catenate\n ... curl\n ... --silent\n ... --fail\n ... --request POST\n ... --data-binary \"@${OVMS_REQUEST}\"\n ... --header \"Inference-Header-Content-Length: 63\"\n ... ${DOMAIN}\/v2\/models\/${MODEL_NAME}\/infer\n ... --connect-to \"${DOMAIN}::${USHIFT_HOST}:\"\n ${output}= Local Command Should Work ${cmd}\n ${result}= Json Parse ${output}\n ${data}= Set Variable ${result[\"outputs\"][0][\"data\"]}\n # Following expression can be referred to as 'argmax': index of the highest element.\n ${argmax}= Evaluate ${data}.index(max(${data}))\n\n # Request data includes bee.jpeg file so according to the OpenVino examples,\n # we should expect argmax to be 309.\n # See following for reference\n # - https:\/\/github.com\/openvinotoolkit\/model_server\/tree\/releases\/2025\/0\/client\/python\/kserve-api\/samples#run-the-client-to-perform-inference-1\n # - https:\/\/github.com\/openvinotoolkit\/model_server\/blob\/releases\/2025\/0\/demos\/image_classification\/input_images.txt\n Should Be Equal As Integers ${argmax} 309\n","name":"\/tmp\/repos\/microshift\/test\/suites\/ai-model-serving\/ai-model-serving-online.robot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/ai-model-serving\/ai-model-serving-online.robot","element_type":"test","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Test OpenVINO model\n [Documentation] Sanity test for AI OpenVino Model Serving\n\n Set Test Variable ${MODEL_NAME} openvino-resnet\n Set Test Variable ${DOMAIN} ${MODEL_NAME}-predictor-test-ai.apps.example.com\n ${ns}= Create Unique Namespace\n Set Test Variable ${NAMESPACE} ${ns}\n\n Deploy OpenVINO Serving Runtime\n Deploy OpenVINO Resnet Model\n\n Check If Model Is Ready\n Query Model Metrics Endpoint\n Prepare Request Data\n Query Model Infer Endpoint\n\n [Teardown] Run Keywords\n ... Remove Namespace ${NAMESPACE}\n ... AND\n ... Remove Tmp Data","name":"Test OpenVINO model","imports_file_locations":"{'..\/..\/resources\/common.resource': 'test\/resources\/common.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/ai-model-serving\/ai-model-serving-online.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Deploy OpenVINO Serving Runtime\n [Documentation] Deploys OpenVino server.\n\n ${ovms_image}= Command Should Work\n ... jq -r '.images | with_entries(select(.key == \"ovms-image\")) | .[]' \/usr\/share\/microshift\/release\/release-ai-model-serving-\"$(uname -i)\".json\n SSHLibrary.Get File\n ... \/usr\/lib\/microshift\/manifests.d\/001-microshift-ai-model-serving\/runtimes\/ovms-kserve.yaml\n ... ${OVMS_KSERVE_MANIFEST}\n Local Command Should Work sed -i \"s,image: ovms-image,image: ${ovms_image},\" \"${OVMS_KSERVE_MANIFEST}\"\n Oc Apply -n ${NAMESPACE} -f ${OVMS_KSERVE_MANIFEST}","name":"Deploy OpenVINO Serving Runtime","imports_file_locations":"{'..\/..\/resources\/common.resource': 'test\/resources\/common.resource', '..\/..\/resources\/oc.resource': 'test\/resources\/oc.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/ai-model-serving\/ai-model-serving-online.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'OVMS_KSERVE_MANIFEST': {'text': '${OVMS_KSERVE_MANIFEST}= \/tmp\/ovms-kserve.yaml'}}","documentation":"${ovms_image}= Command Should Work\n ... jq -r '.images | with_entries(select(.key == \"ovms-image\")) | .[]' \/usr\/share\/microshift\/release\/release-ai-model-serving-\"$(uname -i)\".json"} {"code":"Deploy OpenVINO Resnet Model\n [Documentation] Deploys InferenceService object to create Deployment and Service to serve the model.\n ... Also creates a Route to export the model endpoint outside the MicroShift cluster.\n\n Oc Apply -n ${NAMESPACE} -f .\/assets\/ai-model-serving\/ovms-resources.yaml\n Wait Until Keyword Succeeds 30x 1s\n ... Run With Kubeconfig oc rollout status -n\\=${NAMESPACE} --timeout=60s deployment openvino-resnet-predictor","name":"Deploy OpenVINO Resnet Model","imports_file_locations":"{'..\/..\/resources\/oc.resource': 'test\/resources\/oc.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/ai-model-serving\/ai-model-serving-online.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Also creates a Route to export the model endpoint outside the MicroShift cluster."} {"code":"Check If Model Is Ready\n [Documentation] Asks model server is model is ready for inference.\n ${cmd}= Catenate\n ... curl\n ... --fail\n ... -i ${DOMAIN}\/v2\/models\/${MODEL_NAME}\/ready\n ... --connect-to \"${DOMAIN}::${USHIFT_HOST}:\"\n Wait Until Keyword Succeeds 10x 10s\n ... Local Command Should Work ${cmd}","name":"Check If Model Is Ready","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/ai-model-serving\/ai-model-serving-online.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'USHIFT_HOST': {'text': '${USHIFT_HOST}= ${EMPTY}'}}","documentation":"${cmd}= Catenate\n ... curl\n ... --fail\n ... -i ${DOMAIN}\/v2\/models\/${MODEL_NAME}\/ready\n ... --connect-to \"${DOMAIN}::${USHIFT_HOST}:\""} {"code":"Query Model Metrics Endpoint\n [Documentation] Makes a query against the model server metrics endpoint.\n\n ${cmd}= Catenate\n ... curl\n ... --fail\n ... --request GET\n ... ${DOMAIN}\/metrics\n ... --connect-to \"${DOMAIN}::${USHIFT_HOST}:\"\n ${output}= Local Command Should Work ${cmd}\n Should Contain ${output} ovms_requests_success Number of successful requests to a model or a DAG.","name":"Query Model Metrics Endpoint","imports_file_locations":"{'..\/..\/resources\/common.resource': 'test\/resources\/common.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/ai-model-serving\/ai-model-serving-online.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'USHIFT_HOST': {'text': '${USHIFT_HOST}= ${EMPTY}'}}","documentation":"${cmd}= Catenate\n ... curl\n ... --fail\n ... --request GET\n ... ${DOMAIN}\/metrics\n ... --connect-to \"${DOMAIN}::${USHIFT_HOST}:\""} {"code":"Prepare Request Data\n [Documentation] Executes a script that prepares a request data.\n\n Local Command Should Work bash -x assets\/ai-model-serving\/ovms-query-preparation.sh ${OVMS_REQUEST}","name":"Prepare Request Data","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/ai-model-serving\/ai-model-serving-online.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'OVMS_REQUEST': {'text': '${OVMS_REQUEST}= \/tmp\/ovms-request.json'}}","documentation":"Local Command Should Work bash -x assets\/ai-model-serving\/ovms-query-preparation.sh ${OVMS_REQUEST}"} {"code":"Remove Tmp Data\n [Documentation] Remove temp data for this test.\n\n Local Command Should Work rm ${OVMS_REQUEST} ${OVMS_KSERVE_MANIFEST}","name":"Remove Tmp Data","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/ai-model-serving\/ai-model-serving-online.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'OVMS_REQUEST': {'text': '${OVMS_REQUEST}= \/tmp\/ovms-request.json'}, 'OVMS_KSERVE_MANIFEST': {'text': '${OVMS_KSERVE_MANIFEST}= \/tmp\/ovms-kserve.yaml'}}","documentation":"Local Command Should Work rm ${OVMS_REQUEST} ${OVMS_KSERVE_MANIFEST}"} {"code":"Query Model Infer Endpoint\n [Documentation] Makes a query against the model server.\n\n # Inference-Header-Content-Length is the len of the JSON at the begining of the request.json\n ${cmd}= Catenate\n ... curl\n ... --silent\n ... --fail\n ... --request POST\n ... --data-binary \"@${OVMS_REQUEST}\"\n ... --header \"Inference-Header-Content-Length: 63\"\n ... ${DOMAIN}\/v2\/models\/${MODEL_NAME}\/infer\n ... --connect-to \"${DOMAIN}::${USHIFT_HOST}:\"\n ${output}= Local Command Should Work ${cmd}\n ${result}= Json Parse ${output}\n ${data}= Set Variable ${result[\"outputs\"][0][\"data\"]}\n # Following expression can be referred to as 'argmax': index of the highest element.\n ${argmax}= Evaluate ${data}.index(max(${data}))\n\n # Request data includes bee.jpeg file so according to the OpenVino examples,\n # we should expect argmax to be 309.\n # See following for reference\n # - https:\/\/github.com\/openvinotoolkit\/model_server\/tree\/releases\/2025\/0\/client\/python\/kserve-api\/samples#run-the-client-to-perform-inference-1\n # - https:\/\/github.com\/openvinotoolkit\/model_server\/blob\/releases\/2025\/0\/demos\/image_classification\/input_images.txt\n Should Be Equal As Integers ${argmax} 309","name":"Query Model Infer Endpoint","imports_file_locations":"{'..\/..\/resources\/common.resource': 'test\/resources\/common.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/ai-model-serving\/ai-model-serving-online.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'USHIFT_HOST': {'text': '${USHIFT_HOST}= ${EMPTY}'}}","documentation":"Makes a query against the model server."} {"code":"*** Settings ***\nDocumentation Extended tests related to auto-recovery functionality\n\nResource ..\/..\/resources\/microshift-host.resource\nResource ..\/..\/resources\/microshift-process.resource\nResource ..\/..\/resources\/ostree-health.resource\nLibrary Collections\nLibrary DateTime\nLibrary ..\/..\/resources\/libostree.py\n\nSuite Setup Setup\nSuite Teardown Teardown\n\n\n*** Variables ***\n${WORKDIR} \/var\/lib\/microshift-auto-recovery\/\n${SAFETY_BACKUP} \/var\/lib\/microshift.safety\n\n\n*** Test Cases ***\nUsing Systemd Dropin To React On Failure Of MicroShift\n [Documentation] Verify systemd integration to start auto-recovery procedure.\n\n Stop MicroShift\n Create Safety Backup\n Create Backup With Marker\n Set Up MicroShift Auto Recovery Unit\n\n Corrupt Etcd Database\n ${dt}= Command Should Work date +\"%s\"\n Start MicroShift Expecting Failure\n Wait For Auto Recovery Unit To Finish ${dt}\n Wait Until Keyword Succeeds 20x 5s\n ... Systemctl Check Service SubState microshift.service running\n Command Should Work ls \/var\/lib\/microshift\/marker\n\n [Teardown] Run Keywords\n ... Restore Safety Backup\n ... AND\n ... Clean Up MicroShift Auto Recovery Unit\n ... AND\n ... Command Should Work rm -rf ${WORKDIR}\n\nAuto Recovery On Red Boot\n [Documentation] Verify greenboot integration to start auto-recovery procedure.\n\n Greenboot Workaround For Boot Counter\n Command Should Work rm -rf ${SAFETY_BACKUP}\n\n Stop MicroShift\n Create Safety Backup\n Create Backup With Marker\n Set Up Greenboot Red Script\n\n Corrupt Etcd Database\n Start MicroShift Expecting Failure\n\n ${bootid}= Get Current Boot Id\n Command Should Fail systemctl restart greenboot-healthcheck\n Wait Until Keyword Succeeds 5m 15s\n ... System Should Be Rebooted ${bootid}\n Wait Until Greenboot Health Check Exited\n\n [Teardown] Run Keywords\n ... Restore Safety Backup\n ... AND\n ... Command Should Work rm -f \/etc\/greenboot\/red.d\/100-auto-recovery.sh\n ... AND\n ... Command Should Work rm -rf ${WORKDIR}\n\n\n*** Keywords ***\nSetup\n [Documentation] Test suite setup\n Login MicroShift Host\n\nTeardown\n [Documentation] Test suite teardown\n Logout MicroShift Host\n\nCreate Backup With Marker\n [Documentation] Create a backup with a marker file inside.\n ... Marker is later used to verify if the backup was actually restored.\n ${backup_path}= Command Should Work microshift backup --auto-recovery ${WORKDIR}\n Command Should Work touch ${backup_path}\/marker\n\nSet Up MicroShift Auto Recovery Unit # robocop: disable=too-many-calls-in-keyword\n [Documentation] Sets up drop-in and service to run on MicroShift's failure.\n\n Command Should Work mkdir -p \/etc\/systemd\/system\/microshift.service.d\n ${drop_in}= Operating System.Get File .\/assets\/auto-recovery\/10-auto-recovery.conf\n Upload String To File ${drop_in} \/etc\/systemd\/system\/microshift.service.d\/10-auto-recovery.conf\n\n ${svc}= Operating System.Get File .\/assets\/auto-recovery\/microshift-auto-recovery.service\n Upload String To File ${svc} \/etc\/systemd\/system\/microshift-auto-recovery.service\n\n ${bin}= Operating System.Get File .\/assets\/auto-recovery\/microshift-auto-recovery\n Upload String To File ${bin} \/var\/opt\/microshift-auto-recovery\n Command Should Work chmod +x \/var\/opt\/microshift-auto-recovery\n # Following is needed for a systemd unit to call binary on different filesystem\n Command Should Work semanage fcontext --add --type bin_t \"\/var\/opt(\/.*)?\"\n Command Should Work restorecon -r -v \/var\/opt\/\n\n Command Should Work systemctl daemon-reload\n\nClean Up MicroShift Auto Recovery Unit\n [Documentation] Remove the microshift-auto-recovery.service and microshift.service's drop-in.\n Command Should Work rm -rf \/etc\/systemd\/system\/microshift.service.d\n Command Should Work rm -f \/etc\/systemd\/system\/microshift-auto-recovery.service\n Command Should Work rm -f \/var\/opt\/microshift-auto-recovery\n Command Should Work semanage fcontext --delete --type bin_t \"\/var\/opt(\/.*)?\"\n Command Should Work restorecon -r -v \/var\/opt\/\n Command Should Work systemctl daemon-reload\n\nStart MicroShift Expecting Failure\n [Documentation] Start MicroShift expecting it fails.\n Command Should Fail systemctl start microshift\n\nCreate Safety Backup\n [Documentation] Create an additional backup to restore during teardown\n ... in case something goes wrong with auto-recovery to not disrupt next test.\n Command Should Work microshift backup ${SAFETY_BACKUP}\n\nRestore Safety Backup\n [Documentation] Restores additional backup during teardown and starts MicroShift.\n Run Keyword And Ignore Error\n ... Stop MicroShift\n Command Should Work microshift restore ${SAFETY_BACKUP}\n Command Should Work rm -rf ${SAFETY_BACKUP}\n Start MicroShift\n\nCorrupt Etcd Database\n [Documentation] Overwrites first megabyte of the etcd's database to simulate\n ... corruption and cause MicroShift startup failure.\n Command Should Work\n ... dd conv=notrunc if=\/dev\/zero of=\/var\/lib\/microshift\/etcd\/member\/wal\/0000000000000000-0000000000000000.wal bs=1M count=1\n\nWait For Auto Recovery Unit To Finish\n [Documentation] Wait until microshift-auto-recovery.service completes\n ... running (unit enters state 'dead').\n [Arguments] ${dt}\n Wait Until Keyword Succeeds 20x 5s\n ... Auto Recovery Finished Recently ${dt}\n Command Should Work\n ... journalctl -u microshift-auto-recovery.service _SYSTEMD_INVOCATION_ID=\"$(systemctl show -p InvocationID --value microshift-auto-recovery.service)\"\n\nAuto Recovery Finished Recently\n [Documentation] Check if microshift-auto-recovery.service is dead and finished later than provided timestamp.\n [Arguments] ${dt}\n Systemctl Check Service SubState microshift-auto-recovery.service dead\n ${finish_dt}= Command Should Work\n ... date -d \"$(systemctl show --property=ExecMainExitTimestamp --value microshift-auto-recovery)\" +\"%s\"\n Should Be True ${dt} < ${finish_dt}\n\nSet Up Greenboot Red Script\n [Documentation] Set up red script that triggers auto-recovery procedure.\n Command Should Work mkdir -p \/etc\/greenboot\/red.d\n ${drop_in}= Operating System.Get File .\/assets\/auto-recovery\/red-script.sh\n Upload String To File ${drop_in} \/etc\/greenboot\/red.d\/99-auto-recovery.sh\n\nGreenboot Workaround For Boot Counter\n [Documentation] If the grub's boot_success is 1, clears boot_counter.\n # Because of greenboot's bug, we need to it here, so the system doesn't reboot after red boot.\n Command Should Work\n ... bash -c \"grub2-editenv list | grep -q boot_success=1 && \/usr\/bin\/grub2-editenv \/boot\/grub2\/grubenv unset boot_counter || true\"\n","name":"\/tmp\/repos\/microshift\/test\/suites\/backup\/auto-recovery-extra.robot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/auto-recovery-extra.robot","element_type":"test","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Using Systemd Dropin To React On Failure Of MicroShift\n [Documentation] Verify systemd integration to start auto-recovery procedure.\n\n Stop MicroShift\n Create Safety Backup\n Create Backup With Marker\n Set Up MicroShift Auto Recovery Unit\n\n Corrupt Etcd Database\n ${dt}= Command Should Work date +\"%s\"\n Start MicroShift Expecting Failure\n Wait For Auto Recovery Unit To Finish ${dt}\n Wait Until Keyword Succeeds 20x 5s\n ... Systemctl Check Service SubState microshift.service running\n Command Should Work ls \/var\/lib\/microshift\/marker\n\n [Teardown] Run Keywords\n ... Restore Safety Backup\n ... AND\n ... Clean Up MicroShift Auto Recovery Unit\n ... AND\n ... Command Should Work rm -rf ${WORKDIR}","name":"Using Systemd Dropin To React On Failure Of MicroShift","imports_file_locations":"{'..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource', '..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/auto-recovery-extra.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'WORKDIR': {'text': '${WORKDIR} \/var\/lib\/microshift-auto-recovery\/'}}","documentation":""} {"code":"Auto Recovery On Red Boot\n [Documentation] Verify greenboot integration to start auto-recovery procedure.\n\n Greenboot Workaround For Boot Counter\n Command Should Work rm -rf ${SAFETY_BACKUP}\n\n Stop MicroShift\n Create Safety Backup\n Create Backup With Marker\n Set Up Greenboot Red Script\n\n Corrupt Etcd Database\n Start MicroShift Expecting Failure\n\n ${bootid}= Get Current Boot Id\n Command Should Fail systemctl restart greenboot-healthcheck\n Wait Until Keyword Succeeds 5m 15s\n ... System Should Be Rebooted ${bootid}\n Wait Until Greenboot Health Check Exited\n\n [Teardown] Run Keywords\n ... Restore Safety Backup\n ... AND\n ... Command Should Work rm -f \/etc\/greenboot\/red.d\/100-auto-recovery.sh\n ... AND\n ... Command Should Work rm -rf ${WORKDIR}","name":"Auto Recovery On Red Boot","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource', '..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource', '..\/..\/resources\/ostree-health.resource': 'test\/resources\/ostree-health.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/auto-recovery-extra.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'SAFETY_BACKUP': {'text': '${SAFETY_BACKUP} \/var\/lib\/microshift.safety'}, 'WORKDIR': {'text': '${WORKDIR} \/var\/lib\/microshift-auto-recovery\/'}}","documentation":""} {"code":"Setup\n [Documentation] Test suite setup\n Login MicroShift Host","name":"Setup","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/auto-recovery-extra.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Login MicroShift Host"} {"code":"Teardown\n [Documentation] Test suite teardown\n Logout MicroShift Host","name":"Teardown","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/auto-recovery-extra.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Logout MicroShift Host"} {"code":"Create Backup With Marker\n [Documentation] Create a backup with a marker file inside.\n ... Marker is later used to verify if the backup was actually restored.\n ${backup_path}= Command Should Work microshift backup --auto-recovery ${WORKDIR}\n Command Should Work touch ${backup_path}\/marker","name":"Create Backup With Marker","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/auto-recovery-extra.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'WORKDIR': {'text': '${WORKDIR} \/var\/lib\/microshift-auto-recovery\/'}}","documentation":"Marker is later used to verify if the backup was actually restored."} {"code":"Set Up MicroShift Auto Recovery Unit # robocop: disable=too-many-calls-in-keyword\n [Documentation] Sets up drop-in and service to run on MicroShift's failure.\n\n Command Should Work mkdir -p \/etc\/systemd\/system\/microshift.service.d\n ${drop_in}= Operating System.Get File .\/assets\/auto-recovery\/10-auto-recovery.conf\n Upload String To File ${drop_in} \/etc\/systemd\/system\/microshift.service.d\/10-auto-recovery.conf\n\n ${svc}= Operating System.Get File .\/assets\/auto-recovery\/microshift-auto-recovery.service\n Upload String To File ${svc} \/etc\/systemd\/system\/microshift-auto-recovery.service\n\n ${bin}= Operating System.Get File .\/assets\/auto-recovery\/microshift-auto-recovery\n Upload String To File ${bin} \/var\/opt\/microshift-auto-recovery\n Command Should Work chmod +x \/var\/opt\/microshift-auto-recovery\n # Following is needed for a systemd unit to call binary on different filesystem\n Command Should Work semanage fcontext --add --type bin_t \"\/var\/opt(\/.*)?\"\n Command Should Work restorecon -r -v \/var\/opt\/\n\n Command Should Work systemctl daemon-reload","name":"Set Up MicroShift Auto Recovery Unit","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/auto-recovery-extra.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Command Should Work mkdir -p \/etc\/systemd\/system\/microshift.service.d"} {"code":"Clean Up MicroShift Auto Recovery Unit\n [Documentation] Remove the microshift-auto-recovery.service and microshift.service's drop-in.\n Command Should Work rm -rf \/etc\/systemd\/system\/microshift.service.d\n Command Should Work rm -f \/etc\/systemd\/system\/microshift-auto-recovery.service\n Command Should Work rm -f \/var\/opt\/microshift-auto-recovery\n Command Should Work semanage fcontext --delete --type bin_t \"\/var\/opt(\/.*)?\"\n Command Should Work restorecon -r -v \/var\/opt\/\n Command Should Work systemctl daemon-reload","name":"Clean Up MicroShift Auto Recovery Unit","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/auto-recovery-extra.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Command Should Work rm -rf \/etc\/systemd\/system\/microshift.service.d"} {"code":"Start MicroShift Expecting Failure\n [Documentation] Start MicroShift expecting it fails.\n Command Should Fail systemctl start microshift","name":"Start MicroShift Expecting Failure","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/auto-recovery-extra.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Command Should Fail systemctl start microshift"} {"code":"Create Safety Backup\n [Documentation] Create an additional backup to restore during teardown\n ... in case something goes wrong with auto-recovery to not disrupt next test.\n Command Should Work microshift backup ${SAFETY_BACKUP}","name":"Create Safety Backup","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/auto-recovery-extra.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'SAFETY_BACKUP': {'text': '${SAFETY_BACKUP} \/var\/lib\/microshift.safety'}}","documentation":"in case something goes wrong with auto-recovery to not disrupt next test."} {"code":"Restore Safety Backup\n [Documentation] Restores additional backup during teardown and starts MicroShift.\n Run Keyword And Ignore Error\n ... Stop MicroShift\n Command Should Work microshift restore ${SAFETY_BACKUP}\n Command Should Work rm -rf ${SAFETY_BACKUP}\n Start MicroShift","name":"Restore Safety Backup","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource', '..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/auto-recovery-extra.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'SAFETY_BACKUP': {'text': '${SAFETY_BACKUP} \/var\/lib\/microshift.safety'}}","documentation":"Run Keyword And Ignore Error\n ... Stop MicroShift"} {"code":"Corrupt Etcd Database\n [Documentation] Overwrites first megabyte of the etcd's database to simulate\n ... corruption and cause MicroShift startup failure.\n Command Should Work\n ... dd conv=notrunc if=\/dev\/zero of=\/var\/lib\/microshift\/etcd\/member\/wal\/0000000000000000-0000000000000000.wal bs=1M count=1","name":"Corrupt Etcd Database","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/auto-recovery-extra.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Command Should Work\n ... dd conv=notrunc if=\/dev\/zero of=\/var\/lib\/microshift\/etcd\/member\/wal\/0000000000000000-0000000000000000.wal bs=1M count=1"} {"code":"Wait For Auto Recovery Unit To Finish\n [Documentation] Wait until microshift-auto-recovery.service completes\n ... running (unit enters state 'dead').\n [Arguments] ${dt}\n Wait Until Keyword Succeeds 20x 5s\n ... Auto Recovery Finished Recently ${dt}\n Command Should Work\n ... journalctl -u microshift-auto-recovery.service _SYSTEMD_INVOCATION_ID=\"$(systemctl show -p InvocationID --value microshift-auto-recovery.service)\"","name":"Wait For Auto Recovery Unit To Finish","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/auto-recovery-extra.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"running (unit enters state 'dead')."} {"code":"Auto Recovery Finished Recently\n [Documentation] Check if microshift-auto-recovery.service is dead and finished later than provided timestamp.\n [Arguments] ${dt}\n Systemctl Check Service SubState microshift-auto-recovery.service dead\n ${finish_dt}= Command Should Work\n ... date -d \"$(systemctl show --property=ExecMainExitTimestamp --value microshift-auto-recovery)\" +\"%s\"\n Should Be True ${dt} < ${finish_dt}","name":"Auto Recovery Finished Recently","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/auto-recovery-extra.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${dt}"} {"code":"Set Up Greenboot Red Script\n [Documentation] Set up red script that triggers auto-recovery procedure.\n Command Should Work mkdir -p \/etc\/greenboot\/red.d\n ${drop_in}= Operating System.Get File .\/assets\/auto-recovery\/red-script.sh\n Upload String To File ${drop_in} \/etc\/greenboot\/red.d\/99-auto-recovery.sh","name":"Set Up Greenboot Red Script","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/auto-recovery-extra.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Command Should Work mkdir -p \/etc\/greenboot\/red.d"} {"code":"Greenboot Workaround For Boot Counter\n [Documentation] If the grub's boot_success is 1, clears boot_counter.\n # Because of greenboot's bug, we need to it here, so the system doesn't reboot after red boot.\n Command Should Work\n ... bash -c \"grub2-editenv list | grep -q boot_success=1 && \/usr\/bin\/grub2-editenv \/boot\/grub2\/grubenv unset boot_counter || true\"","name":"Greenboot Workaround For Boot Counter","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/auto-recovery-extra.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"If the grub's boot_success is 1, clears boot_counter."} {"code":"*** Settings ***\nDocumentation Tests related to auto-recovery functionality\n\nResource ..\/..\/resources\/microshift-host.resource\nResource ..\/..\/resources\/microshift-process.resource\nLibrary Collections\nLibrary DateTime\nLibrary ..\/..\/resources\/libostree.py\n\nSuite Setup Setup\nSuite Teardown Teardown\n\n\n*** Variables ***\n${WORKDIR} \/var\/lib\/microshift-auto-recovery\/\n\n\n*** Test Cases ***\nBackups Are Created Successfully With Expected Schema\n [Documentation] Verify that backups intended for auto-recovery are created successfully\n ... and they are named with expected schema of DATETIME_DEPLOY-ID for ostree\/bootc and DATETIME_MICROSHIFT-VERSION.\n\n ${backup_path}= Command Should Work microshift backup --auto-recovery ${WORKDIR}\n ${backup_name}= Remove String ${backup_path} ${WORKDIR}\n Verify Backup Name ${backup_name}\n\n [Teardown] Command Should Work rm -rf ${WORKDIR}\n\nRestore Fails When There Are No Backups\n [Documentation] Restoring fail if the storage contains no backups at all.\n\n Command Should Fail microshift restore --auto-recovery ${WORKDIR}\n\nRestore Fails When There Are No Suitable Backups\n [Documentation] Create 3 backups, but change their versions to other\n ... MicroShift version\/Deployment ID, so even there are backups present,\n ... none is suitable for restoring.\n\n FOR ${counter} IN RANGE 1 4\n ${backup_path}= Command Should Work microshift backup --auto-recovery ${WORKDIR}\n Command Should Work bash -c \"echo ${counter} > ${backup_path}\/marker\"\n ${new_path}= Set Variable ${{ \"${backup_path}[:-1]\" + str(int(\"${backup_path}[-1]\")+1) }}\n Command Should Work sudo mv ${backup_path} ${new_path}\n Sleep 2s\n END\n Command Should Fail microshift restore --dont-save-failed --auto-recovery ${WORKDIR}\n\n [Teardown] Command Should Work rm -rf ${WORKDIR}\n\nRestore Selects Right Backup\n [Documentation] Test creates 3 backups and changes the last one's version.\n ... Restore command should use the second created backup as it's the most recent\n ... among backups that match the version.\n\n ${last_backup}= Create Backups 3 ${TRUE}\n\n # Rename the last backup to different deployment ID. When restoring it should be skipped.\n # Incrementing the last character is enough and works for both ostree\/bootc and rpm systems.\n ${new_path}= Set Variable ${{ \"${last_backup}[:-1]\" + str(int(\"${last_backup}[-1]\")+1) }}\n Command Should Work sudo mv ${last_backup} ${new_path}\n\n Command Should Work microshift restore --dont-save-failed --auto-recovery ${WORKDIR}\n ${backup_marker}= Command Should Work cat \/var\/lib\/microshift\/marker\n Should Be Equal As Numbers ${backup_marker} 2\n Command Should Work microshift restore --dont-save-failed --auto-recovery ${WORKDIR}\n\n [Teardown] Run Keywords\n ... Command Should Work rm -rf ${WORKDIR}\n ... AND\n ... Command Should Work rm -f \/var\/lib\/microshift\/marker\n\nPreviously Restored Backup Is Moved To Special Subdirectory\n [Documentation] Executing Restore command results in\n ... moving previously restored backup to a \"restored\" subdir.\n\n ${last_backup}= Create Backups 3\n ${expected_path}= Set Variable\n ... ${{ \"\/\".join( \"${last_backup}\".split(\"\/\")[:-1] + [\"restored\"] + [ \"${last_backup}\".split(\"\/\")[-1] ] ) }}\n Log ${expected_path}\n Command Should Work microshift restore --dont-save-failed --auto-recovery ${WORKDIR}\n # On second restore, previously restored backup ^ is moved into restored\/ subdir.\n Command Should Work microshift restore --dont-save-failed --auto-recovery ${WORKDIR}\n Command Should Work ls ${expected_path}\n\n [Teardown] Command Should Work rm -rf ${WORKDIR}\n\nMicroShift Data Is Backed Up For Later Analysis\n [Documentation] By default, MicroShift data should be copied\n ... to a \"failed\" subdirectory for later analysis.\n\n ${last_backup}= Create Backups 1\n Command Should Work microshift restore --auto-recovery ${WORKDIR}\n ${data_backup}= Command Should Work ls ${WORKDIR}\/failed\n Verify Backup Name ${data_backup}\n\n [Teardown] Command Should Work rm -rf ${WORKDIR}\n\nState File Is Created\n [Documentation] Restoring causes a state file creation.\n\n ${last_backup}= Create Backups 1\n ${backup_name}= Remove String ${last_backup} ${WORKDIR}\n\n Command Should Work microshift restore --dont-save-failed --auto-recovery ${WORKDIR}\n ${state_json}= Command Should Work cat ${WORKDIR}\/state.json\n ${state}= Json Parse ${state_json}\n Should Be Equal As Strings ${backup_name} ${state}[LastBackup]\n\n [Teardown] Command Should Work rm -rf ${WORKDIR}\n\n\n*** Keywords ***\nSetup\n [Documentation] Test suite setup\n Login MicroShift Host\n # Scenario needs to start with MicroShift running, so there's something to back up.\n Stop MicroShift\n\nTeardown\n [Documentation] Test suite teardown\n Start MicroShift\n Logout MicroShift Host\n\nVerify Backup Name\n [Documentation] Verify backup's naming schema\n [Arguments] ${backup_name}\n @{backup}= Split String ${backup_name} _\n Length Should Be ${backup} 2\n\n Verify Backup Datetime Against Host Time ${backup[0]}\n Verify Backup Version Against The System ${backup[1]}\n\nVerify Backup Datetime Against Host Time\n [Documentation] Compare given datetime against current time on the VM\n [Arguments] ${backup_datetime}\n ${backup_dt}= Convert Date ${backup_datetime} datetime\n ${vm_datetime}= Command Should Work date +'%Y-%m-%d %H:%M:%S'\n ${vm_dt}= Convert Date ${vm_datetime} datetime\n ${time_diff}= Subtract Date From Date ${vm_dt} ${backup_dt}\n Should Be True ${time_diff}<60\n\nVerify Backup Version Against The System\n [Documentation] Verify version part of the backup's name against the system:\n ... Deployment ID for ostree and bootc; MicroShift X.Y.Z version for RPM systems.\n [Arguments] ${ver}\n\n ${is_ostree}= Is System OSTree\n IF ${is_ostree}\n ${current_deploy_id}= Get Booted Deployment Id\n Should Be Equal As Strings ${current_deploy_id} ${ver}\n ELSE\n ${microshift_ver}= MicroShift Version\n Should Be Equal As Strings ${microshift_ver.major}.${microshift_ver.minor}.${microshift_ver.patch} ${ver}\n END\n\nCreate Backups\n [Documentation] Create specified amount of backups and return path to the last one.\n [Arguments] ${amount} ${markers}=${FALSE}\n FOR ${counter} IN RANGE 1 ${{ ${amount}+1 }}\n ${backup_path}= Command Should Work microshift backup --auto-recovery ${WORKDIR}\n IF ${markers}\n Command Should Work bash -c \"echo ${counter} > ${backup_path}\/marker\"\n END\n Sleep 2s\n END\n RETURN ${backup_path}\n","name":"\/tmp\/repos\/microshift\/test\/suites\/backup\/auto-recovery.robot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/auto-recovery.robot","element_type":"test","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Backups Are Created Successfully With Expected Schema\n [Documentation] Verify that backups intended for auto-recovery are created successfully\n ... and they are named with expected schema of DATETIME_DEPLOY-ID for ostree\/bootc and DATETIME_MICROSHIFT-VERSION.\n\n ${backup_path}= Command Should Work microshift backup --auto-recovery ${WORKDIR}\n ${backup_name}= Remove String ${backup_path} ${WORKDIR}\n Verify Backup Name ${backup_name}\n\n [Teardown] Command Should Work rm -rf ${WORKDIR}","name":"Backups Are Created Successfully With Expected Schema","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/auto-recovery.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'WORKDIR': {'text': '${WORKDIR} \/var\/lib\/microshift-auto-recovery\/'}}","documentation":""} {"code":"Restore Fails When There Are No Backups\n [Documentation] Restoring fail if the storage contains no backups at all.\n\n Command Should Fail microshift restore --auto-recovery ${WORKDIR}","name":"Restore Fails When There Are No Backups","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/auto-recovery.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'WORKDIR': {'text': '${WORKDIR} \/var\/lib\/microshift-auto-recovery\/'}}","documentation":""} {"code":"Restore Fails When There Are No Suitable Backups\n [Documentation] Create 3 backups, but change their versions to other\n ... MicroShift version\/Deployment ID, so even there are backups present,\n ... none is suitable for restoring.\n\n FOR ${counter} IN RANGE 1 4\n ${backup_path}= Command Should Work microshift backup --auto-recovery ${WORKDIR}\n Command Should Work bash -c \"echo ${counter} > ${backup_path}\/marker\"\n ${new_path}= Set Variable ${{ \"${backup_path}[:-1]\" + str(int(\"${backup_path}[-1]\")+1) }}\n Command Should Work sudo mv ${backup_path} ${new_path}\n Sleep 2s\n END\n Command Should Fail microshift restore --dont-save-failed --auto-recovery ${WORKDIR}\n\n [Teardown] Command Should Work rm -rf ${WORKDIR}","name":"Restore Fails When There Are No Suitable Backups","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/auto-recovery.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'WORKDIR': {'text': '${WORKDIR} \/var\/lib\/microshift-auto-recovery\/'}}","documentation":""} {"code":"Restore Selects Right Backup\n [Documentation] Test creates 3 backups and changes the last one's version.\n ... Restore command should use the second created backup as it's the most recent\n ... among backups that match the version.\n\n ${last_backup}= Create Backups 3 ${TRUE}\n\n # Rename the last backup to different deployment ID. When restoring it should be skipped.\n # Incrementing the last character is enough and works for both ostree\/bootc and rpm systems.\n ${new_path}= Set Variable ${{ \"${last_backup}[:-1]\" + str(int(\"${last_backup}[-1]\")+1) }}\n Command Should Work sudo mv ${last_backup} ${new_path}\n\n Command Should Work microshift restore --dont-save-failed --auto-recovery ${WORKDIR}\n ${backup_marker}= Command Should Work cat \/var\/lib\/microshift\/marker\n Should Be Equal As Numbers ${backup_marker} 2\n Command Should Work microshift restore --dont-save-failed --auto-recovery ${WORKDIR}\n\n [Teardown] Run Keywords\n ... Command Should Work rm -rf ${WORKDIR}\n ... AND\n ... Command Should Work rm -f \/var\/lib\/microshift\/marker","name":"Restore Selects Right Backup","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/auto-recovery.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'WORKDIR': {'text': '${WORKDIR} \/var\/lib\/microshift-auto-recovery\/'}}","documentation":""} {"code":"Previously Restored Backup Is Moved To Special Subdirectory\n [Documentation] Executing Restore command results in\n ... moving previously restored backup to a \"restored\" subdir.\n\n ${last_backup}= Create Backups 3\n ${expected_path}= Set Variable\n ... ${{ \"\/\".join( \"${last_backup}\".split(\"\/\")[:-1] + [\"restored\"] + [ \"${last_backup}\".split(\"\/\")[-1] ] ) }}\n Log ${expected_path}\n Command Should Work microshift restore --dont-save-failed --auto-recovery ${WORKDIR}\n # On second restore, previously restored backup ^ is moved into restored\/ subdir.\n Command Should Work microshift restore --dont-save-failed --auto-recovery ${WORKDIR}\n Command Should Work ls ${expected_path}\n\n [Teardown] Command Should Work rm -rf ${WORKDIR}","name":"Previously Restored Backup Is Moved To Special Subdirectory","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/auto-recovery.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'WORKDIR': {'text': '${WORKDIR} \/var\/lib\/microshift-auto-recovery\/'}}","documentation":""} {"code":"MicroShift Data Is Backed Up For Later Analysis\n [Documentation] By default, MicroShift data should be copied\n ... to a \"failed\" subdirectory for later analysis.\n\n ${last_backup}= Create Backups 1\n Command Should Work microshift restore --auto-recovery ${WORKDIR}\n ${data_backup}= Command Should Work ls ${WORKDIR}\/failed\n Verify Backup Name ${data_backup}\n\n [Teardown] Command Should Work rm -rf ${WORKDIR}","name":"MicroShift Data Is Backed Up For Later Analysis","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/auto-recovery.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'WORKDIR': {'text': '${WORKDIR} \/var\/lib\/microshift-auto-recovery\/'}}","documentation":""} {"code":"State File Is Created\n [Documentation] Restoring causes a state file creation.\n\n ${last_backup}= Create Backups 1\n ${backup_name}= Remove String ${last_backup} ${WORKDIR}\n\n Command Should Work microshift restore --dont-save-failed --auto-recovery ${WORKDIR}\n ${state_json}= Command Should Work cat ${WORKDIR}\/state.json\n ${state}= Json Parse ${state_json}\n Should Be Equal As Strings ${backup_name} ${state}[LastBackup]\n\n [Teardown] Command Should Work rm -rf ${WORKDIR}","name":"State File Is Created","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/auto-recovery.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'WORKDIR': {'text': '${WORKDIR} \/var\/lib\/microshift-auto-recovery\/'}}","documentation":""} {"code":"Setup\n [Documentation] Test suite setup\n Login MicroShift Host\n # Scenario needs to start with MicroShift running, so there's something to back up.\n Stop MicroShift","name":"Setup","imports_file_locations":"{'..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/auto-recovery.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Login MicroShift Host"} {"code":"Teardown\n [Documentation] Test suite teardown\n Start MicroShift\n Logout MicroShift Host","name":"Teardown","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/auto-recovery.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Start MicroShift"} {"code":"Verify Backup Name\n [Documentation] Verify backup's naming schema\n [Arguments] ${backup_name}\n @{backup}= Split String ${backup_name} _\n Length Should Be ${backup} 2\n\n Verify Backup Datetime Against Host Time ${backup[0]}\n Verify Backup Version Against The System ${backup[1]}","name":"Verify Backup Name","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/auto-recovery.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${backup_name}"} {"code":"Verify Backup Datetime Against Host Time\n [Documentation] Compare given datetime against current time on the VM\n [Arguments] ${backup_datetime}\n ${backup_dt}= Convert Date ${backup_datetime} datetime\n ${vm_datetime}= Command Should Work date +'%Y-%m-%d %H:%M:%S'\n ${vm_dt}= Convert Date ${vm_datetime} datetime\n ${time_diff}= Subtract Date From Date ${vm_dt} ${backup_dt}\n Should Be True ${time_diff}<60","name":"Verify Backup Datetime Against Host Time","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/auto-recovery.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${backup_datetime}"} {"code":"Verify Backup Version Against The System\n [Documentation] Verify version part of the backup's name against the system:\n ... Deployment ID for ostree and bootc; MicroShift X.Y.Z version for RPM systems.\n [Arguments] ${ver}\n\n ${is_ostree}= Is System OSTree\n IF ${is_ostree}\n ${current_deploy_id}= Get Booted Deployment Id\n Should Be Equal As Strings ${current_deploy_id} ${ver}\n ELSE\n ${microshift_ver}= MicroShift Version\n Should Be Equal As Strings ${microshift_ver.major}.${microshift_ver.minor}.${microshift_ver.patch} ${ver}\n END","name":"Verify Backup Version Against The System","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/auto-recovery.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${ver}"} {"code":"Create Backups\n [Documentation] Create specified amount of backups and return path to the last one.\n [Arguments] ${amount} ${markers}=${FALSE}\n FOR ${counter} IN RANGE 1 ${{ ${amount}+1 }}\n ${backup_path}= Command Should Work microshift backup --auto-recovery ${WORKDIR}\n IF ${markers}\n Command Should Work bash -c \"echo ${counter} > ${backup_path}\/marker\"\n END\n Sleep 2s\n END\n RETURN ${backup_path}","name":"Create Backups","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/auto-recovery.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'WORKDIR': {'text': '${WORKDIR} \/var\/lib\/microshift-auto-recovery\/'}}","documentation":"[Arguments] ${amount} ${markers}=${FALSE}"} {"code":"*** Settings ***\nDocumentation Tests related to MicroShift upgradeability on OSTree-based systems\n\nResource ..\/..\/resources\/common.resource\nResource ..\/..\/resources\/ostree.resource\nLibrary Collections\n\nSuite Setup Setup\nSuite Teardown Teardown\n\nTest Tags ostree\n\n\n*** Variables ***\n${USHIFT_HOST} ${EMPTY}\n${USHIFT_USER} ${EMPTY}\n\n\n*** Test Cases ***\nRebooting System Should Result In Data Backup\n [Documentation] Check if rebooting system will result in MicroShift creating backup\n\n Wait For MicroShift Service\n ${future_backup}= Get Future Backup Name For Current Boot\n\n Reboot MicroShift Host\n Wait For MicroShift Service\n\n Backup Should Exist ${future_backup}\n\nExistence Of Restore File Should Result In Restoring Data\n [Documentation] Check if rebooting unhealthy system will result\n ... restoring MicroShift data from a backup\n\n Wait For MicroShift Service\n Remove Existing Backup For Current Deployment\n\n ${backup_name}= Make Masquerading Backup\n\n Override Deployment ID In Version File\n Create Restore Marker File # to trigger restore after reboot\n Reboot MicroShift Host\n Wait For MicroShift Service\n\n Marker Should Exist In Data Dir\n Remove Marker From Data Dir\n\n\n*** Keywords ***\nSetup\n [Documentation] Test suite setup\n Check Required Env Variables\n Login MicroShift Host\n\nTeardown\n [Documentation] Test suite teardown\n Logout MicroShift Host\n\nMake Masquerading Backup\n [Documentation] Stops MicroShift and creates manual backup that\n ... masquerades as automated one (by prefixing the backup name with deployment ID)\n Systemctl stop microshift.service\n\n ${deploy_id}= Get Booted Deployment ID\n ${backup_name}= Set Variable ${deploy_id}_manual\n\n Create Backup ${backup_name} ${TRUE}\n\n RETURN ${backup_name}\n\nCreate Restore Marker File\n [Documentation] Creates a special file which existence of MicroShift will\n ... interpret as request to restore a backup.\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... touch \/var\/lib\/microshift-backups\/restore\n ... sudo=True return_stderr=True return_rc=True\n Should Be Equal As Integers 0 ${rc}\n\nMarker Should Exist In Data Dir\n [Documentation] Checks if marker file exists in MicroShift data directory\n ${stdout} ${stderr} ${rc}= Execute Command\n ... stat ${DATA_DIR}\/marker\n ... sudo=True return_stderr=True return_rc=True\n Should Be Equal As Integers 0 ${rc}\n\nRemove Marker From Data Dir\n [Documentation] Removes marker file from MicroShift data directory\n ${stdout} ${stderr} ${rc}= Execute Command\n ... rm -fv ${DATA_DIR}\/marker\n ... sudo=True return_stderr=True return_rc=True\n Should Be Equal As Integers 0 ${rc}\n\nOverride Deployment ID In Version File\n [Documentation] Changes deployment_id in the version file to bypass\n ... check that blocks restore when current deployment matches\n ... deployment saved in the file.\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... jq '.deployment_id=\"test\"' ${DATA_DIR}\/version > \/tmp\/microshift-version.new\n ... sudo=True\n ... return_stderr=True\n ... return_rc=True\n Should Be Equal As Integers 0 ${rc}\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... sudo mv \/tmp\/microshift-version.new ${DATA_DIR}\/version\n ... sudo=True\n ... return_stderr=True\n ... return_rc=True\n Should Be Equal As Integers 0 ${rc}\n","name":"\/tmp\/repos\/microshift\/test\/suites\/backup\/backup-restore-on-reboot.robot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/backup-restore-on-reboot.robot","element_type":"test","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Rebooting System Should Result In Data Backup\n [Documentation] Check if rebooting system will result in MicroShift creating backup\n\n Wait For MicroShift Service\n ${future_backup}= Get Future Backup Name For Current Boot\n\n Reboot MicroShift Host\n Wait For MicroShift Service\n\n Backup Should Exist ${future_backup}","name":"Rebooting System Should Result In Data Backup","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/backup-restore-on-reboot.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Existence Of Restore File Should Result In Restoring Data\n [Documentation] Check if rebooting unhealthy system will result\n ... restoring MicroShift data from a backup\n\n Wait For MicroShift Service\n Remove Existing Backup For Current Deployment\n\n ${backup_name}= Make Masquerading Backup\n\n Override Deployment ID In Version File\n Create Restore Marker File # to trigger restore after reboot\n Reboot MicroShift Host\n Wait For MicroShift Service\n\n Marker Should Exist In Data Dir\n Remove Marker From Data Dir","name":"Existence Of Restore File Should Result In Restoring Data","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/backup-restore-on-reboot.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Setup\n [Documentation] Test suite setup\n Check Required Env Variables\n Login MicroShift Host","name":"Setup","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/backup-restore-on-reboot.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Check Required Env Variables"} {"code":"Teardown\n [Documentation] Test suite teardown\n Logout MicroShift Host","name":"Teardown","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/backup-restore-on-reboot.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Logout MicroShift Host"} {"code":"Make Masquerading Backup\n [Documentation] Stops MicroShift and creates manual backup that\n ... masquerades as automated one (by prefixing the backup name with deployment ID)\n Systemctl stop microshift.service\n\n ${deploy_id}= Get Booted Deployment ID\n ${backup_name}= Set Variable ${deploy_id}_manual\n\n Create Backup ${backup_name} ${TRUE}\n\n RETURN ${backup_name}","name":"Make Masquerading Backup","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/backup-restore-on-reboot.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"masquerades as automated one (by prefixing the backup name with deployment ID)"} {"code":"Create Restore Marker File\n [Documentation] Creates a special file which existence of MicroShift will\n ... interpret as request to restore a backup.\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... touch \/var\/lib\/microshift-backups\/restore\n ... sudo=True return_stderr=True return_rc=True\n Should Be Equal As Integers 0 ${rc}","name":"Create Restore Marker File","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/backup-restore-on-reboot.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${stdout} ${stderr} ${rc}= Execute Command\n ... touch \/var\/lib\/microshift-backups\/restore"} {"code":"Marker Should Exist In Data Dir\n [Documentation] Checks if marker file exists in MicroShift data directory\n ${stdout} ${stderr} ${rc}= Execute Command\n ... stat ${DATA_DIR}\/marker\n ... sudo=True return_stderr=True return_rc=True\n Should Be Equal As Integers 0 ${rc}","name":"Marker Should Exist In Data Dir","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/backup-restore-on-reboot.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${stdout} ${stderr} ${rc}= Execute Command\n ... stat ${DATA_DIR}\/marker\n ... sudo=True return_stderr=True return_rc=True"} {"code":"Remove Marker From Data Dir\n [Documentation] Removes marker file from MicroShift data directory\n ${stdout} ${stderr} ${rc}= Execute Command\n ... rm -fv ${DATA_DIR}\/marker\n ... sudo=True return_stderr=True return_rc=True\n Should Be Equal As Integers 0 ${rc}","name":"Remove Marker From Data Dir","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/backup-restore-on-reboot.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${stdout} ${stderr} ${rc}= Execute Command\n ... rm -fv ${DATA_DIR}\/marker\n ... sudo=True return_stderr=True return_rc=True"} {"code":"Override Deployment ID In Version File\n [Documentation] Changes deployment_id in the version file to bypass\n ... check that blocks restore when current deployment matches\n ... deployment saved in the file.\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... jq '.deployment_id=\"test\"' ${DATA_DIR}\/version > \/tmp\/microshift-version.new\n ... sudo=True\n ... return_stderr=True\n ... return_rc=True\n Should Be Equal As Integers 0 ${rc}\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... sudo mv \/tmp\/microshift-version.new ${DATA_DIR}\/version\n ... sudo=True\n ... return_stderr=True\n ... return_rc=True\n Should Be Equal As Integers 0 ${rc}","name":"Override Deployment ID In Version File","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/backup-restore-on-reboot.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${stdout} ${stderr} ${rc}= Execute Command\n ... jq '.deployment_id=\"test\"' ${DATA_DIR}\/version > \/tmp\/microshift-version.new\n ... sudo=True\n ... return_stderr=True\n ... return_rc=True"} {"code":"*** Settings ***\nDocumentation Tests related to MicroShift backup functionality on OSTree-based systems\n\nResource ..\/..\/resources\/common.resource\nResource ..\/..\/resources\/ostree.resource\nResource ..\/..\/resources\/ostree-data.resource\nLibrary Collections\nLibrary ..\/..\/resources\/libostree.py\n\nSuite Setup Setup\nSuite Teardown Teardown\n\nTest Tags ostree\n\n\n*** Variables ***\n${USHIFT_HOST} ${EMPTY}\n${USHIFT_USER} ${EMPTY}\n\n${FAKE_DIR_REG} *_fake*\n${UNKOWN_DIR_REG} unknown*\n\n\n*** Test Cases ***\nRebooting Healthy System Should Result In Pruning Old Backups\n [Documentation] Check that MicroShift backup logic prunes old backups\n\n Validate Fake Backups Have Been Deleted\n\nRebooting Healthy System Should Not Delete Unknown Directories\n [Documentation] Check that MicroShift backup logic does not delete unknown directories\n\n Validate Unknown Directories Exist\n\nRestarting MicroShift Should Not Result In Backup Creation\n [Documentation] Check that backup won't be created on MicroShift restart\n ... (which would block creating right backup after reboot)\n\n ${deploy_id}= Get Booted Deployment ID\n ${boot_id}= Get Current Boot Id\n Restart MicroShift\n Backup Should Not Exist ${deploy_id} ${boot_id}\n\n\n*** Keywords ***\nCreate Fake Backup Directories\n [Documentation] Create fake backup folders to be pruned\n Create Fake Backups 5\n\nValidate Fake Backups Exist\n [Documentation] Make sure the fake backups exist\n List Backups With Expected RC 0 ${FAKE_DIR_REG}\n\nValidate Fake Backups Have Been Deleted\n [Documentation] Listing the fake backups should return an error code of 2 if no longer exists\n List Backups With Expected RC 2 ${FAKE_DIR_REG}\n\nCreate Unknown Directories\n [Documentation] Create unknown fake folders that the pruning logic should not touch\n Create Fake Backups 2 True\n\nValidate Unknown Directories Exist\n [Documentation] Make sure the unknown fake backups exist\n List Backups With Expected RC 0 ${UNKOWN_DIR_REG}\n\nDelete Unknown Directories\n [Documentation] Remove unknown directories\n\n ${stdout} ${rc}= Execute Command\n ... rm -rf ${BACKUP_STORAGE}\/${UNKOWN_DIR_REG}\n ... sudo=True return_rc=True\n Should Be Equal As Integers 0 ${rc}\n\nList Backups With Expected RC\n [Documentation] Lists backup directory content and checks against a desirec RC\n [Arguments] ${expected_exit_code} ${ls_regex}\n ${stdout} ${rc}= Execute Command\n ... ls -lah ${BACKUP_STORAGE}\/${ls_regex}\n ... sudo=True return_rc=True\n Should Be Equal As Integers ${expected_exit_code} ${rc}\n\nSetup\n [Documentation] Test suite setup\n Check Required Env Variables\n Login MicroShift Host\n\n Create Fake Backup Directories\n Validate Fake Backups Exist\n\n Create Unknown Directories\n Validate Unknown Directories Exist\n\n Reboot MicroShift Host\n Wait Until Greenboot Health Check Exited\n\nTeardown\n [Documentation] Test suite teardown\n Delete Unknown Directories\n Logout MicroShift Host\n","name":"\/tmp\/repos\/microshift\/test\/suites\/backup\/backups.robot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/backups.robot","element_type":"test","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Rebooting Healthy System Should Result In Pruning Old Backups\n [Documentation] Check that MicroShift backup logic prunes old backups\n\n Validate Fake Backups Have Been Deleted","name":"Rebooting Healthy System Should Result In Pruning Old Backups","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/backups.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Rebooting Healthy System Should Not Delete Unknown Directories\n [Documentation] Check that MicroShift backup logic does not delete unknown directories\n\n Validate Unknown Directories Exist","name":"Rebooting Healthy System Should Not Delete Unknown Directories","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/backups.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Restarting MicroShift Should Not Result In Backup Creation\n [Documentation] Check that backup won't be created on MicroShift restart\n ... (which would block creating right backup after reboot)\n\n ${deploy_id}= Get Booted Deployment ID\n ${boot_id}= Get Current Boot Id\n Restart MicroShift\n Backup Should Not Exist ${deploy_id} ${boot_id}","name":"Restarting MicroShift Should Not Result In Backup Creation","imports_file_locations":"{'..\/..\/resources\/ostree-data.resource': 'test\/resources\/ostree-data.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/backups.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Create Fake Backup Directories\n [Documentation] Create fake backup folders to be pruned\n Create Fake Backups 5","name":"Create Fake Backup Directories","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/backups.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Create Fake Backups 5"} {"code":"Validate Fake Backups Exist\n [Documentation] Make sure the fake backups exist\n List Backups With Expected RC 0 ${FAKE_DIR_REG}","name":"Validate Fake Backups Exist","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/backups.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'FAKE_DIR_REG': {'text': '${FAKE_DIR_REG} *_fake*'}}","documentation":"List Backups With Expected RC 0 ${FAKE_DIR_REG}"} {"code":"Validate Fake Backups Have Been Deleted\n [Documentation] Listing the fake backups should return an error code of 2 if no longer exists\n List Backups With Expected RC 2 ${FAKE_DIR_REG}","name":"Validate Fake Backups Have Been Deleted","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/backups.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'FAKE_DIR_REG': {'text': '${FAKE_DIR_REG} *_fake*'}}","documentation":"List Backups With Expected RC 2 ${FAKE_DIR_REG}"} {"code":"Create Unknown Directories\n [Documentation] Create unknown fake folders that the pruning logic should not touch\n Create Fake Backups 2 True","name":"Create Unknown Directories","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/backups.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Create Fake Backups 2 True"} {"code":"Validate Unknown Directories Exist\n [Documentation] Make sure the unknown fake backups exist\n List Backups With Expected RC 0 ${UNKOWN_DIR_REG}","name":"Validate Unknown Directories Exist","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/backups.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'UNKOWN_DIR_REG': {'text': '${UNKOWN_DIR_REG} unknown*'}}","documentation":"List Backups With Expected RC 0 ${UNKOWN_DIR_REG}"} {"code":"Delete Unknown Directories\n [Documentation] Remove unknown directories\n\n ${stdout} ${rc}= Execute Command\n ... rm -rf ${BACKUP_STORAGE}\/${UNKOWN_DIR_REG}\n ... sudo=True return_rc=True\n Should Be Equal As Integers 0 ${rc}","name":"Delete Unknown Directories","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/backups.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'UNKOWN_DIR_REG': {'text': '${UNKOWN_DIR_REG} unknown*'}}","documentation":"${stdout} ${rc}= Execute Command\n ... rm -rf ${BACKUP_STORAGE}\/${UNKOWN_DIR_REG}\n ... sudo=True return_rc=True"} {"code":"List Backups With Expected RC\n [Documentation] Lists backup directory content and checks against a desirec RC\n [Arguments] ${expected_exit_code} ${ls_regex}\n ${stdout} ${rc}= Execute Command\n ... ls -lah ${BACKUP_STORAGE}\/${ls_regex}\n ... sudo=True return_rc=True\n Should Be Equal As Integers ${expected_exit_code} ${rc}","name":"List Backups With Expected RC","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/backups.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${expected_exit_code} ${ls_regex}"} {"code":"Setup\n [Documentation] Test suite setup\n Check Required Env Variables\n Login MicroShift Host\n\n Create Fake Backup Directories\n Validate Fake Backups Exist\n\n Create Unknown Directories\n Validate Unknown Directories Exist\n\n Reboot MicroShift Host\n Wait Until Greenboot Health Check Exited","name":"Setup","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/backups.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Check Required Env Variables"} {"code":"Teardown\n [Documentation] Test suite teardown\n Delete Unknown Directories\n Logout MicroShift Host","name":"Teardown","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/backup\/backups.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Delete Unknown Directories"} {"code":"*** Settings ***\nDocumentation Tests related to FIPS Validation\n\nResource ..\/..\/resources\/ostree-health.resource\nResource ..\/..\/resources\/common.resource\nResource ..\/..\/resources\/selinux.resource\nResource ..\/..\/resources\/microshift-host.resource\nResource ..\/..\/resources\/microshift-process.resource\nLibrary Collections\n\nSuite Setup Setup\nSuite Teardown Teardown\n\n\n*** Variables ***\n${USHIFT_HOST} ${EMPTY}\n${USHIFT_USER} ${EMPTY}\n${USHIFT_LIBS_DUMP_FILE} \/tmp\/microshift-libs\n${FIPS_PATTERN} ossl-modules\/fips.so$\n${CHECK_PAYLOAD_IMAGE} registry.ci.openshift.org\/ci\/check-payload:latest\n${PULL_SECRET_PATH} \/etc\/crio\/openshift-pull-secret\n\n\n*** Test Cases ***\nVerify Host Is FIPS Enabled\n [Documentation] Performs a FIPS validation against the host\n ${is_bootc}= Is System Bootc\n IF ${is_bootc}\n Fips Should Be Enabled Bootc\n ELSE\n Fips Should Be Enabled Non-Bootc\n END\n\nVerify Binary Is FIPS Compliant\n [Documentation] Performs a FIPS validation against the Microshift binary\n Microshift Binary Should Dynamically Link FIPS Ossl Module\n\nVerify Node RPMs FIPS Compliant\n [Documentation] Performs a FIPS validation against the Installed RPMs\n Check Payload Tool Must Pass\n\nVerify Container Images FIPS Compliant\n [Documentation] Performs a FIPS validation against the Released payload\n Check Container Images In Release Must Pass\n\n\n*** Keywords ***\nSetup\n [Documentation] Test suite setup\n Check Required Env Variables\n Login MicroShift Host\n Setup Kubeconfig\n Start MicroShift\n Wait Until Greenboot Health Check Exited\n\nTeardown\n [Documentation] Test suite teardown\n # Download the binary Libs dump files to the artifacts\n Run Keyword And Ignore Error\n ... SSHLibrary.Get File ${USHIFT_LIBS_DUMP_FILE}* ${OUTPUTDIR}\/\n Run Keyword And Ignore Error\n ... SSHLibrary.Get File ${CHECK_PAYLOAD_OUTPUT_FILE} ${OUTPUTDIR}\/check-payload.log\n Run Keyword And Ignore Error\n ... SSHLibrary.Get File ${CHECK_PAYLOAD_REL_OUTPUT_FILE} ${OUTPUTDIR}\/check-release-payload.log\n Start MicroShift\n Wait For MicroShift\n Logout MicroShift Host\n\nCheck Payload Tool Must Pass\n [Documentation] Run check-paylod Tool\n ${podman_args}= Set Variable --authfile \/etc\/crio\/openshift-pull-secret --privileged -i -v \/:\/myroot\n ${scan_command}= Set Variable scan node --root \/myroot\n ${path}= Create Random Temp File\n Set Global Variable ${CHECK_PAYLOAD_OUTPUT_FILE} ${path}\n ${rc}= Execute Command rpm -qi microshift >${CHECK_PAYLOAD_OUTPUT_FILE} 2>&1\n ... sudo=True return_rc=True return_stdout=False return_stderr=False\n Should Be Equal As Integers 0 ${rc}\n ${rc}= Execute Command\n ... podman run ${podman_args} ${CHECK_PAYLOAD_IMAGE} ${scan_command} >>${CHECK_PAYLOAD_OUTPUT_FILE} 2>&1\n ... sudo=True return_rc=True return_stdout=False return_stderr=False\n Should Be Equal As Integers 0 ${rc}\n\nCheck Container Images In Release Must Pass\n [Documentation] Run check-paylod Tool for Release containers\n ${podman_pull_secret}= Set Variable \/root\/.config\/containers\/auth.json\n ${podman_mounts}= Set Variable -v ${PULL_SECRET_PATH}:${podman_pull_secret}\n ${podman_args}= Set Variable --rm --authfile ${PULL_SECRET_PATH} --privileged ${podman_mounts}\n ${path}= Create Random Temp File\n Set Global Variable ${CHECK_PAYLOAD_REL_OUTPUT_FILE} ${path}\n @{images}= Get Images From Release File\n FOR ${image} IN @{images}\n ${scan_command}= Set Variable scan operator --spec ${image}\n ${rc}= Execute Command\n ... podman run ${podman_args} ${CHECK_PAYLOAD_IMAGE} ${scan_command} >>${CHECK_PAYLOAD_REL_OUTPUT_FILE} 2>&1\n ... sudo=True return_rc=True return_stdout=False return_stderr=False\n Should Be Equal As Integers 0 ${rc}\n END\n\nMicroshift Binary Should Dynamically Link FIPS Ossl Module\n [Documentation] Check if Microshift binary is FIPS compliant.\n ${stdout} ${stderr} ${rc}= Execute Command\n ... LD_DEBUG_OUTPUT=${USHIFT_LIBS_DUMP_FILE} LD_DEBUG=libs microshift run\n ... sudo=False return_rc=True return_stdout=True return_stderr=True\n Should Be Equal As Integers 1 ${rc}\n ${stdout} ${rc}= Execute Command\n ... grep ${FIPS_PATTERN} ${USHIFT_LIBS_DUMP_FILE}*\n ... sudo=False return_rc=True\n Should Be Equal As Integers 0 ${rc}\n\nFips Should Be Enabled Non-Bootc\n [Documentation] Check if FIPS is enabled on a non-bootc RHEL\n ${stdout} ${stderr} ${rc}= Execute Command\n ... bash -x fips-mode-setup --check\n ... sudo=True return_rc=True return_stdout=True return_stderr=True\n Should Be Equal As Integers 0 ${rc}\n Should Match ${stdout} FIPS mode is enabled.\n\nFips Should Be Enabled Bootc\n [Documentation] Check if FIPS is enabled on a bootc RHEL\n\n # Verify FIPS crypto flag is enabled in the system\n ${stdout} ${stderr} ${rc}= Execute Command\n ... cat \/proc\/sys\/crypto\/fips_enabled\n ... sudo=False return_rc=True return_stdout=True return_stderr=True\n Should Be Equal As Integers 0 ${rc}\n Should Be Equal As Strings ${stdout.strip()} 1\n\n # Verify crypto policies are set to FIPS\n ${stdout} ${stderr} ${rc}= Execute Command\n ... update-crypto-policies --show\n ... sudo=False return_rc=True return_stdout=True return_stderr=True\n Should Be Equal As Integers 0 ${rc}\n Should Be Equal As Strings ${stdout.strip()} FIPS\n\n # Verify initramfs FIPS module presence\n ${stdout} ${stderr} ${rc}= Execute Command\n ... bash -c 'lsinitrd -m 2>\/dev\/null | grep -Fxq fips'\n ... sudo=False return_rc=True return_stdout=True return_stderr=True\n Should Be Equal As Integers 0 ${rc}\n\nGet Images From Release File\n [Documentation] Obtains list of Images from Release.\n ${stdout} ${stderr} ${rc}= Execute Command\n ... jq -r '.images | .[]' \/usr\/share\/microshift\/release\/release-$(uname -m).json\n ... return_stdout=True return_stderr=True return_rc=True\n Should Be Equal As Integers 0 ${rc}\n Log Many ${stdout} ${stderr} ${rc}\n\n @{images}= Split String ${stdout} \\n\n RETURN @{images}\n","name":"\/tmp\/repos\/microshift\/test\/suites\/fips\/validate-fips.robot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/fips\/validate-fips.robot","element_type":"test","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Verify Host Is FIPS Enabled\n [Documentation] Performs a FIPS validation against the host\n ${is_bootc}= Is System Bootc\n IF ${is_bootc}\n Fips Should Be Enabled Bootc\n ELSE\n Fips Should Be Enabled Non-Bootc\n END","name":"Verify Host Is FIPS Enabled","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/fips\/validate-fips.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Verify Binary Is FIPS Compliant\n [Documentation] Performs a FIPS validation against the Microshift binary\n Microshift Binary Should Dynamically Link FIPS Ossl Module","name":"Verify Binary Is FIPS Compliant","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/fips\/validate-fips.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Verify Node RPMs FIPS Compliant\n [Documentation] Performs a FIPS validation against the Installed RPMs\n Check Payload Tool Must Pass","name":"Verify Node RPMs FIPS Compliant","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/fips\/validate-fips.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Verify Container Images FIPS Compliant\n [Documentation] Performs a FIPS validation against the Released payload\n Check Container Images In Release Must Pass","name":"Verify Container Images FIPS Compliant","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/fips\/validate-fips.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Setup\n [Documentation] Test suite setup\n Check Required Env Variables\n Login MicroShift Host\n Setup Kubeconfig\n Start MicroShift\n Wait Until Greenboot Health Check Exited","name":"Setup","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource', '..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource', '..\/..\/resources\/ostree-health.resource': 'test\/resources\/ostree-health.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/fips\/validate-fips.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Check Required Env Variables"} {"code":"Teardown\n [Documentation] Test suite teardown\n # Download the binary Libs dump files to the artifacts\n Run Keyword And Ignore Error\n ... SSHLibrary.Get File ${USHIFT_LIBS_DUMP_FILE}* ${OUTPUTDIR}\/\n Run Keyword And Ignore Error\n ... SSHLibrary.Get File ${CHECK_PAYLOAD_OUTPUT_FILE} ${OUTPUTDIR}\/check-payload.log\n Run Keyword And Ignore Error\n ... SSHLibrary.Get File ${CHECK_PAYLOAD_REL_OUTPUT_FILE} ${OUTPUTDIR}\/check-release-payload.log\n Start MicroShift\n Wait For MicroShift\n Logout MicroShift Host","name":"Teardown","imports_file_locations":"{'..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource', '..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/fips\/validate-fips.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'USHIFT_LIBS_DUMP_FILE': {'text': '${USHIFT_LIBS_DUMP_FILE} \/tmp\/microshift-libs'}}","documentation":"Test suite teardown"} {"code":"Check Payload Tool Must Pass\n [Documentation] Run check-paylod Tool\n ${podman_args}= Set Variable --authfile \/etc\/crio\/openshift-pull-secret --privileged -i -v \/:\/myroot\n ${scan_command}= Set Variable scan node --root \/myroot\n ${path}= Create Random Temp File\n Set Global Variable ${CHECK_PAYLOAD_OUTPUT_FILE} ${path}\n ${rc}= Execute Command rpm -qi microshift >${CHECK_PAYLOAD_OUTPUT_FILE} 2>&1\n ... sudo=True return_rc=True return_stdout=False return_stderr=False\n Should Be Equal As Integers 0 ${rc}\n ${rc}= Execute Command\n ... podman run ${podman_args} ${CHECK_PAYLOAD_IMAGE} ${scan_command} >>${CHECK_PAYLOAD_OUTPUT_FILE} 2>&1\n ... sudo=True return_rc=True return_stdout=False return_stderr=False\n Should Be Equal As Integers 0 ${rc}","name":"Check Payload Tool Must Pass","imports_file_locations":"{'..\/..\/resources\/common.resource': 'test\/resources\/common.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/fips\/validate-fips.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${podman_args}= Set Variable --authfile \/etc\/crio\/openshift-pull-secret --privileged -i -v \/:\/myroot"} {"code":"Check Container Images In Release Must Pass\n [Documentation] Run check-paylod Tool for Release containers\n ${podman_pull_secret}= Set Variable \/root\/.config\/containers\/auth.json\n ${podman_mounts}= Set Variable -v ${PULL_SECRET_PATH}:${podman_pull_secret}\n ${podman_args}= Set Variable --rm --authfile ${PULL_SECRET_PATH} --privileged ${podman_mounts}\n ${path}= Create Random Temp File\n Set Global Variable ${CHECK_PAYLOAD_REL_OUTPUT_FILE} ${path}\n @{images}= Get Images From Release File\n FOR ${image} IN @{images}\n ${scan_command}= Set Variable scan operator --spec ${image}\n ${rc}= Execute Command\n ... podman run ${podman_args} ${CHECK_PAYLOAD_IMAGE} ${scan_command} >>${CHECK_PAYLOAD_REL_OUTPUT_FILE} 2>&1\n ... sudo=True return_rc=True return_stdout=False return_stderr=False\n Should Be Equal As Integers 0 ${rc}\n END","name":"Check Container Images In Release Must Pass","imports_file_locations":"{'..\/..\/resources\/common.resource': 'test\/resources\/common.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/fips\/validate-fips.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'PULL_SECRET_PATH': {'text': '${PULL_SECRET_PATH} \/etc\/crio\/openshift-pull-secret'}}","documentation":"${podman_pull_secret}= Set Variable \/root\/.config\/containers\/auth.json"} {"code":"Microshift Binary Should Dynamically Link FIPS Ossl Module\n [Documentation] Check if Microshift binary is FIPS compliant.\n ${stdout} ${stderr} ${rc}= Execute Command\n ... LD_DEBUG_OUTPUT=${USHIFT_LIBS_DUMP_FILE} LD_DEBUG=libs microshift run\n ... sudo=False return_rc=True return_stdout=True return_stderr=True\n Should Be Equal As Integers 1 ${rc}\n ${stdout} ${rc}= Execute Command\n ... grep ${FIPS_PATTERN} ${USHIFT_LIBS_DUMP_FILE}*\n ... sudo=False return_rc=True\n Should Be Equal As Integers 0 ${rc}","name":"Microshift Binary Should Dynamically Link FIPS Ossl Module","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/fips\/validate-fips.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'USHIFT_LIBS_DUMP_FILE': {'text': '${USHIFT_LIBS_DUMP_FILE} \/tmp\/microshift-libs'}, 'FIPS_PATTERN': {'text': '${FIPS_PATTERN} ossl-modules\/fips.so$\\n${CHECK_PAYLOAD_IMAGE} registry.ci.openshift.org\/ci\/check-payload:latest'}}","documentation":"${stdout} ${stderr} ${rc}= Execute Command\n ... LD_DEBUG_OUTPUT=${USHIFT_LIBS_DUMP_FILE} LD_DEBUG=libs microshift run\n ... sudo=False return_rc=True return_stdout=True return_stderr=True"} {"code":"Fips Should Be Enabled Non-Bootc\n [Documentation] Check if FIPS is enabled on a non-bootc RHEL\n ${stdout} ${stderr} ${rc}= Execute Command\n ... bash -x fips-mode-setup --check\n ... sudo=True return_rc=True return_stdout=True return_stderr=True\n Should Be Equal As Integers 0 ${rc}\n Should Match ${stdout} FIPS mode is enabled.","name":"Fips Should Be Enabled Non-Bootc","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/fips\/validate-fips.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${stdout} ${stderr} ${rc}= Execute Command\n ... bash -x fips-mode-setup --check\n ... sudo=True return_rc=True return_stdout=True return_stderr=True"} {"code":"Fips Should Be Enabled Bootc\n [Documentation] Check if FIPS is enabled on a bootc RHEL\n\n # Verify FIPS crypto flag is enabled in the system\n ${stdout} ${stderr} ${rc}= Execute Command\n ... cat \/proc\/sys\/crypto\/fips_enabled\n ... sudo=False return_rc=True return_stdout=True return_stderr=True\n Should Be Equal As Integers 0 ${rc}\n Should Be Equal As Strings ${stdout.strip()} 1\n\n # Verify crypto policies are set to FIPS\n ${stdout} ${stderr} ${rc}= Execute Command\n ... update-crypto-policies --show\n ... sudo=False return_rc=True return_stdout=True return_stderr=True\n Should Be Equal As Integers 0 ${rc}\n Should Be Equal As Strings ${stdout.strip()} FIPS\n\n # Verify initramfs FIPS module presence\n ${stdout} ${stderr} ${rc}= Execute Command\n ... bash -c 'lsinitrd -m 2>\/dev\/null | grep -Fxq fips'\n ... sudo=False return_rc=True return_stdout=True return_stderr=True\n Should Be Equal As Integers 0 ${rc}","name":"Fips Should Be Enabled Bootc","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/fips\/validate-fips.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Check if FIPS is enabled on a bootc RHEL"} {"code":"Get Images From Release File\n [Documentation] Obtains list of Images from Release.\n ${stdout} ${stderr} ${rc}= Execute Command\n ... jq -r '.images | .[]' \/usr\/share\/microshift\/release\/release-$(uname -m).json\n ... return_stdout=True return_stderr=True return_rc=True\n Should Be Equal As Integers 0 ${rc}\n Log Many ${stdout} ${stderr} ${rc}\n\n @{images}= Split String ${stdout} \\n\n RETURN @{images}","name":"Get Images From Release File","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/fips\/validate-fips.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${stdout} ${stderr} ${rc}= Execute Command\n ... jq -r '.images | .[]' \/usr\/share\/microshift\/release\/release-$(uname -m).json\n ... return_stdout=True return_stderr=True return_rc=True"} {"code":"*** Settings ***\nDocumentation Tests related to greenboot\n\nResource ..\/..\/resources\/systemd.resource\nResource ..\/..\/resources\/ostree.resource\nResource ..\/..\/resources\/ostree-health.resource\nResource ..\/..\/resources\/microshift-config.resource\n\nSuite Setup Setup Suite\nSuite Teardown Teardown Suite\n\nTest Tags restart slow\n\n\n*** Variables ***\n${LOCAL_WORKLOAD_FILE} ..\/docs\/config\/busybox_running_check.sh\n${GREENBOOT_WORKLOAD_FILE} \/etc\/greenboot\/check\/required.d\/50_busybox_running_check.sh\n${GREENBOOT_CONFIG_FILE} \/etc\/greenboot\/greenboot.conf\n${GREENBOOT_CONFIG_CONTENT} MICROSHIFT_WAIT_TIMEOUT_SEC=180\n${MANIFEST_SOURCE_DIR} .\/assets\/kustomizations\/greenboot\/\n${MANIFEST_DIR} \/etc\/microshift\/manifests\n${HOSTNAME_BIN_PATH} \"\"\n\n\n*** Test Cases ***\nRun with User Workload\n [Documentation] Add user's workload and verify that the workload starts and greenboot is successful.\n Restart Greenboot And Wait For Success\n Add User Workload\n Cleanup And Start\n\n [Teardown] Run Keywords\n ... Cleanup User Workload\n ... Cleanup And Start\n\nSimulate Service Failure\n [Documentation] Simulate Service failure\n Restart Greenboot And Wait For Success\n Disrupt Service\n Cleanup MicroShift --all --keep-images\n # not using 'Start MicroShift' kw because it retries\n Run Keyword And Expect Error 0 != 1\n ... Systemctl start microshift\n Run Keyword And Expect Error 0 != 1\n ... Restart Greenboot And Wait For Success\n\n [Teardown] Run Keywords\n ... Restore Service\n ... Cleanup And Start\n\nSimulate Pod Failure\n [Documentation] Simulate pod network failure\n Restart Greenboot And Wait For Success\n Disrupt Pod Network\n Restart MicroShift\n Run Keyword And Expect Error 0 != 1\n ... Restart Greenboot And Wait For Success\n\n [Teardown] Run Keywords\n ... Remove Drop In MicroShift Config 10-svcNetwork\n ... AND\n ... Cleanup And Start\n\n\n*** Keywords ***\nSetup Suite\n [Documentation] Set up all of the tests in this suite\n Check Required Env Variables\n Login MicroShift Host\n Setup Kubeconfig\n Upload String To File ${GREENBOOT_CONFIG_CONTENT} ${GREENBOOT_CONFIG_FILE} # change the default timeout\n\nAdd User Workload\n [Documentation] Upload User workload files to the MicroShift host\n Put File ${LOCAL_WORKLOAD_FILE} \/tmp\/busybox_running_check.sh\n ${stdout} ${rc}= Execute Command\n ... [ -f ${GREENBOOT_WORKLOAD_FILE} ] || sudo mv \/tmp\/busybox_running_check.sh ${GREENBOOT_WORKLOAD_FILE}\n ... sudo=True return_rc=True\n Should Be Equal As Integers 0 ${rc}\n\n Put Directory ${MANIFEST_SOURCE_DIR} \/tmp\/manifests\n ${stdout} ${rc}= Execute Command\n ... cp -f \/tmp\/manifests\/* ${MANIFEST_DIR} && sudo rm -rf \/tmp\/manifests\n ... sudo=True return_rc=True\n Should Be Equal As Integers 0 ${rc}\n\nCleanup User Workload\n [Documentation] Remove User workload files from the MicroShift host\n ${stdout} ${rc}= Execute Command\n ... rm -rf ${GREENBOOT_WORKLOAD_FILE} ${MANIFEST_DIR}\/*\n ... sudo=True return_rc=True\n Should Be Equal As Integers 0 ${rc}\n\nDisrupt Service\n [Documentation] Prevent Microshift service from starting correctly.\n\n ${stdout} ${rc}= Execute Command\n ... which hostname\n ... sudo=False return_rc=True\n IF ${rc} == 0 Set Suite Variable \\${HOSTNAME_BIN_PATH} ${stdout}\n\n # This covers both ostree and bootc systems\n ${is_ostree}= Is System OSTree\n IF ${is_ostree} Create Usr Directory Overlay\n\n ${rc}= Execute Command\n ... chmod 000 ${HOSTNAME_BIN_PATH}\n ... sudo=True return_rc=True return_stdout=False\n Should Be Equal As Integers 0 ${rc}\n\nRestore Service\n [Documentation] Restore Microshift service to the correct form.\n ${stdout} ${rc}= Execute Command\n ... chmod 755 ${HOSTNAME_BIN_PATH}\n ... sudo=True return_rc=True\n Should Be Equal As Integers 0 ${rc}\n\n # Reboot to regain ostree deployment (revert usroverlay)\n ${is_ostree}= Is System OSTree\n IF ${is_ostree} Reboot MicroShift Host\n\nDisrupt Pod Network\n [Documentation] Prevent Microshift pods From starting correctly\n ${configuration}= Catenate SEPARATOR=\\n\n ... network:\n ... \\ clusterNetwork:\n ... \\ - 10.42.0.0\/16\n ... \\ serviceNetwork:\n ... \\ - 10.66.0.0\/16\n ...\n Drop In MicroShift Config ${configuration} 10-svcNetwork\n\nCleanup And Start\n [Documentation] Wipe Microshift data and start it.\n Cleanup MicroShift --all --keep-images\n Start MicroShift\n Setup Kubeconfig\n Restart Greenboot And Wait For Success\n","name":"\/tmp\/repos\/microshift\/test\/suites\/greenboot\/greenboot.robot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/greenboot\/greenboot.robot","element_type":"test","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Run with User Workload\n [Documentation] Add user's workload and verify that the workload starts and greenboot is successful.\n Restart Greenboot And Wait For Success\n Add User Workload\n Cleanup And Start\n\n [Teardown] Run Keywords\n ... Cleanup User Workload\n ... Cleanup And Start","name":"Run with User Workload","imports_file_locations":"{'..\/..\/resources\/ostree-health.resource': 'test\/resources\/ostree-health.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/greenboot\/greenboot.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Simulate Service Failure\n [Documentation] Simulate Service failure\n Restart Greenboot And Wait For Success\n Disrupt Service\n Cleanup MicroShift --all --keep-images\n # not using 'Start MicroShift' kw because it retries\n Run Keyword And Expect Error 0 != 1\n ... Systemctl start microshift\n Run Keyword And Expect Error 0 != 1\n ... Restart Greenboot And Wait For Success\n\n [Teardown] Run Keywords\n ... Restore Service\n ... Cleanup And Start","name":"Simulate Service Failure","imports_file_locations":"{'..\/..\/resources\/ostree-health.resource': 'test\/resources\/ostree-health.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/greenboot\/greenboot.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Simulate Pod Failure\n [Documentation] Simulate pod network failure\n Restart Greenboot And Wait For Success\n Disrupt Pod Network\n Restart MicroShift\n Run Keyword And Expect Error 0 != 1\n ... Restart Greenboot And Wait For Success\n\n [Teardown] Run Keywords\n ... Remove Drop In MicroShift Config 10-svcNetwork\n ... AND\n ... Cleanup And Start","name":"Simulate Pod Failure","imports_file_locations":"{'..\/..\/resources\/ostree-health.resource': 'test\/resources\/ostree-health.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/greenboot\/greenboot.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Setup Suite\n [Documentation] Set up all of the tests in this suite\n Check Required Env Variables\n Login MicroShift Host\n Setup Kubeconfig\n Upload String To File ${GREENBOOT_CONFIG_CONTENT} ${GREENBOOT_CONFIG_FILE} # change the default timeout","name":"Setup Suite","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/greenboot\/greenboot.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'GREENBOOT_CONFIG_CONTENT': {'text': '${GREENBOOT_CONFIG_CONTENT} MICROSHIFT_WAIT_TIMEOUT_SEC=180'}, 'GREENBOOT_CONFIG_FILE': {'text': '${GREENBOOT_CONFIG_FILE} \/etc\/greenboot\/greenboot.conf'}}","documentation":"Check Required Env Variables"} {"code":"Add User Workload\n [Documentation] Upload User workload files to the MicroShift host\n Put File ${LOCAL_WORKLOAD_FILE} \/tmp\/busybox_running_check.sh\n ${stdout} ${rc}= Execute Command\n ... [ -f ${GREENBOOT_WORKLOAD_FILE} ] || sudo mv \/tmp\/busybox_running_check.sh ${GREENBOOT_WORKLOAD_FILE}\n ... sudo=True return_rc=True\n Should Be Equal As Integers 0 ${rc}\n\n Put Directory ${MANIFEST_SOURCE_DIR} \/tmp\/manifests\n ${stdout} ${rc}= Execute Command\n ... cp -f \/tmp\/manifests\/* ${MANIFEST_DIR} && sudo rm -rf \/tmp\/manifests\n ... sudo=True return_rc=True\n Should Be Equal As Integers 0 ${rc}","name":"Add User Workload","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/greenboot\/greenboot.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'LOCAL_WORKLOAD_FILE': {'text': '${LOCAL_WORKLOAD_FILE} ..\/docs\/config\/busybox_running_check.sh'}, 'GREENBOOT_WORKLOAD_FILE': {'text': '${GREENBOOT_WORKLOAD_FILE} \/etc\/greenboot\/check\/required.d\/50_busybox_running_check.sh'}, 'MANIFEST_SOURCE_DIR': {'text': '${MANIFEST_SOURCE_DIR} .\/assets\/kustomizations\/greenboot\/'}, 'MANIFEST_DIR': {'text': '${MANIFEST_DIR} \/etc\/microshift\/manifests'}}","documentation":"Put File ${LOCAL_WORKLOAD_FILE} \/tmp\/busybox_running_check.sh"} {"code":"Cleanup User Workload\n [Documentation] Remove User workload files from the MicroShift host\n ${stdout} ${rc}= Execute Command\n ... rm -rf ${GREENBOOT_WORKLOAD_FILE} ${MANIFEST_DIR}\/*\n ... sudo=True return_rc=True\n Should Be Equal As Integers 0 ${rc}","name":"Cleanup User Workload","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/greenboot\/greenboot.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'GREENBOOT_WORKLOAD_FILE': {'text': '${GREENBOOT_WORKLOAD_FILE} \/etc\/greenboot\/check\/required.d\/50_busybox_running_check.sh'}, 'MANIFEST_DIR': {'text': '${MANIFEST_DIR} \/etc\/microshift\/manifests'}}","documentation":"${stdout} ${rc}= Execute Command\n ... rm -rf ${GREENBOOT_WORKLOAD_FILE} ${MANIFEST_DIR}\/*\n ... sudo=True return_rc=True"} {"code":"Disrupt Service\n [Documentation] Prevent Microshift service from starting correctly.\n\n ${stdout} ${rc}= Execute Command\n ... which hostname\n ... sudo=False return_rc=True\n IF ${rc} == 0 Set Suite Variable \\${HOSTNAME_BIN_PATH} ${stdout}\n\n # This covers both ostree and bootc systems\n ${is_ostree}= Is System OSTree\n IF ${is_ostree} Create Usr Directory Overlay\n\n ${rc}= Execute Command\n ... chmod 000 ${HOSTNAME_BIN_PATH}\n ... sudo=True return_rc=True return_stdout=False\n Should Be Equal As Integers 0 ${rc}","name":"Disrupt Service","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/greenboot\/greenboot.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'HOSTNAME_BIN_PATH': {'text': '${HOSTNAME_BIN_PATH} \"\"'}}","documentation":"${stdout} ${rc}= Execute Command\n ... which hostname\n ... sudo=False return_rc=True"} {"code":"Restore Service\n [Documentation] Restore Microshift service to the correct form.\n ${stdout} ${rc}= Execute Command\n ... chmod 755 ${HOSTNAME_BIN_PATH}\n ... sudo=True return_rc=True\n Should Be Equal As Integers 0 ${rc}\n\n # Reboot to regain ostree deployment (revert usroverlay)\n ${is_ostree}= Is System OSTree\n IF ${is_ostree} Reboot MicroShift Host","name":"Restore Service","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/greenboot\/greenboot.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'HOSTNAME_BIN_PATH': {'text': '${HOSTNAME_BIN_PATH} \"\"'}}","documentation":"${stdout} ${rc}= Execute Command\n ... chmod 755 ${HOSTNAME_BIN_PATH}\n ... sudo=True return_rc=True"} {"code":"Disrupt Pod Network\n [Documentation] Prevent Microshift pods From starting correctly\n ${configuration}= Catenate SEPARATOR=\\n\n ... network:\n ... \\ clusterNetwork:\n ... \\ - 10.42.0.0\/16\n ... \\ serviceNetwork:\n ... \\ - 10.66.0.0\/16\n ...\n Drop In MicroShift Config ${configuration} 10-svcNetwork","name":"Disrupt Pod Network","imports_file_locations":"{'..\/..\/resources\/microshift-config.resource': 'test\/resources\/microshift-config.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/greenboot\/greenboot.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${configuration}= Catenate SEPARATOR=\\n\n ... network:\n ... \\ clusterNetwork:\n ... \\ - 10.42.0.0\/16\n ... \\ serviceNetwork:\n ... \\ - 10.66.0.0\/16\n ..."} {"code":"Cleanup And Start\n [Documentation] Wipe Microshift data and start it.\n Cleanup MicroShift --all --keep-images\n Start MicroShift\n Setup Kubeconfig\n Restart Greenboot And Wait For Success","name":"Cleanup And Start","imports_file_locations":"{'..\/..\/resources\/ostree-health.resource': 'test\/resources\/ostree-health.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/greenboot\/greenboot.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Cleanup MicroShift --all --keep-images"} {"code":"*** Settings ***\nDocumentation Tests related to MicroShift running in a dual stack ipv4+6 host\n\nResource ..\/..\/resources\/common.resource\nResource ..\/..\/resources\/oc.resource\nResource ..\/..\/resources\/ostree-health.resource\nResource ..\/..\/resources\/microshift-network.resource\nResource ..\/..\/resources\/microshift-config.resource\nLibrary ..\/..\/resources\/libipv6.py\n\nSuite Setup Setup\nSuite Teardown Teardown\n\nTest Tags ipv6 network\n\n\n*** Variables ***\n${USHIFT_HOST_IP1} ${EMPTY}\n${USHIFT_HOST_IP2} ${EMPTY}\n${HOSTNAME} hello-microshift.dualstack.cluster.local\n\n\n*** Test Cases ***\nVerify New Pod Works With IPv6\n [Documentation] Verify IPv6 services are routable.\n [Setup] Run Keywords\n ... Migrate To Dual Stack\n ... Create Hello MicroShift Pod\n ... Expose Hello MicroShift Service Via Route IPv6\n ... Restart Router\n\n ${pod_ip}= Oc Get JsonPath pod ${NAMESPACE} hello-microshift .status.podIPs[0].ip\n Must Not Be Ipv6 ${pod_ip}\n ${pod_ip}= Oc Get JsonPath pod ${NAMESPACE} hello-microshift .status.podIPs[1].ip\n Must Be Ipv6 ${pod_ip}\n ${service_ip}= Oc Get JsonPath svc ${NAMESPACE} hello-microshift .spec.clusterIP\n Must Be Ipv6 ${service_ip}\n\n Wait Until Keyword Succeeds 10x 6s\n ... Access Hello Microshift Success ushift_ip=${USHIFT_HOST_IP1}\n ... ushift_port=${HTTP_PORT}\n ... hostname=${HOSTNAME}\n Wait Until Keyword Succeeds 10x 6s\n ... Access Hello Microshift Success ushift_ip=${USHIFT_HOST_IP2}\n ... ushift_port=${HTTP_PORT}\n ... hostname=${HOSTNAME}\n\n [Teardown] Run Keywords\n ... Delete Hello MicroShift Route\n ... Delete Hello MicroShift Pod And Service\n ... Wait For Service Deletion With Timeout\n ... Remove Dual Stack Config Drop In\n ... Restart MicroShift\n\nVerify New Pod Works With IPv4\n [Documentation] Verify IPv4 services are routable.\n [Setup] Run Keywords\n ... Migrate To Dual Stack\n ... Create Hello MicroShift Pod\n ... Expose Hello MicroShift Service Via Route IPv4\n ... Restart Router\n\n ${pod_ip}= Oc Get JsonPath pod ${NAMESPACE} hello-microshift .status.podIPs[0].ip\n Must Not Be Ipv6 ${pod_ip}\n ${pod_ip}= Oc Get JsonPath pod ${NAMESPACE} hello-microshift .status.podIPs[1].ip\n Must Be Ipv6 ${pod_ip}\n ${service_ip}= Oc Get JsonPath svc ${NAMESPACE} hello-microshift .spec.clusterIP\n Must Not Be Ipv6 ${service_ip}\n\n Wait Until Keyword Succeeds 10x 6s\n ... Access Hello Microshift Success ushift_ip=${USHIFT_HOST_IP1}\n ... ushift_port=${HTTP_PORT}\n ... hostname=${HOSTNAME}\n Wait Until Keyword Succeeds 10x 6s\n ... Access Hello Microshift Success ushift_ip=${USHIFT_HOST_IP2}\n ... ushift_port=${HTTP_PORT}\n ... hostname=${HOSTNAME}\n\n [Teardown] Run Keywords\n ... Delete Hello MicroShift Route\n ... Delete Hello MicroShift Pod And Service\n ... Wait For Service Deletion With Timeout\n ... Remove Dual Stack Config Drop In\n ... Restart MicroShift\n\nVerify Host Network Pods Get Dual Stack IP Addresses\n [Documentation] Verify host network pods get dual stack IP addresses\n [Setup] Run Keywords\n ... Migrate To Dual Stack\n\n ${pod_ips}= Oc Get JsonPath\n ... pod\n ... openshift-dns\n ... -l dns.operator.openshift.io\/daemonset-node-resolver\n ... .items[*].status.podIPs[*].ip\n Should Contain ${pod_ips} ${USHIFT_HOST_IP1}\n Should Contain ${pod_ips} ${USHIFT_HOST_IP2}\n\n [Teardown] Run Keywords\n ... Remove Dual Stack Config Drop In\n ... Restart MicroShift\n\n\n*** Keywords ***\nSetup\n [Documentation] Test suite setup\n Initialize Global Variables\n Login MicroShift Host\n Setup Suite With Namespace\n Wait Until Greenboot Health Check Exited\n\nTeardown\n [Documentation] Test suite teardown\n Teardown Suite With Namespace\n Logout MicroShift Host\n\nRemove Dual Stack Config Drop In\n [Documentation] Remove dual stack config drop-in\n Remove Drop In MicroShift Config 10-dualstack\n\nInitialize Global Variables\n [Documentation] Initializes global variables.\n Log IP1: ${USHIFT_HOST_IP1} IPv6: ${USHIFT_HOST_IP2}\n Should Not Be Empty ${USHIFT_HOST_IP1} USHIFT_HOST_IP1 variable is required\n Should Not Be Empty ${USHIFT_HOST_IP2} USHIFT_HOST_IP2 variable is required\n\nMigrate To Dual Stack\n [Documentation] Configure MicroShift to enable dual stack network\n\n ${dual_stack}= CATENATE SEPARATOR=\\n\n ... ---\n ... network:\n ... \\ \\ clusterNetwork: [10.42.0.0\/16, fd01::\/48]\n ... \\ \\ serviceNetwork: [10.43.0.0\/16, fd02::\/112]\n Drop In MicroShift Config ${dual_stack} 10-dualstack\n Restart MicroShift\n\nDelete Hello MicroShift Route\n [Documentation] Delete route for cleanup.\n Oc Delete route\/hello-microshift -n ${NAMESPACE}\n\nWait For Service Deletion With Timeout\n [Documentation] Polls for service and endpoint by \"app=hello-microshift\" label. Fails if timeout\n ... expires. This check is unique to this test suite because each test here reuses the same namespace. Since\n ... the tests reuse the service name, a small race window exists between the teardown of one test and the setup\n ... of the next. This produces flakey failures when the service or endpoint names collide.\n Wait Until Keyword Succeeds 30s 1s\n ... Network APIs With Test Label Are Gone\n\nExpose Hello MicroShift Service Via Route IPv4\n [Documentation] Expose the \"hello microshift\" application through the Route\n Run With Kubeconfig oc apply -n ${NAMESPACE} -f assets\/hello\/hello-microshift-service.yaml\n Oc Expose svc hello-microshift --hostname ${HOSTNAME} -n ${NAMESPACE}\n\nExpose Hello MicroShift Service Via Route IPv6\n [Documentation] Expose the \"hello microshift\" application through the Route\n Run With Kubeconfig oc apply -n ${NAMESPACE} -f assets\/hello\/hello-microshift-service-ipv6.yaml\n Oc Expose svc hello-microshift --hostname ${HOSTNAME} -n ${NAMESPACE}\n\nNetwork APIs With Test Label Are Gone\n [Documentation] Check for service and endpoint by \"app=hello-microshift\" label. Succeeds if response matches\n ... \"No resources found in namespace.\" Fail if not.\n ${match_string}= Catenate No resources found in ${NAMESPACE} namespace.\n ${match_string}= Remove String ${match_string} \"\n ${response}= Run With Kubeconfig oc get svc,ep -l app\\=hello-microshift -n ${NAMESPACE}\n Should Be Equal As Strings ${match_string} ${response} strip_spaces=True\n\nRestart Router\n [Documentation] Restart the router and wait for readiness again. The router is sensitive to apiserver\n ... downtime and might need a restart (after the apiserver is ready) to resync all the routes.\n Run With Kubeconfig oc rollout restart deployment router-default -n openshift-ingress\n Named Deployment Should Be Available router-default openshift-ingress 5m\n","name":"\/tmp\/repos\/microshift\/test\/suites\/ipv6\/dualstack.robot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/ipv6\/dualstack.robot","element_type":"test","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Verify New Pod Works With IPv6\n [Documentation] Verify IPv6 services are routable.\n [Setup] Run Keywords\n ... Migrate To Dual Stack\n ... Create Hello MicroShift Pod\n ... Expose Hello MicroShift Service Via Route IPv6\n ... Restart Router\n\n ${pod_ip}= Oc Get JsonPath pod ${NAMESPACE} hello-microshift .status.podIPs[0].ip\n Must Not Be Ipv6 ${pod_ip}\n ${pod_ip}= Oc Get JsonPath pod ${NAMESPACE} hello-microshift .status.podIPs[1].ip\n Must Be Ipv6 ${pod_ip}\n ${service_ip}= Oc Get JsonPath svc ${NAMESPACE} hello-microshift .spec.clusterIP\n Must Be Ipv6 ${service_ip}\n\n Wait Until Keyword Succeeds 10x 6s\n ... Access Hello Microshift Success ushift_ip=${USHIFT_HOST_IP1}\n ... ushift_port=${HTTP_PORT}\n ... hostname=${HOSTNAME}\n Wait Until Keyword Succeeds 10x 6s\n ... Access Hello Microshift Success ushift_ip=${USHIFT_HOST_IP2}\n ... ushift_port=${HTTP_PORT}\n ... hostname=${HOSTNAME}\n\n [Teardown] Run Keywords\n ... Delete Hello MicroShift Route\n ... Delete Hello MicroShift Pod And Service\n ... Wait For Service Deletion With Timeout\n ... Remove Dual Stack Config Drop In\n ... Restart MicroShift","name":"Verify New Pod Works With IPv6","imports_file_locations":"{'..\/..\/resources\/oc.resource': 'test\/resources\/oc.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/ipv6\/dualstack.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'USHIFT_HOST_IP1': {'text': '${USHIFT_HOST_IP1} ${EMPTY}'}, 'HOSTNAME': {'text': '${HOSTNAME} hello-microshift.dualstack.cluster.local'}, 'USHIFT_HOST_IP2': {'text': '${USHIFT_HOST_IP2} ${EMPTY}'}}","documentation":""} {"code":"Verify New Pod Works With IPv4\n [Documentation] Verify IPv4 services are routable.\n [Setup] Run Keywords\n ... Migrate To Dual Stack\n ... Create Hello MicroShift Pod\n ... Expose Hello MicroShift Service Via Route IPv4\n ... Restart Router\n\n ${pod_ip}= Oc Get JsonPath pod ${NAMESPACE} hello-microshift .status.podIPs[0].ip\n Must Not Be Ipv6 ${pod_ip}\n ${pod_ip}= Oc Get JsonPath pod ${NAMESPACE} hello-microshift .status.podIPs[1].ip\n Must Be Ipv6 ${pod_ip}\n ${service_ip}= Oc Get JsonPath svc ${NAMESPACE} hello-microshift .spec.clusterIP\n Must Not Be Ipv6 ${service_ip}\n\n Wait Until Keyword Succeeds 10x 6s\n ... Access Hello Microshift Success ushift_ip=${USHIFT_HOST_IP1}\n ... ushift_port=${HTTP_PORT}\n ... hostname=${HOSTNAME}\n Wait Until Keyword Succeeds 10x 6s\n ... Access Hello Microshift Success ushift_ip=${USHIFT_HOST_IP2}\n ... ushift_port=${HTTP_PORT}\n ... hostname=${HOSTNAME}\n\n [Teardown] Run Keywords\n ... Delete Hello MicroShift Route\n ... Delete Hello MicroShift Pod And Service\n ... Wait For Service Deletion With Timeout\n ... Remove Dual Stack Config Drop In\n ... Restart MicroShift","name":"Verify New Pod Works With IPv4","imports_file_locations":"{'..\/..\/resources\/oc.resource': 'test\/resources\/oc.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/ipv6\/dualstack.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'USHIFT_HOST_IP1': {'text': '${USHIFT_HOST_IP1} ${EMPTY}'}, 'HOSTNAME': {'text': '${HOSTNAME} hello-microshift.dualstack.cluster.local'}, 'USHIFT_HOST_IP2': {'text': '${USHIFT_HOST_IP2} ${EMPTY}'}}","documentation":""} {"code":"Verify Host Network Pods Get Dual Stack IP Addresses\n [Documentation] Verify host network pods get dual stack IP addresses\n [Setup] Run Keywords\n ... Migrate To Dual Stack\n\n ${pod_ips}= Oc Get JsonPath\n ... pod\n ... openshift-dns\n ... -l dns.operator.openshift.io\/daemonset-node-resolver\n ... .items[*].status.podIPs[*].ip\n Should Contain ${pod_ips} ${USHIFT_HOST_IP1}\n Should Contain ${pod_ips} ${USHIFT_HOST_IP2}\n\n [Teardown] Run Keywords\n ... Remove Dual Stack Config Drop In\n ... Restart MicroShift","name":"Verify Host Network Pods Get Dual Stack IP Addresses","imports_file_locations":"{'..\/..\/resources\/oc.resource': 'test\/resources\/oc.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/ipv6\/dualstack.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'USHIFT_HOST_IP1': {'text': '${USHIFT_HOST_IP1} ${EMPTY}'}, 'USHIFT_HOST_IP2': {'text': '${USHIFT_HOST_IP2} ${EMPTY}'}}","documentation":""} {"code":"Setup\n [Documentation] Test suite setup\n Initialize Global Variables\n Login MicroShift Host\n Setup Suite With Namespace\n Wait Until Greenboot Health Check Exited","name":"Setup","imports_file_locations":"{'..\/..\/resources\/common.resource': 'test\/resources\/common.resource', '..\/..\/resources\/ostree-health.resource': 'test\/resources\/ostree-health.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/ipv6\/dualstack.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Initialize Global Variables"} {"code":"Teardown\n [Documentation] Test suite teardown\n Teardown Suite With Namespace\n Logout MicroShift Host","name":"Teardown","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/ipv6\/dualstack.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Teardown Suite With Namespace"} {"code":"Remove Dual Stack Config Drop In\n [Documentation] Remove dual stack config drop-in\n Remove Drop In MicroShift Config 10-dualstack","name":"Remove Dual Stack Config Drop In","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/ipv6\/dualstack.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Remove Drop In MicroShift Config 10-dualstack"} {"code":"Initialize Global Variables\n [Documentation] Initializes global variables.\n Log IP1: ${USHIFT_HOST_IP1} IPv6: ${USHIFT_HOST_IP2}\n Should Not Be Empty ${USHIFT_HOST_IP1} USHIFT_HOST_IP1 variable is required\n Should Not Be Empty ${USHIFT_HOST_IP2} USHIFT_HOST_IP2 variable is required","name":"Initialize Global Variables","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/ipv6\/dualstack.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'USHIFT_HOST_IP1': {'text': '${USHIFT_HOST_IP1} ${EMPTY}'}, 'USHIFT_HOST_IP2': {'text': '${USHIFT_HOST_IP2} ${EMPTY}'}}","documentation":"Log IP1: ${USHIFT_HOST_IP1} IPv6: ${USHIFT_HOST_IP2}"} {"code":"Migrate To Dual Stack\n [Documentation] Configure MicroShift to enable dual stack network\n\n ${dual_stack}= CATENATE SEPARATOR=\\n\n ... ---\n ... network:\n ... \\ \\ clusterNetwork: [10.42.0.0\/16, fd01::\/48]\n ... \\ \\ serviceNetwork: [10.43.0.0\/16, fd02::\/112]\n Drop In MicroShift Config ${dual_stack} 10-dualstack\n Restart MicroShift","name":"Migrate To Dual Stack","imports_file_locations":"{'..\/..\/resources\/microshift-config.resource': 'test\/resources\/microshift-config.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/ipv6\/dualstack.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${dual_stack}= CATENATE SEPARATOR=\\n\n ... ---\n ... network:\n ... \\ \\ clusterNetwork: [10.42.0.0\/16, fd01::\/48]\n ... \\ \\ serviceNetwork: [10.43.0.0\/16, fd02::\/112]"} {"code":"Delete Hello MicroShift Route\n [Documentation] Delete route for cleanup.\n Oc Delete route\/hello-microshift -n ${NAMESPACE}","name":"Delete Hello MicroShift Route","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/ipv6\/dualstack.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Oc Delete route\/hello-microshift -n ${NAMESPACE}"} {"code":"Wait For Service Deletion With Timeout\n [Documentation] Polls for service and endpoint by \"app=hello-microshift\" label. Fails if timeout\n ... expires. This check is unique to this test suite because each test here reuses the same namespace. Since\n ... the tests reuse the service name, a small race window exists between the teardown of one test and the setup\n ... of the next. This produces flakey failures when the service or endpoint names collide.\n Wait Until Keyword Succeeds 30s 1s\n ... Network APIs With Test Label Are Gone","name":"Wait For Service Deletion With Timeout","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/ipv6\/dualstack.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"of the next. This produces flakey failures when the service or endpoint names collide.\n Wait Until Keyword Succeeds 30s 1s\n ... Network APIs With Test Label Are Gone"} {"code":"Expose Hello MicroShift Service Via Route IPv4\n [Documentation] Expose the \"hello microshift\" application through the Route\n Run With Kubeconfig oc apply -n ${NAMESPACE} -f assets\/hello\/hello-microshift-service.yaml\n Oc Expose svc hello-microshift --hostname ${HOSTNAME} -n ${NAMESPACE}","name":"Expose Hello MicroShift Service Via Route IPv4","imports_file_locations":"{'..\/..\/resources\/oc.resource': 'test\/resources\/oc.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/ipv6\/dualstack.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'HOSTNAME': {'text': '${HOSTNAME} hello-microshift.dualstack.cluster.local'}}","documentation":"Run With Kubeconfig oc apply -n ${NAMESPACE} -f assets\/hello\/hello-microshift-service.yaml"} {"code":"Expose Hello MicroShift Service Via Route IPv6\n [Documentation] Expose the \"hello microshift\" application through the Route\n Run With Kubeconfig oc apply -n ${NAMESPACE} -f assets\/hello\/hello-microshift-service-ipv6.yaml\n Oc Expose svc hello-microshift --hostname ${HOSTNAME} -n ${NAMESPACE}","name":"Expose Hello MicroShift Service Via Route IPv6","imports_file_locations":"{'..\/..\/resources\/oc.resource': 'test\/resources\/oc.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/ipv6\/dualstack.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'HOSTNAME': {'text': '${HOSTNAME} hello-microshift.dualstack.cluster.local'}}","documentation":"Run With Kubeconfig oc apply -n ${NAMESPACE} -f assets\/hello\/hello-microshift-service-ipv6.yaml"} {"code":"Network APIs With Test Label Are Gone\n [Documentation] Check for service and endpoint by \"app=hello-microshift\" label. Succeeds if response matches\n ... \"No resources found in namespace.\" Fail if not.\n ${match_string}= Catenate No resources found in ${NAMESPACE} namespace.\n ${match_string}= Remove String ${match_string} \"\n ${response}= Run With Kubeconfig oc get svc,ep -l app\\=hello-microshift -n ${NAMESPACE}\n Should Be Equal As Strings ${match_string} ${response} strip_spaces=True","name":"Network APIs With Test Label Are Gone","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/ipv6\/dualstack.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"\"No resources found in namespace.\" Fail if not."} {"code":"Restart Router\n [Documentation] Restart the router and wait for readiness again. The router is sensitive to apiserver\n ... downtime and might need a restart (after the apiserver is ready) to resync all the routes.\n Run With Kubeconfig oc rollout restart deployment router-default -n openshift-ingress\n Named Deployment Should Be Available router-default openshift-ingress 5m","name":"Restart Router","imports_file_locations":"{'..\/..\/resources\/oc.resource': 'test\/resources\/oc.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/ipv6\/dualstack.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"downtime and might need a restart (after the apiserver is ready) to resync all the routes."} {"code":"*** Settings ***\nDocumentation Tests related to MicroShift running in an IPv6-only host\n\nResource ..\/..\/resources\/common.resource\nResource ..\/..\/resources\/oc.resource\nResource ..\/..\/resources\/ostree-health.resource\nResource ..\/..\/resources\/microshift-network.resource\nLibrary ..\/..\/resources\/libipv6.py\n\nSuite Setup Setup\nSuite Teardown Teardown\n\nTest Tags ipv6 network\n\n\n*** Variables ***\n${USHIFT_HOST} ${EMPTY}\n${HOSTNAME} hello-microshift.ipv6.cluster.local\n\n\n*** Test Cases ***\nVerify Router Serves IPv6\n [Documentation] Verify router is capable of serving ipv6 traffic.\n [Setup] Run Keywords\n ... Create Hello MicroShift Pod\n ... Expose Hello MicroShift Service Via Route\n ... Restart Router\n\n Must Be Ipv6 ${USHIFT_HOST}\n Wait Until Keyword Succeeds 10x 6s\n ... Access Hello Microshift Success ushift_port=${HTTP_PORT} hostname=${HOSTNAME}\n\n DNS Entry For Route Should Resolve\n\n [Teardown] Run Keywords\n ... Delete Hello MicroShift Route\n ... Delete Hello MicroShift Pod And Service\n ... Wait For Service Deletion With Timeout\n\nVerify All Services Are Ipv6\n [Documentation] Check all services are running IPv6 only\n\n All Services Are Ipv6\n\n\n*** Keywords ***\nSetup\n [Documentation] Test suite setup\n Login MicroShift Host\n Setup Suite With Namespace\n Wait Until Greenboot Health Check Exited\n\nTeardown\n [Documentation] Test suite teardown\n Logout MicroShift Host\n\nDelete Hello MicroShift Route\n [Documentation] Delete route for cleanup.\n Oc Delete route\/hello-microshift -n ${NAMESPACE}\n\nWait For Service Deletion With Timeout\n [Documentation] Polls for service and endpoint by \"app=hello-microshift\" label. Fails if timeout\n ... expires. This check is unique to this test suite because each test here reuses the same namespace. Since\n ... the tests reuse the service name, a small race window exists between the teardown of one test and the setup\n ... of the next. This produces flakey failures when the service or endpoint names collide.\n Wait Until Keyword Succeeds 30s 1s\n ... Network APIs With Test Label Are Gone\n\nExpose Hello MicroShift Service Via Route\n [Documentation] Expose the \"hello microshift\" application through the Route\n Oc Expose pod hello-microshift -n ${NAMESPACE}\n Oc Expose svc hello-microshift --hostname ${HOSTNAME} -n ${NAMESPACE}\n\nNetwork APIs With Test Label Are Gone\n [Documentation] Check for service and endpoint by \"app=hello-microshift\" label. Succeeds if response matches\n ... \"No resources found in namespace.\" Fail if not.\n ${match_string}= Catenate No resources found in ${NAMESPACE} namespace.\n ${match_string}= Remove String ${match_string} \"\n ${response}= Run With Kubeconfig oc get svc,ep -l app\\=hello-microshift -n ${NAMESPACE}\n Should Be Equal As Strings ${match_string} ${response} strip_spaces=True\n\nDNS Entry For Route Should Resolve\n [Documentation] Resolve hello-microshift route via mDNS from the hypervisor\/RF runner.\n ... Expects RF runner host has opened port 5353 for libvirt zone.\n\n ${result}= Run Process\n ... avahi-resolve-host-name ${HOSTNAME}\n ... shell=True\n ... timeout=15s\n Should Be Equal As Integers 0 ${result.rc}\n Log Many ${result.stdout} ${result.stderr}\n @{words}= Split String ${result.stdout}\n Must Be Ipv6 ${words}[1]\n\nRestart Router\n [Documentation] Restart the router and wait for readiness again. The router is sensitive to apiserver\n ... downtime and might need a restart (after the apiserver is ready) to resync all the routes.\n Run With Kubeconfig oc rollout restart deployment router-default -n openshift-ingress\n Named Deployment Should Be Available router-default openshift-ingress 5m\n\nAll Services Are Ipv6\n [Documentation] Retrieve all services and check none of them have an IPv4 family\n ${response}= Run With Kubeconfig oc get svc -A -o jsonpath='{.items[*].spec.ipFamilies[*]}'\n Should Not Contain ${response} IPv4\n","name":"\/tmp\/repos\/microshift\/test\/suites\/ipv6\/singlestack.robot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/ipv6\/singlestack.robot","element_type":"test","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Verify Router Serves IPv6\n [Documentation] Verify router is capable of serving ipv6 traffic.\n [Setup] Run Keywords\n ... Create Hello MicroShift Pod\n ... Expose Hello MicroShift Service Via Route\n ... Restart Router\n\n Must Be Ipv6 ${USHIFT_HOST}\n Wait Until Keyword Succeeds 10x 6s\n ... Access Hello Microshift Success ushift_port=${HTTP_PORT} hostname=${HOSTNAME}\n\n DNS Entry For Route Should Resolve\n\n [Teardown] Run Keywords\n ... Delete Hello MicroShift Route\n ... Delete Hello MicroShift Pod And Service\n ... Wait For Service Deletion With Timeout","name":"Verify Router Serves IPv6","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/ipv6\/singlestack.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'USHIFT_HOST': {'text': '${USHIFT_HOST} ${EMPTY}'}, 'HOSTNAME': {'text': '${HOSTNAME} hello-microshift.ipv6.cluster.local'}}","documentation":""} {"code":"Verify All Services Are Ipv6\n [Documentation] Check all services are running IPv6 only\n\n All Services Are Ipv6","name":"Verify All Services Are Ipv6","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/ipv6\/singlestack.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Setup\n [Documentation] Test suite setup\n Login MicroShift Host\n Setup Suite With Namespace\n Wait Until Greenboot Health Check Exited","name":"Setup","imports_file_locations":"{'..\/..\/resources\/common.resource': 'test\/resources\/common.resource', '..\/..\/resources\/ostree-health.resource': 'test\/resources\/ostree-health.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/ipv6\/singlestack.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Login MicroShift Host"} {"code":"Teardown\n [Documentation] Test suite teardown\n Logout MicroShift Host","name":"Teardown","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/ipv6\/singlestack.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Logout MicroShift Host"} {"code":"Delete Hello MicroShift Route\n [Documentation] Delete route for cleanup.\n Oc Delete route\/hello-microshift -n ${NAMESPACE}","name":"Delete Hello MicroShift Route","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/ipv6\/singlestack.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Oc Delete route\/hello-microshift -n ${NAMESPACE}"} {"code":"Wait For Service Deletion With Timeout\n [Documentation] Polls for service and endpoint by \"app=hello-microshift\" label. Fails if timeout\n ... expires. This check is unique to this test suite because each test here reuses the same namespace. Since\n ... the tests reuse the service name, a small race window exists between the teardown of one test and the setup\n ... of the next. This produces flakey failures when the service or endpoint names collide.\n Wait Until Keyword Succeeds 30s 1s\n ... Network APIs With Test Label Are Gone","name":"Wait For Service Deletion With Timeout","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/ipv6\/singlestack.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"the tests reuse the service name, a small race window exists between the teardown of one test and the setup\n ... of the next. This produces flakey failures when the service or endpoint names collide."} {"code":"Expose Hello MicroShift Service Via Route\n [Documentation] Expose the \"hello microshift\" application through the Route\n Oc Expose pod hello-microshift -n ${NAMESPACE}\n Oc Expose svc hello-microshift --hostname ${HOSTNAME} -n ${NAMESPACE}","name":"Expose Hello MicroShift Service Via Route","imports_file_locations":"{'..\/..\/resources\/oc.resource': 'test\/resources\/oc.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/ipv6\/singlestack.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'HOSTNAME': {'text': '${HOSTNAME} hello-microshift.ipv6.cluster.local'}}","documentation":"Oc Expose pod hello-microshift -n ${NAMESPACE}"} {"code":"Network APIs With Test Label Are Gone\n [Documentation] Check for service and endpoint by \"app=hello-microshift\" label. Succeeds if response matches\n ... \"No resources found in namespace.\" Fail if not.\n ${match_string}= Catenate No resources found in ${NAMESPACE} namespace.\n ${match_string}= Remove String ${match_string} \"\n ${response}= Run With Kubeconfig oc get svc,ep -l app\\=hello-microshift -n ${NAMESPACE}\n Should Be Equal As Strings ${match_string} ${response} strip_spaces=True","name":"Network APIs With Test Label Are Gone","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/ipv6\/singlestack.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"\"No resources found in namespace.\" Fail if not."} {"code":"DNS Entry For Route Should Resolve\n [Documentation] Resolve hello-microshift route via mDNS from the hypervisor\/RF runner.\n ... Expects RF runner host has opened port 5353 for libvirt zone.\n\n ${result}= Run Process\n ... avahi-resolve-host-name ${HOSTNAME}\n ... shell=True\n ... timeout=15s\n Should Be Equal As Integers 0 ${result.rc}\n Log Many ${result.stdout} ${result.stderr}\n @{words}= Split String ${result.stdout}\n Must Be Ipv6 ${words}[1]","name":"DNS Entry For Route Should Resolve","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/ipv6\/singlestack.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'HOSTNAME': {'text': '${HOSTNAME} hello-microshift.ipv6.cluster.local'}}","documentation":"Expects RF runner host has opened port 5353 for libvirt zone."} {"code":"Restart Router\n [Documentation] Restart the router and wait for readiness again. The router is sensitive to apiserver\n ... downtime and might need a restart (after the apiserver is ready) to resync all the routes.\n Run With Kubeconfig oc rollout restart deployment router-default -n openshift-ingress\n Named Deployment Should Be Available router-default openshift-ingress 5m","name":"Restart Router","imports_file_locations":"{'..\/..\/resources\/oc.resource': 'test\/resources\/oc.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/ipv6\/singlestack.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"downtime and might need a restart (after the apiserver is ready) to resync all the routes."} {"code":"All Services Are Ipv6\n [Documentation] Retrieve all services and check none of them have an IPv4 family\n ${response}= Run With Kubeconfig oc get svc -A -o jsonpath='{.items[*].spec.ipFamilies[*]}'\n Should Not Contain ${response} IPv4","name":"All Services Are Ipv6","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/ipv6\/singlestack.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${response}= Run With Kubeconfig oc get svc -A -o jsonpath='{.items[*].spec.ipFamilies[*]}'"} {"code":"*** Settings ***\nDocumentation Tests for various log messages we do or do not want.\n\nResource ..\/..\/resources\/common.resource\nResource ..\/..\/resources\/microshift-process.resource\nResource ..\/..\/resources\/ostree-health.resource\nLibrary ..\/..\/resources\/journalctl.py\n\nSuite Setup Setup\nSuite Teardown Teardown\n\nTest Tags restart slow\n\n\n*** Variables ***\n${CURSOR} ${EMPTY} # The journal cursor before restarting MicroShift\n\n\n*** Test Cases ***\nCheck Logs After Clean Start\n [Documentation] Start from scratch, wait until initialized,\n ... stop and check for errors.\n\n Cleanup MicroShift --all --keep-images\n ${cursor}= Get Journal Cursor\n Set Suite Variable \\${CURSOR} ${cursor}\n\n Enable MicroShift\n Start MicroShift\n Setup Kubeconfig\n\n Restart Greenboot And Wait For Success\n Stop MicroShift\n\n # Note: The 'forbidden' messages appear on clean startup.\n # Should Not Find Forbidden\n Should Not Find Cannot Patch Resource\n Services Should Not Timeout When Stopping\n Should Find Etcd Is Ready\n Should Find MicroShift Is Ready\n\nCheck Logs After Restart\n [Documentation] Start again, wait until initialized,\n ... stop and check for errors.\n\n ${cursor}= Get Journal Cursor\n Set Suite Variable \\${CURSOR} ${cursor}\n\n Start MicroShift\n Restart Greenboot And Wait For Success\n Stop MicroShift\n\n Should Not Find Forbidden\n Should Not Find Cannot Patch Resource\n Services Should Not Timeout When Stopping\n Should Find Etcd Is Ready\n Should Find MicroShift Is Ready\n\n\n*** Keywords ***\nSetup\n [Documentation] Test suite setup\n Check Required Env Variables\n Login MicroShift Host\n\nTeardown\n [Documentation] Test suite teardown\n Restart MicroShift\n Restart Greenboot And Wait For Success\n\n Logout MicroShift Host\n Remove Kubeconfig\n\nShould Not Find Forbidden\n [Documentation] Logs should not say \"forbidden\"\n Pattern Should Not Appear In Log Output ${CURSOR} forbidden\n\nShould Not Find Cannot Patch Resource\n [Documentation] Logs should not say \"cannot patch resource\"\n Pattern Should Not Appear In Log Output ${CURSOR} cannot patch resource\n\nServices Should Not Timeout When Stopping\n [Documentation] Logs should not say \"Timed out waiting for services to stop\"\n Pattern Should Not Appear In Log Output ${CURSOR} MICROSHIFT STOP TIMED OUT\n\nShould Find Etcd Is Ready\n [Documentation] Logs should say \"etcd is ready\"\n Pattern Should Appear In Log Output ${CURSOR} etcd is ready\n\nShould Find MicroShift Is Ready\n [Documentation] Logs should say \"MICROSHIFT READY\"\n Pattern Should Appear In Log Output ${CURSOR} MICROSHIFT READY\n","name":"\/tmp\/repos\/microshift\/test\/suites\/logscan\/log-scan.robot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/logscan\/log-scan.robot","element_type":"test","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Check Logs After Clean Start\n [Documentation] Start from scratch, wait until initialized,\n ... stop and check for errors.\n\n Cleanup MicroShift --all --keep-images\n ${cursor}= Get Journal Cursor\n Set Suite Variable \\${CURSOR} ${cursor}\n\n Enable MicroShift\n Start MicroShift\n Setup Kubeconfig\n\n Restart Greenboot And Wait For Success\n Stop MicroShift\n\n # Note: The 'forbidden' messages appear on clean startup.\n # Should Not Find Forbidden\n Should Not Find Cannot Patch Resource\n Services Should Not Timeout When Stopping\n Should Find Etcd Is Ready\n Should Find MicroShift Is Ready","name":"Check Logs After Clean Start","imports_file_locations":"{'..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource', '..\/..\/resources\/ostree-health.resource': 'test\/resources\/ostree-health.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/logscan\/log-scan.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'CURSOR': {'text': '${CURSOR} ${EMPTY} # The journal cursor before restarting MicroShift'}}","documentation":""} {"code":"Check Logs After Restart\n [Documentation] Start again, wait until initialized,\n ... stop and check for errors.\n\n ${cursor}= Get Journal Cursor\n Set Suite Variable \\${CURSOR} ${cursor}\n\n Start MicroShift\n Restart Greenboot And Wait For Success\n Stop MicroShift\n\n Should Not Find Forbidden\n Should Not Find Cannot Patch Resource\n Services Should Not Timeout When Stopping\n Should Find Etcd Is Ready\n Should Find MicroShift Is Ready","name":"Check Logs After Restart","imports_file_locations":"{'..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource', '..\/..\/resources\/ostree-health.resource': 'test\/resources\/ostree-health.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/logscan\/log-scan.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'CURSOR': {'text': '${CURSOR} ${EMPTY} # The journal cursor before restarting MicroShift'}}","documentation":""} {"code":"Setup\n [Documentation] Test suite setup\n Check Required Env Variables\n Login MicroShift Host","name":"Setup","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/logscan\/log-scan.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Check Required Env Variables"} {"code":"Teardown\n [Documentation] Test suite teardown\n Restart MicroShift\n Restart Greenboot And Wait For Success\n\n Logout MicroShift Host\n Remove Kubeconfig","name":"Teardown","imports_file_locations":"{'..\/..\/resources\/ostree-health.resource': 'test\/resources\/ostree-health.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/logscan\/log-scan.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Restart MicroShift"} {"code":"Should Not Find Forbidden\n [Documentation] Logs should not say \"forbidden\"\n Pattern Should Not Appear In Log Output ${CURSOR} forbidden","name":"Should Not Find Forbidden","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/logscan\/log-scan.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'CURSOR': {'text': '${CURSOR} ${EMPTY} # The journal cursor before restarting MicroShift'}}","documentation":"Pattern Should Not Appear In Log Output ${CURSOR} forbidden"} {"code":"Should Not Find Cannot Patch Resource\n [Documentation] Logs should not say \"cannot patch resource\"\n Pattern Should Not Appear In Log Output ${CURSOR} cannot patch resource","name":"Should Not Find Cannot Patch Resource","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/logscan\/log-scan.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'CURSOR': {'text': '${CURSOR} ${EMPTY} # The journal cursor before restarting MicroShift'}}","documentation":"Pattern Should Not Appear In Log Output ${CURSOR} cannot patch resource"} {"code":"Services Should Not Timeout When Stopping\n [Documentation] Logs should not say \"Timed out waiting for services to stop\"\n Pattern Should Not Appear In Log Output ${CURSOR} MICROSHIFT STOP TIMED OUT","name":"Services Should Not Timeout When Stopping","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/logscan\/log-scan.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'CURSOR': {'text': '${CURSOR} ${EMPTY} # The journal cursor before restarting MicroShift'}}","documentation":"Pattern Should Not Appear In Log Output ${CURSOR} MICROSHIFT STOP TIMED OUT"} {"code":"Should Find Etcd Is Ready\n [Documentation] Logs should say \"etcd is ready\"\n Pattern Should Appear In Log Output ${CURSOR} etcd is ready","name":"Should Find Etcd Is Ready","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/logscan\/log-scan.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'CURSOR': {'text': '${CURSOR} ${EMPTY} # The journal cursor before restarting MicroShift'}}","documentation":"Pattern Should Appear In Log Output ${CURSOR} etcd is ready"} {"code":"Should Find MicroShift Is Ready\n [Documentation] Logs should say \"MICROSHIFT READY\"\n Pattern Should Appear In Log Output ${CURSOR} MICROSHIFT READY","name":"Should Find MicroShift Is Ready","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/logscan\/log-scan.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'CURSOR': {'text': '${CURSOR} ${EMPTY} # The journal cursor before restarting MicroShift'}}","documentation":"Pattern Should Appear In Log Output ${CURSOR} MICROSHIFT READY"} {"code":"*** Settings ***\nDocumentation Tests related to MicroShift running in an isolated network\n\nResource ..\/..\/resources\/ostree-health.resource\nResource ..\/..\/resources\/microshift-process.resource\nResource ..\/..\/resources\/microshift-host.resource\nLibrary Collections\n\nSuite Setup Setup\nSuite Teardown Teardown\n\nTest Tags network\n\n\n*** Variables ***\n${USHIFT_HOST} ${EMPTY}\n${LB_CONFIG} assets\/network\/isolated-lb-service.yaml\n${LB_NSPACE} openshift-ingress\n${LB_SRVNAME} isolated-lb-service\n${LB_PORTNUM} 31111\n\n\n*** Test Cases ***\nVerify Load Balancer Services Are Running Correctly In Isolated Network\n [Documentation] Verifies that isolated network does not negatively\n ... impact Load Balancer Services.\n\n Setup Kubeconfig\n Create Load Balancer\n Wait Until Keyword Succeeds 1m 5s\n ... Check Load Balancer Service Access\n\n [Teardown] Run Keywords\n ... Delete Load Balancer\n\nVerify MicroShift Is Healthy In Isolated Network After Clean And Reboot\n [Documentation] Makes sure that MicroShift running in an isolated network\n ... remains healthy after clean and reboot.\n\n Cleanup MicroShift\n Enable MicroShift\n Reboot MicroShift Host\n\n Verify No Internet Access\n Verify No Registry Access\n Wait Until Greenboot Health Check Exited\n\n\n*** Keywords ***\nSetup\n [Documentation] Test suite setup\n Check Required Env Variables\n Login MicroShift Host\n\n Verify No Internet Access\n Verify No Registry Access\n Wait Until Greenboot Health Check Exited\n\nTeardown\n [Documentation] Test suite teardown\n Logout MicroShift Host\n\nVerify No Internet Access\n [Documentation] Verifies that Internet is not accessible\n ${rc}= Execute Command\n ... curl -I redhat.com quay.io registry.redhat.io\n ... return_stdout=False return_stderr=False return_rc=True\n Should Not Be Equal As Integers ${rc} 0\n\nVerify No Registry Access\n [Documentation] Verifies that container registry is not accessible\n ... also taking into account possible mirror registry presence.\n\n # Get a digest reference for a local image from quay.io.\n # It must exist because images are preloaded in isolated configurations.\n ${imageref} ${stderr} ${rc}= Execute Command\n ... sudo podman images --format \"{{.Repository}}\\@{{.Digest}}\" | grep ^quay.io\/ | head -1\n ... return_stdout=True return_stderr=True return_rc=True\n Should Be Equal As Integers ${rc} 0\n Should Not Be Empty ${imageref}\n\n # Try to copy the image to a local storage and make sure the operation fails.\n # Note that it is important to try accessing the image by digest because the\n # mirror registry may be configured with 'mirror-by-digest-only=true' option.\n ${stdout} ${stderr} ${rc}= Execute Command\n ... skopeo copy docker:\/\/${imageref} containers-storage:copy-should-fail\n ... return_stdout=True return_stderr=True return_rc=True\n Should Not Be Equal As Integers ${rc} 0\n\nCreate Load Balancer\n [Documentation] Creates a load balancer service backed by router pods.\n Run With Kubeconfig oc create -f ${LB_CONFIG} -n ${LB_NSPACE}\n\nCheck Load Balancer Service Access\n [Documentation] Checks if a load balancer service can be accessed.\n ${rc}= Run And Return RC curl -I ${USHIFT_HOST}:${LB_PORTNUM}\n Should Be Equal As Integers ${rc} 0\n\nDelete Load Balancer\n [Documentation] Deletes a load balancer service backed by router pods.\n Run With Kubeconfig oc delete svc\/${LB_SRVNAME} -n ${LB_NSPACE}\n","name":"\/tmp\/repos\/microshift\/test\/suites\/network\/isolated-network.robot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/network\/isolated-network.robot","element_type":"test","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Verify Load Balancer Services Are Running Correctly In Isolated Network\n [Documentation] Verifies that isolated network does not negatively\n ... impact Load Balancer Services.\n\n Setup Kubeconfig\n Create Load Balancer\n Wait Until Keyword Succeeds 1m 5s\n ... Check Load Balancer Service Access\n\n [Teardown] Run Keywords\n ... Delete Load Balancer","name":"Verify Load Balancer Services Are Running Correctly In Isolated Network","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/network\/isolated-network.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Verify MicroShift Is Healthy In Isolated Network After Clean And Reboot\n [Documentation] Makes sure that MicroShift running in an isolated network\n ... remains healthy after clean and reboot.\n\n Cleanup MicroShift\n Enable MicroShift\n Reboot MicroShift Host\n\n Verify No Internet Access\n Verify No Registry Access\n Wait Until Greenboot Health Check Exited","name":"Verify MicroShift Is Healthy In Isolated Network After Clean And Reboot","imports_file_locations":"{'..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource', '..\/..\/resources\/ostree-health.resource': 'test\/resources\/ostree-health.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/network\/isolated-network.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Setup\n [Documentation] Test suite setup\n Check Required Env Variables\n Login MicroShift Host\n\n Verify No Internet Access\n Verify No Registry Access\n Wait Until Greenboot Health Check Exited","name":"Setup","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource', '..\/..\/resources\/ostree-health.resource': 'test\/resources\/ostree-health.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/network\/isolated-network.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Check Required Env Variables"} {"code":"Teardown\n [Documentation] Test suite teardown\n Logout MicroShift Host","name":"Teardown","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/network\/isolated-network.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Logout MicroShift Host"} {"code":"Verify No Internet Access\n [Documentation] Verifies that Internet is not accessible\n ${rc}= Execute Command\n ... curl -I redhat.com quay.io registry.redhat.io\n ... return_stdout=False return_stderr=False return_rc=True\n Should Not Be Equal As Integers ${rc} 0","name":"Verify No Internet Access","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/network\/isolated-network.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${rc}= Execute Command\n ... curl -I redhat.com quay.io registry.redhat.io\n ... return_stdout=False return_stderr=False return_rc=True"} {"code":"Verify No Registry Access\n [Documentation] Verifies that container registry is not accessible\n ... also taking into account possible mirror registry presence.\n\n # Get a digest reference for a local image from quay.io.\n # It must exist because images are preloaded in isolated configurations.\n ${imageref} ${stderr} ${rc}= Execute Command\n ... sudo podman images --format \"{{.Repository}}\\@{{.Digest}}\" | grep ^quay.io\/ | head -1\n ... return_stdout=True return_stderr=True return_rc=True\n Should Be Equal As Integers ${rc} 0\n Should Not Be Empty ${imageref}\n\n # Try to copy the image to a local storage and make sure the operation fails.\n # Note that it is important to try accessing the image by digest because the\n # mirror registry may be configured with 'mirror-by-digest-only=true' option.\n ${stdout} ${stderr} ${rc}= Execute Command\n ... skopeo copy docker:\/\/${imageref} containers-storage:copy-should-fail\n ... return_stdout=True return_stderr=True return_rc=True\n Should Not Be Equal As Integers ${rc} 0","name":"Verify No Registry Access","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/network\/isolated-network.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"also taking into account possible mirror registry presence."} {"code":"Create Load Balancer\n [Documentation] Creates a load balancer service backed by router pods.\n Run With Kubeconfig oc create -f ${LB_CONFIG} -n ${LB_NSPACE}","name":"Create Load Balancer","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/network\/isolated-network.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'LB_CONFIG': {'text': '${LB_CONFIG} assets\/network\/isolated-lb-service.yaml'}, 'LB_NSPACE': {'text': '${LB_NSPACE} openshift-ingress'}}","documentation":"Run With Kubeconfig oc create -f ${LB_CONFIG} -n ${LB_NSPACE}"} {"code":"Check Load Balancer Service Access\n [Documentation] Checks if a load balancer service can be accessed.\n ${rc}= Run And Return RC curl -I ${USHIFT_HOST}:${LB_PORTNUM}\n Should Be Equal As Integers ${rc} 0","name":"Check Load Balancer Service Access","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/network\/isolated-network.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'USHIFT_HOST': {'text': '${USHIFT_HOST} ${EMPTY}'}, 'LB_PORTNUM': {'text': '${LB_PORTNUM} 31111'}}","documentation":"${rc}= Run And Return RC curl -I ${USHIFT_HOST}:${LB_PORTNUM}"} {"code":"Delete Load Balancer\n [Documentation] Deletes a load balancer service backed by router pods.\n Run With Kubeconfig oc delete svc\/${LB_SRVNAME} -n ${LB_NSPACE}","name":"Delete Load Balancer","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/network\/isolated-network.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'LB_SRVNAME': {'text': '${LB_SRVNAME} isolated-lb-service'}, 'LB_NSPACE': {'text': '${LB_NSPACE} openshift-ingress'}}","documentation":"Run With Kubeconfig oc delete svc\/${LB_SRVNAME} -n ${LB_NSPACE}"} {"code":"*** Settings ***\nDocumentation Tests related to MicroShift running in a multiple NIC environment\n\nResource ..\/..\/resources\/ostree-health.resource\nResource ..\/..\/resources\/microshift-config.resource\nResource ..\/..\/resources\/microshift-process.resource\nResource ..\/..\/resources\/microshift-host.resource\nResource ..\/..\/resources\/microshift-network.resource\nResource ..\/..\/resources\/kubeconfig.resource\nLibrary Collections\n\nSuite Setup Setup\nSuite Teardown Teardown\n\nTest Tags network\n\n\n*** Variables ***\n${USHIFT_HOST_IP1} ${EMPTY}\n${USHIFT_HOST_IP2} ${EMPTY}\n${NIC1_NAME} ${EMPTY}\n${NIC2_NAME} ${EMPTY}\n${NICS_COUNT} 2\n${NMCLI_CMD} nmcli -f name,type connection | awk '$NF == \"ethernet\" { $NF=\"\"; print $0 }'\n${OSSL_CMD} openssl x509 -text -noout -in\n${CERT_FILE} \/var\/lib\/microshift\/certs\/kube-apiserver-external-signer\/kube-external-serving\/server.crt\n${GREP_SUBJ_IPS} grep -A1 'Subject Alternative Name:' | tail -1\n\n\n*** Test Cases ***\nVerify MicroShift Runs On Both NICs\n [Documentation] Verify MicroShift can run in the default configuration\n\n Configure Subject Alternative Name ${USHIFT_HOST_IP1} ${USHIFT_HOST_IP2}\n Restart MicroShift\n Restart Greenboot And Wait For Success\n\n Verify Hello MicroShift LB\n Verify Hello MicroShift NodePort ${USHIFT_HOST_IP1}\n Verify Hello MicroShift NodePort ${USHIFT_HOST_IP2}\n IP Should Be Present In External Certificate ${USHIFT_HOST_IP1}\n IP Should Be Present In External Certificate ${USHIFT_HOST_IP2}\n\nVerify MicroShift Runs Only On Primary NIC\n [Documentation] Verify MicroShift can run only on the primary NIC. The\n ... node IP will be taken from this NIC by default. When disabling the\n ... secondary NIC nothing will happen in MicroShift, as the IP did not\n ... change. A restart is forced so that MicroShift picks up the new\n ... configuration (without the secondary IP) and regenerates the\n ... certificates, which will be lacking the IP from secondary NIC.\n\n Configure Subject Alternative Name ${USHIFT_HOST_IP1}\n\n Login Switch To IP ${USHIFT_HOST_IP1}\n Disable Interface ${NIC2_NAME}\n\n Restart MicroShift\n Restart Greenboot And Wait For Success\n\n Verify MicroShift On Single NIC ${USHIFT_HOST_IP1} ${USHIFT_HOST_IP2}\n\n [Teardown] Restore Network Configuration By Rebooting Host\n\nVerify MicroShift Runs Only On Secondary NIC\n [Documentation] Verify MicroShift can run only on the secondary NIC. The\n ... node IP will change when disabling the primary interface, triggering\n ... an automatic restart of the service. After restarting, the node IP will\n ... be that of the secondary NIC, and certificates will be updated according\n ... to the new configuration (which includes only the secondary IP).\n\n Configure Subject Alternative Name ${USHIFT_HOST_IP2}\n\n ${cur_pid}= MicroShift Process ID\n\n Login Switch To IP ${USHIFT_HOST_IP2}\n Disable Interface ${NIC1_NAME}\n\n Wait Until MicroShift Process ID Changes ${cur_pid}\n Wait For MicroShift Service\n Setup Kubeconfig\n Wait For MicroShift\n\n Verify MicroShift On Single NIC ${USHIFT_HOST_IP2} ${USHIFT_HOST_IP1}\n\n [Teardown] Restore Network Configuration By Rebooting Host\n\n\n*** Keywords ***\nSetup\n [Documentation] Test suite setup\n Login MicroShift Host\n Initialize Global Variables\n Setup Suite With Namespace\n Verify Multiple NICs\n Wait Until Greenboot Health Check Exited\n\nTeardown\n [Documentation] Test suite teardown\n Logout MicroShift Host\n\nVerify Multiple NICs\n [Documentation] Verifies that the host has two Ethernet network interfaces\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... ${NMCLI_CMD} | wc -l\n ... return_stdout=True return_stderr=True return_rc=True\n Should Be Equal As Integers ${rc} 0\n Should Be True '${stdout}'>='${NICS_COUNT}'\n\nInitialize Global Variables\n [Documentation] Initializes global variables.\n\n Log Host: ${USHIFT_HOST_IP1} ${USHIFT_HOST_IP2}\n Should Not Be Empty ${USHIFT_HOST_IP1} USHIFT_HOST_IP1 variable is required\n Should Not Be Empty ${USHIFT_HOST_IP2} USHIFT_HOST_IP2 variable is required\n Initialize Nmcli Variables\n\nInitialize Nmcli Variables\n [Documentation] Initialize the variables on the host\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... ${NMCLI_CMD} | sed -n 1p | xargs\n ... return_stdout=True return_stderr=True return_rc=True\n Should Be Equal As Integers ${rc} 0\n Set Suite Variable \\${NIC1_NAME} ${stdout}\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... ${NMCLI_CMD} | sed -n 2p | xargs\n ... return_stdout=True return_stderr=True return_rc=True\n Should Be Equal As Integers ${rc} 0\n Set Suite Variable \\${NIC2_NAME} ${stdout}\n\nDisable Interface\n [Documentation] Disable NIC given in ${conn_name}. Change is not persistent. On\n ... the next reboot the interface will have its original status again.\n [Arguments] ${conn_name}\n ${stderr} ${rc}= Execute Command\n ... nmcli connection down \"${conn_name}\"\n ... sudo=True return_stdout=False return_stderr=True return_rc=True\n Should Be Equal As Integers ${rc} 0\n\nLogin Switch To IP\n [Documentation] Switch to using the specified IP for SSH connections\n [Arguments] ${new_ip}\n\n IF '${USHIFT_HOST}'!='${new_ip}'\n Logout MicroShift Host\n Set Global Variable \\${USHIFT_HOST} ${new_ip}\n Login MicroShift Host\n END\n\nVerify Hello MicroShift NodePort\n [Documentation] Run Hello MicroShift NodePort verification\n [Arguments] ${ip}\n Create Hello MicroShift Pod\n Expose Hello MicroShift Pod Via NodePort\n\n Wait Until Keyword Succeeds 30x 10s\n ... Access Hello Microshift Success ${NP_PORT} ${ip}\n\n [Teardown] Run Keywords\n ... Delete Hello MicroShift Pod And Service\n\nVerify MicroShift On Single NIC\n [Documentation] Generic procedure to verify MicroShift network\n ... functionality while one of the network interfaces is down.\n [Arguments] ${login_ip} ${removed_ip}\n\n Verify Hello MicroShift LB\n Verify Hello MicroShift NodePort ${login_ip}\n IP Should Be Present In External Certificate ${login_ip}\n IP Should Not Be Present In External Certificate ${removed_ip}\n\nConfigure Subject Alternative Name\n [Documentation] Replace subjectAltNames entries in the configuration\n ... to include the IPs provided\n [Arguments] @{ips}\n\n ${ips_len}= Get Length ${ips}\n Should Be True '${ips_len}'>'0'\n\n ${subject_alt_names}= CATENATE SEPARATOR=\\n\n ... ---\n ... apiServer:\n ... \\ \\ subjectAltNames:\n\n FOR ${ip} IN @{ips}\n ${subject_alt_names}= CATENATE SEPARATOR=\\n\n ... ${subject_alt_names}\n ... \\ \\ - ${ip}\n END\n\n Drop In MicroShift Config ${subject_alt_names} 10-subjectAltNames\n\nCheck IP Certificate\n [Documentation] Checks whether the ${ip} is present in the subject\n ... alternative names in ${CERT_FILE}.\n [Arguments] ${ip} ${grep_opt}\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... ${OSSL_CMD} ${CERT_FILE} | ${GREP_SUBJ_IPS} | grep -w ${grep_opt} 'DNS:${ip}'\n ... sudo=True return_stdout=True return_stderr=True return_rc=True\n Should Be Equal As Integers ${rc} 0\n\nIP Should Be Present In External Certificate\n [Documentation] Check the specified IP presence in the external\n ... certificate file\n [Arguments] ${ip}\n\n Check IP Certificate ${ip} ${EMPTY}\n\nIP Should Not Be Present In External Certificate\n [Documentation] Check the specified IP absence in the external\n ... certificate file\n [Arguments] ${ip}\n\n Check IP Certificate ${ip} '--invert-match'\n\nRestore Network Configuration By Rebooting Host\n [Documentation] Restores network interface initial configuration\n ... by rebooting the host.\n Remove Drop In MicroShift Config 10-subjectAltNames\n Reboot MicroShift Host\n Login Switch To IP ${USHIFT_HOST_IP1}\n Wait Until Greenboot Health Check Exited\n","name":"\/tmp\/repos\/microshift\/test\/suites\/network\/multi-nic.robot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/network\/multi-nic.robot","element_type":"test","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Verify MicroShift Runs On Both NICs\n [Documentation] Verify MicroShift can run in the default configuration\n\n Configure Subject Alternative Name ${USHIFT_HOST_IP1} ${USHIFT_HOST_IP2}\n Restart MicroShift\n Restart Greenboot And Wait For Success\n\n Verify Hello MicroShift LB\n Verify Hello MicroShift NodePort ${USHIFT_HOST_IP1}\n Verify Hello MicroShift NodePort ${USHIFT_HOST_IP2}\n IP Should Be Present In External Certificate ${USHIFT_HOST_IP1}\n IP Should Be Present In External Certificate ${USHIFT_HOST_IP2}","name":"Verify MicroShift Runs On Both NICs","imports_file_locations":"{'..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource', '..\/..\/resources\/ostree-health.resource': 'test\/resources\/ostree-health.resource', '..\/..\/resources\/microshift-network.resource': 'test\/resources\/microshift-network.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/network\/multi-nic.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'USHIFT_HOST_IP1': {'text': '${USHIFT_HOST_IP1} ${EMPTY}'}, 'USHIFT_HOST_IP2': {'text': '${USHIFT_HOST_IP2} ${EMPTY}'}}","documentation":""} {"code":"Verify MicroShift Runs Only On Primary NIC\n [Documentation] Verify MicroShift can run only on the primary NIC. The\n ... node IP will be taken from this NIC by default. When disabling the\n ... secondary NIC nothing will happen in MicroShift, as the IP did not\n ... change. A restart is forced so that MicroShift picks up the new\n ... configuration (without the secondary IP) and regenerates the\n ... certificates, which will be lacking the IP from secondary NIC.\n\n Configure Subject Alternative Name ${USHIFT_HOST_IP1}\n\n Login Switch To IP ${USHIFT_HOST_IP1}\n Disable Interface ${NIC2_NAME}\n\n Restart MicroShift\n Restart Greenboot And Wait For Success\n\n Verify MicroShift On Single NIC ${USHIFT_HOST_IP1} ${USHIFT_HOST_IP2}\n\n [Teardown] Restore Network Configuration By Rebooting Host","name":"Verify MicroShift Runs Only On Primary NIC","imports_file_locations":"{'..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource', '..\/..\/resources\/ostree-health.resource': 'test\/resources\/ostree-health.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/network\/multi-nic.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'USHIFT_HOST_IP1': {'text': '${USHIFT_HOST_IP1} ${EMPTY}'}, 'NIC2_NAME': {'text': '${NIC2_NAME} ${EMPTY}'}, 'USHIFT_HOST_IP2': {'text': '${USHIFT_HOST_IP2} ${EMPTY}'}}","documentation":""} {"code":"Verify MicroShift Runs Only On Secondary NIC\n [Documentation] Verify MicroShift can run only on the secondary NIC. The\n ... node IP will change when disabling the primary interface, triggering\n ... an automatic restart of the service. After restarting, the node IP will\n ... be that of the secondary NIC, and certificates will be updated according\n ... to the new configuration (which includes only the secondary IP).\n\n Configure Subject Alternative Name ${USHIFT_HOST_IP2}\n\n ${cur_pid}= MicroShift Process ID\n\n Login Switch To IP ${USHIFT_HOST_IP2}\n Disable Interface ${NIC1_NAME}\n\n Wait Until MicroShift Process ID Changes ${cur_pid}\n Wait For MicroShift Service\n Setup Kubeconfig\n Wait For MicroShift\n\n Verify MicroShift On Single NIC ${USHIFT_HOST_IP2} ${USHIFT_HOST_IP1}\n\n [Teardown] Restore Network Configuration By Rebooting Host","name":"Verify MicroShift Runs Only On Secondary NIC","imports_file_locations":"{'..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource', '..\/..\/resources\/kubeconfig.resource': 'test\/resources\/kubeconfig.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/network\/multi-nic.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'USHIFT_HOST_IP2': {'text': '${USHIFT_HOST_IP2} ${EMPTY}'}, 'NIC1_NAME': {'text': '${NIC1_NAME} ${EMPTY}'}, 'USHIFT_HOST_IP1': {'text': '${USHIFT_HOST_IP1} ${EMPTY}'}}","documentation":""} {"code":"Setup\n [Documentation] Test suite setup\n Login MicroShift Host\n Initialize Global Variables\n Setup Suite With Namespace\n Verify Multiple NICs\n Wait Until Greenboot Health Check Exited","name":"Setup","imports_file_locations":"{'..\/..\/resources\/ostree-health.resource': 'test\/resources\/ostree-health.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/network\/multi-nic.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Login MicroShift Host"} {"code":"Teardown\n [Documentation] Test suite teardown\n Logout MicroShift Host","name":"Teardown","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/network\/multi-nic.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Logout MicroShift Host"} {"code":"Verify Multiple NICs\n [Documentation] Verifies that the host has two Ethernet network interfaces\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... ${NMCLI_CMD} | wc -l\n ... return_stdout=True return_stderr=True return_rc=True\n Should Be Equal As Integers ${rc} 0\n Should Be True '${stdout}'>='${NICS_COUNT}'","name":"Verify Multiple NICs","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/network\/multi-nic.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'NMCLI_CMD': {'text': '${NMCLI_CMD} nmcli -f name,type connection | awk \\'$NF == \"ethernet\" { $NF=\"\"; print $0 }\\''}, 'NICS_COUNT': {'text': '${NICS_COUNT} 2'}}","documentation":"${stdout} ${stderr} ${rc}= Execute Command\n ... ${NMCLI_CMD} | wc -l\n ... return_stdout=True return_stderr=True return_rc=True"} {"code":"Initialize Global Variables\n [Documentation] Initializes global variables.\n\n Log Host: ${USHIFT_HOST_IP1} ${USHIFT_HOST_IP2}\n Should Not Be Empty ${USHIFT_HOST_IP1} USHIFT_HOST_IP1 variable is required\n Should Not Be Empty ${USHIFT_HOST_IP2} USHIFT_HOST_IP2 variable is required\n Initialize Nmcli Variables","name":"Initialize Global Variables","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/network\/multi-nic.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'USHIFT_HOST_IP1': {'text': '${USHIFT_HOST_IP1} ${EMPTY}'}, 'USHIFT_HOST_IP2': {'text': '${USHIFT_HOST_IP2} ${EMPTY}'}}","documentation":"Log Host: ${USHIFT_HOST_IP1} ${USHIFT_HOST_IP2}"} {"code":"Initialize Nmcli Variables\n [Documentation] Initialize the variables on the host\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... ${NMCLI_CMD} | sed -n 1p | xargs\n ... return_stdout=True return_stderr=True return_rc=True\n Should Be Equal As Integers ${rc} 0\n Set Suite Variable \\${NIC1_NAME} ${stdout}\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... ${NMCLI_CMD} | sed -n 2p | xargs\n ... return_stdout=True return_stderr=True return_rc=True\n Should Be Equal As Integers ${rc} 0\n Set Suite Variable \\${NIC2_NAME} ${stdout}","name":"Initialize Nmcli Variables","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/network\/multi-nic.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'NMCLI_CMD': {'text': '${NMCLI_CMD} nmcli -f name,type connection | awk \\'$NF == \"ethernet\" { $NF=\"\"; print $0 }\\''}, 'NIC1_NAME': {'text': '${NIC1_NAME} ${EMPTY}'}, 'NIC2_NAME': {'text': '${NIC2_NAME} ${EMPTY}'}}","documentation":"${stdout} ${stderr} ${rc}= Execute Command\n ... ${NMCLI_CMD} | sed -n 1p | xargs\n ... return_stdout=True return_stderr=True return_rc=True"} {"code":"Disable Interface\n [Documentation] Disable NIC given in ${conn_name}. Change is not persistent. On\n ... the next reboot the interface will have its original status again.\n [Arguments] ${conn_name}\n ${stderr} ${rc}= Execute Command\n ... nmcli connection down \"${conn_name}\"\n ... sudo=True return_stdout=False return_stderr=True return_rc=True\n Should Be Equal As Integers ${rc} 0","name":"Disable Interface","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/network\/multi-nic.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"the next reboot the interface will have its original status again."} {"code":"Login Switch To IP\n [Documentation] Switch to using the specified IP for SSH connections\n [Arguments] ${new_ip}\n\n IF '${USHIFT_HOST}'!='${new_ip}'\n Logout MicroShift Host\n Set Global Variable \\${USHIFT_HOST} ${new_ip}\n Login MicroShift Host\n END","name":"Login Switch To IP","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/network\/multi-nic.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${new_ip}"} {"code":"Verify Hello MicroShift NodePort\n [Documentation] Run Hello MicroShift NodePort verification\n [Arguments] ${ip}\n Create Hello MicroShift Pod\n Expose Hello MicroShift Pod Via NodePort\n\n Wait Until Keyword Succeeds 30x 10s\n ... Access Hello Microshift Success ${NP_PORT} ${ip}\n\n [Teardown] Run Keywords\n ... Delete Hello MicroShift Pod And Service","name":"Verify Hello MicroShift NodePort","imports_file_locations":"{'..\/..\/resources\/microshift-network.resource': 'test\/resources\/microshift-network.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/network\/multi-nic.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${ip}"} {"code":"Verify MicroShift On Single NIC\n [Documentation] Generic procedure to verify MicroShift network\n ... functionality while one of the network interfaces is down.\n [Arguments] ${login_ip} ${removed_ip}\n\n Verify Hello MicroShift LB\n Verify Hello MicroShift NodePort ${login_ip}\n IP Should Be Present In External Certificate ${login_ip}\n IP Should Not Be Present In External Certificate ${removed_ip}","name":"Verify MicroShift On Single NIC","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/network\/multi-nic.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"functionality while one of the network interfaces is down."} {"code":"Configure Subject Alternative Name\n [Documentation] Replace subjectAltNames entries in the configuration\n ... to include the IPs provided\n [Arguments] @{ips}\n\n ${ips_len}= Get Length ${ips}\n Should Be True '${ips_len}'>'0'\n\n ${subject_alt_names}= CATENATE SEPARATOR=\\n\n ... ---\n ... apiServer:\n ... \\ \\ subjectAltNames:\n\n FOR ${ip} IN @{ips}\n ${subject_alt_names}= CATENATE SEPARATOR=\\n\n ... ${subject_alt_names}\n ... \\ \\ - ${ip}\n END\n\n Drop In MicroShift Config ${subject_alt_names} 10-subjectAltNames","name":"Configure Subject Alternative Name","imports_file_locations":"{'..\/..\/resources\/microshift-config.resource': 'test\/resources\/microshift-config.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/network\/multi-nic.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] @{ips}"} {"code":"Check IP Certificate\n [Documentation] Checks whether the ${ip} is present in the subject\n ... alternative names in ${CERT_FILE}.\n [Arguments] ${ip} ${grep_opt}\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... ${OSSL_CMD} ${CERT_FILE} | ${GREP_SUBJ_IPS} | grep -w ${grep_opt} 'DNS:${ip}'\n ... sudo=True return_stdout=True return_stderr=True return_rc=True\n Should Be Equal As Integers ${rc} 0","name":"Check IP Certificate","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/network\/multi-nic.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'CERT_FILE': {'text': '${CERT_FILE} \/var\/lib\/microshift\/certs\/kube-apiserver-external-signer\/kube-external-serving\/server.crt'}, 'OSSL_CMD': {'text': '${OSSL_CMD} openssl x509 -text -noout -in'}, 'GREP_SUBJ_IPS': {'text': \"${GREP_SUBJ_IPS} grep -A1 'Subject Alternative Name:' | tail -1\"}}","documentation":"alternative names in ${CERT_FILE}."} {"code":"IP Should Be Present In External Certificate\n [Documentation] Check the specified IP presence in the external\n ... certificate file\n [Arguments] ${ip}\n\n Check IP Certificate ${ip} ${EMPTY}","name":"IP Should Be Present In External Certificate","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/network\/multi-nic.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"certificate file"} {"code":"IP Should Not Be Present In External Certificate\n [Documentation] Check the specified IP absence in the external\n ... certificate file\n [Arguments] ${ip}\n\n Check IP Certificate ${ip} '--invert-match'","name":"IP Should Not Be Present In External Certificate","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/network\/multi-nic.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"certificate file"} {"code":"Restore Network Configuration By Rebooting Host\n [Documentation] Restores network interface initial configuration\n ... by rebooting the host.\n Remove Drop In MicroShift Config 10-subjectAltNames\n Reboot MicroShift Host\n Login Switch To IP ${USHIFT_HOST_IP1}\n Wait Until Greenboot Health Check Exited","name":"Restore Network Configuration By Rebooting Host","imports_file_locations":"{'..\/..\/resources\/microshift-config.resource': 'test\/resources\/microshift-config.resource', '..\/..\/resources\/ostree-health.resource': 'test\/resources\/ostree-health.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/network\/multi-nic.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'USHIFT_HOST_IP1': {'text': '${USHIFT_HOST_IP1} ${EMPTY}'}}","documentation":"by rebooting the host."} {"code":"*** Settings ***\nDocumentation Tests related to running MicroShift on a disconnected host.\n\nResource ..\/..\/resources\/offline.resource\n\nSuite Setup offline.Setup Suite\n\nTest Tags offline\n\n\n*** Variables ***\n${SERVER_POD} assets\/hello\/hello-microshift.yaml\n${SERVER_INGRESS} assets\/hello\/hello-microshift-ingress.yaml\n${SERVER_SVC} assets\/hello\/hello-microshift-service.yaml\n${TEST_NS} ${EMPTY}\n\n\n*** Test Cases ***\nMicroShift Should Boot Into Healthy State When Host Is Offline\n [Documentation] Test that MicroShift starts when the host is offline.\n offline.Reboot MicroShift Host\n Wait For Greenboot Health Check To Exit\n\nLoad Balancer Services Should Be Running Correctly When Host Is Offline\n [Documentation] Test that the load balancer services are running correctly when the host is offline.\n [Setup] Setup Test\n\n Wait Until Keyword Succeeds 2m 10s\n ... Pod Should Be Reachable Via Ingress\n\n [Teardown] Teardown Test\n\n\n*** Keywords ***\nSetup Test\n [Documentation] Deploy cluster resources to provide an endpoint for testing. Wait for greenboot\n Wait For Greenboot Health Check To Exit\n ${ns}= Create Test Namespace\n Send File ${SERVER_SVC} \/tmp\/hello-microshift-service.yaml\n offline.Run With Kubeconfig oc create -n\\=${ns} -f\\=\/tmp\/hello-microshift-service.yaml\n Send File ${SERVER_INGRESS} \/tmp\/hello-microshift-ingress.yaml\n offline.Run With Kubeconfig oc create -n\\=${ns} -f\\=\/tmp\/hello-microshift-ingress.yaml\n Send File ${SERVER_POD} \/tmp\/hello-microshift.yaml\n offline.Run With Kubeconfig oc create -n\\=${ns} -f\\=\/tmp\/hello-microshift.yaml\n # Set this last, it's not available within this scope anyway\n offline.Run With Kubeconfig oc wait -n\\=${ns} --for\\=condition=Ready pod\/hello-microshift\n Set Test Variable ${TEST_NS} ${ns}\n\nTeardown Test\n [Documentation] Test teardown\n offline.Run With Kubeconfig oc delete -n\\=${TEST_NS} -f\\=\/tmp\/hello-microshift-service.yaml\n offline.Run With Kubeconfig oc delete -n\\=${TEST_NS} -f\\=\/tmp\/hello-microshift-ingress.yaml\n offline.Run With Kubeconfig oc delete -n\\=${TEST_NS} -f\\=\/tmp\/hello-microshift.yaml\n offline.Run With Kubeconfig oc delete namespace ${TEST_NS}\n\nPod Should Be Reachable Via Ingress\n [Documentation] Checks if a load balancer service can be accessed. The curl command must be executed in a\n ... subshell.\n ${result} ${ignore}= Wait Until Keyword Succeeds 5x 1s\n ... Run Guest Process ${GUEST_NAME}\n ... bash\n ... -c\n ... curl --fail -I --max-time 15 -H \\\"Host: hello-microshift.cluster.local\\\" ${NODE_IP}:80\/principal\n Log Many ${result[\"stdout\"]} ${result[\"stderr\"]}\n Should Be Equal As Integers ${result[\"rc\"]} 0\n\nCreate Test Namespace\n [Documentation] Create a test namespace with a random name\n\n ${rand}= Generate Random String\n ${rand}= Convert To Lower Case ${rand}\n ${ns}= Set Variable test-${rand}\n Wait Until Keyword Succeeds 5m 10s\n ... offline.Run With Kubeconfig oc create namespace ${ns}\n RETURN ${ns}\n","name":"\/tmp\/repos\/microshift\/test\/suites\/network\/offline.robot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/network\/offline.robot","element_type":"test","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"MicroShift Should Boot Into Healthy State When Host Is Offline\n [Documentation] Test that MicroShift starts when the host is offline.\n offline.Reboot MicroShift Host\n Wait For Greenboot Health Check To Exit","name":"MicroShift Should Boot Into Healthy State When Host Is Offline","imports_file_locations":"{'..\/..\/resources\/offline.resource': 'test\/resources\/offline.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/network\/offline.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Load Balancer Services Should Be Running Correctly When Host Is Offline\n [Documentation] Test that the load balancer services are running correctly when the host is offline.\n [Setup] Setup Test\n\n Wait Until Keyword Succeeds 2m 10s\n ... Pod Should Be Reachable Via Ingress\n\n [Teardown] Teardown Test","name":"Load Balancer Services Should Be Running Correctly When Host Is Offline","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/network\/offline.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Setup Test\n [Documentation] Deploy cluster resources to provide an endpoint for testing. Wait for greenboot\n Wait For Greenboot Health Check To Exit\n ${ns}= Create Test Namespace\n Send File ${SERVER_SVC} \/tmp\/hello-microshift-service.yaml\n offline.Run With Kubeconfig oc create -n\\=${ns} -f\\=\/tmp\/hello-microshift-service.yaml\n Send File ${SERVER_INGRESS} \/tmp\/hello-microshift-ingress.yaml\n offline.Run With Kubeconfig oc create -n\\=${ns} -f\\=\/tmp\/hello-microshift-ingress.yaml\n Send File ${SERVER_POD} \/tmp\/hello-microshift.yaml\n offline.Run With Kubeconfig oc create -n\\=${ns} -f\\=\/tmp\/hello-microshift.yaml\n # Set this last, it's not available within this scope anyway\n offline.Run With Kubeconfig oc wait -n\\=${ns} --for\\=condition=Ready pod\/hello-microshift\n Set Test Variable ${TEST_NS} ${ns}","name":"Setup Test","imports_file_locations":"{'..\/..\/resources\/offline.resource': 'test\/resources\/offline.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/network\/offline.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'SERVER_SVC': {'text': '${SERVER_SVC} assets\/hello\/hello-microshift-service.yaml'}, 'SERVER_INGRESS': {'text': '${SERVER_INGRESS} assets\/hello\/hello-microshift-ingress.yaml'}, 'SERVER_POD': {'text': '${SERVER_POD} assets\/hello\/hello-microshift.yaml'}, 'TEST_NS': {'text': '${TEST_NS} ${EMPTY}'}}","documentation":"Wait For Greenboot Health Check To Exit"} {"code":"Teardown Test\n [Documentation] Test teardown\n offline.Run With Kubeconfig oc delete -n\\=${TEST_NS} -f\\=\/tmp\/hello-microshift-service.yaml\n offline.Run With Kubeconfig oc delete -n\\=${TEST_NS} -f\\=\/tmp\/hello-microshift-ingress.yaml\n offline.Run With Kubeconfig oc delete -n\\=${TEST_NS} -f\\=\/tmp\/hello-microshift.yaml\n offline.Run With Kubeconfig oc delete namespace ${TEST_NS}","name":"Teardown Test","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/network\/offline.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'TEST_NS': {'text': '${TEST_NS} ${EMPTY}'}}","documentation":"offline.Run With Kubeconfig oc delete -n\\=${TEST_NS} -f\\=\/tmp\/hello-microshift-service.yaml"} {"code":"Pod Should Be Reachable Via Ingress\n [Documentation] Checks if a load balancer service can be accessed. The curl command must be executed in a\n ... subshell.\n ${result} ${ignore}= Wait Until Keyword Succeeds 5x 1s\n ... Run Guest Process ${GUEST_NAME}\n ... bash\n ... -c\n ... curl --fail -I --max-time 15 -H \\\"Host: hello-microshift.cluster.local\\\" ${NODE_IP}:80\/principal\n Log Many ${result[\"stdout\"]} ${result[\"stderr\"]}\n Should Be Equal As Integers ${result[\"rc\"]} 0","name":"Pod Should Be Reachable Via Ingress","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/network\/offline.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${result} ${ignore}= Wait Until Keyword Succeeds 5x 1s\n ... Run Guest Process ${GUEST_NAME}\n ... bash\n ... -c\n ... curl --fail -I --max-time 15 -H \\\"Host: hello-microshift.cluster.local\\\" ${NODE_IP}:80\/principal"} {"code":"Create Test Namespace\n [Documentation] Create a test namespace with a random name\n\n ${rand}= Generate Random String\n ${rand}= Convert To Lower Case ${rand}\n ${ns}= Set Variable test-${rand}\n Wait Until Keyword Succeeds 5m 10s\n ... offline.Run With Kubeconfig oc create namespace ${ns}\n RETURN ${ns}","name":"Create Test Namespace","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/network\/offline.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${rand}= Generate Random String"} {"code":"*** Settings ***\nDocumentation Test Gateway API functionality\n\nResource ..\/..\/resources\/microshift-network.resource\n\nSuite Setup Setup Suite With Namespace\nSuite Teardown Teardown Suite With Namespace\n\n\n*** Variables ***\n${NS_GATEWAY} ${EMPTY}\n${GATEWAY_MANIFEST_TMPL} .\/assets\/gateway-api\/gateway.yaml.template\n${HTTP_ROUTE_MANIFEST_TMPL} .\/assets\/gateway-api\/http-route.yaml.template\n${GATEWAY_HOSTNAME} gw1.microshift.local\n${GATEWAY_PORT} 9000\n\n\n*** Test Cases ***\nTest Simple HTTP Route\n [Documentation] Create a gateway and test it with Hello MicroShift application with HTTPRoute.\n [Setup] Run Keywords\n ... Setup Namespace\n ... Deploy Hello MicroShift\n Create Gateway ${GATEWAY_HOSTNAME} ${GATEWAY_PORT} ${NS_GATEWAY}\n Create HTTP Route ${GATEWAY_HOSTNAME} ${NS_GATEWAY}\n Access Hello MicroShift Success ushift_port=${GATEWAY_PORT} hostname=${GATEWAY_HOSTNAME}\n [Teardown] Run Keywords\n ... Delete Namespace\n\n\n*** Keywords ***\nDeploy Hello MicroShift\n [Documentation] Deploys the hello microshift application (service included)\n ... in the given namespace.\n Create Hello MicroShift Pod ${NS_GATEWAY}\n Expose Hello MicroShift ${NS_GATEWAY}\n\nSetup Namespace\n [Documentation] Configure a namespace where to create all resources for later cleanup.\n Set Suite Variable \\${NS_GATEWAY} ${NAMESPACE}-gw-1\n Create Namespace ${NS_GATEWAY}\n\nDelete Namespace\n [Documentation] Remove gateway api specific namespace.\n Remove Namespace ${NS_GATEWAY}\n\nCreate Gateway\n [Documentation] Create a gateway using given hostname and port. Waits for readiness\n [Arguments] ${hostname} ${port} ${namespace}\n ${tmp}= Set Variable \/tmp\/gateway.yaml\n Set Test Variable ${HOSTNAME} ${hostname}\n Set Test Variable ${PORT} ${port}\n Run Keyword And Ignore Error\n ... Remove File ${tmp}\n Generate File From Template ${GATEWAY_MANIFEST_TMPL} ${tmp}\n Oc Apply -n ${namespace} -f ${tmp}\n Oc Wait -n ${namespace} gateway\/test-gateway --for=\"condition=Accepted\" --timeout=120s\n Oc Wait -n ${namespace} deploy test-gateway-openshift-gateway-api --for=condition=Available --timeout=120s\n Oc Wait -n ${namespace} gateway\/test-gateway --for=\"condition=Programmed\" --timeout=120s\n\nCreate HTTP Route\n [Documentation] Create an HTTP route using the given hostname and namespace. Waits for acceptance in a gateway.\n [Arguments] ${hostname} ${namespace}\n ${tmp}= Set Variable \/tmp\/route.yaml\n Set Test Variable ${HOSTNAME} ${hostname}\n Set Test Variable ${NS} ${namespace}\n Run Keyword And Ignore Error\n ... Remove File ${tmp}\n Generate File From Template ${HTTP_ROUTE_MANIFEST_TMPL} ${tmp}\n Oc Apply -n ${namespace} -f ${tmp}\n Oc Wait\n ... -n ${namespace} httproutes\/http\n ... --for jsonpath='{.status.parents[].conditions[?(@.type==\"Accepted\")].status}=True' --timeout=120s\n Oc Wait\n ... -n ${namespace} httproutes\/http\n ... --for jsonpath='{.status.parents[].conditions[?(@.type==\"ResolvedRefs\")].status}=True' --timeout=120s\n\nGenerate File From Template\n [Documentation] Generate file from template\n [Arguments] ${template_file} ${output_file}\n ${template}= OperatingSystem.Get File ${template_file}\n ${message}= Replace Variables ${template}\n OperatingSystem.Append To File ${output_file} ${message}\n","name":"\/tmp\/repos\/microshift\/test\/suites\/optional\/gateway-api.robot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/optional\/gateway-api.robot","element_type":"test","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Test Simple HTTP Route\n [Documentation] Create a gateway and test it with Hello MicroShift application with HTTPRoute.\n [Setup] Run Keywords\n ... Setup Namespace\n ... Deploy Hello MicroShift\n Create Gateway ${GATEWAY_HOSTNAME} ${GATEWAY_PORT} ${NS_GATEWAY}\n Create HTTP Route ${GATEWAY_HOSTNAME} ${NS_GATEWAY}\n Access Hello MicroShift Success ushift_port=${GATEWAY_PORT} hostname=${GATEWAY_HOSTNAME}\n [Teardown] Run Keywords\n ... Delete Namespace","name":"Test Simple HTTP Route","imports_file_locations":"{'..\/..\/resources\/microshift-network.resource': 'test\/resources\/microshift-network.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/optional\/gateway-api.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'GATEWAY_HOSTNAME': {'text': '${GATEWAY_HOSTNAME} gw1.microshift.local'}, 'GATEWAY_PORT': {'text': '${GATEWAY_PORT} 9000'}, 'NS_GATEWAY': {'text': '${NS_GATEWAY} ${EMPTY}'}}","documentation":""} {"code":"Deploy Hello MicroShift\n [Documentation] Deploys the hello microshift application (service included)\n ... in the given namespace.\n Create Hello MicroShift Pod ${NS_GATEWAY}\n Expose Hello MicroShift ${NS_GATEWAY}","name":"Deploy Hello MicroShift","imports_file_locations":"{'..\/..\/resources\/microshift-network.resource': 'test\/resources\/microshift-network.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/optional\/gateway-api.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'NS_GATEWAY': {'text': '${NS_GATEWAY} ${EMPTY}'}}","documentation":"in the given namespace."} {"code":"Setup Namespace\n [Documentation] Configure a namespace where to create all resources for later cleanup.\n Set Suite Variable \\${NS_GATEWAY} ${NAMESPACE}-gw-1\n Create Namespace ${NS_GATEWAY}","name":"Setup Namespace","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/optional\/gateway-api.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'NS_GATEWAY': {'text': '${NS_GATEWAY} ${EMPTY}'}}","documentation":"Set Suite Variable \\${NS_GATEWAY} ${NAMESPACE}-gw-1"} {"code":"Delete Namespace\n [Documentation] Remove gateway api specific namespace.\n Remove Namespace ${NS_GATEWAY}","name":"Delete Namespace","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/optional\/gateway-api.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'NS_GATEWAY': {'text': '${NS_GATEWAY} ${EMPTY}'}}","documentation":"Remove Namespace ${NS_GATEWAY}"} {"code":"Create Gateway\n [Documentation] Create a gateway using given hostname and port. Waits for readiness\n [Arguments] ${hostname} ${port} ${namespace}\n ${tmp}= Set Variable \/tmp\/gateway.yaml\n Set Test Variable ${HOSTNAME} ${hostname}\n Set Test Variable ${PORT} ${port}\n Run Keyword And Ignore Error\n ... Remove File ${tmp}\n Generate File From Template ${GATEWAY_MANIFEST_TMPL} ${tmp}\n Oc Apply -n ${namespace} -f ${tmp}\n Oc Wait -n ${namespace} gateway\/test-gateway --for=\"condition=Accepted\" --timeout=120s\n Oc Wait -n ${namespace} deploy test-gateway-openshift-gateway-api --for=condition=Available --timeout=120s\n Oc Wait -n ${namespace} gateway\/test-gateway --for=\"condition=Programmed\" --timeout=120s","name":"Create Gateway","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/optional\/gateway-api.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'GATEWAY_MANIFEST_TMPL': {'text': '${GATEWAY_MANIFEST_TMPL} .\/assets\/gateway-api\/gateway.yaml.template'}}","documentation":"[Arguments] ${hostname} ${port} ${namespace}"} {"code":"Create HTTP Route\n [Documentation] Create an HTTP route using the given hostname and namespace. Waits for acceptance in a gateway.\n [Arguments] ${hostname} ${namespace}\n ${tmp}= Set Variable \/tmp\/route.yaml\n Set Test Variable ${HOSTNAME} ${hostname}\n Set Test Variable ${NS} ${namespace}\n Run Keyword And Ignore Error\n ... Remove File ${tmp}\n Generate File From Template ${HTTP_ROUTE_MANIFEST_TMPL} ${tmp}\n Oc Apply -n ${namespace} -f ${tmp}\n Oc Wait\n ... -n ${namespace} httproutes\/http\n ... --for jsonpath='{.status.parents[].conditions[?(@.type==\"Accepted\")].status}=True' --timeout=120s\n Oc Wait\n ... -n ${namespace} httproutes\/http\n ... --for jsonpath='{.status.parents[].conditions[?(@.type==\"ResolvedRefs\")].status}=True' --timeout=120s","name":"Create HTTP Route","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/optional\/gateway-api.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'HTTP_ROUTE_MANIFEST_TMPL': {'text': '${HTTP_ROUTE_MANIFEST_TMPL} .\/assets\/gateway-api\/http-route.yaml.template'}}","documentation":"[Arguments] ${hostname} ${namespace}"} {"code":"Generate File From Template\n [Documentation] Generate file from template\n [Arguments] ${template_file} ${output_file}\n ${template}= OperatingSystem.Get File ${template_file}\n ${message}= Replace Variables ${template}\n OperatingSystem.Append To File ${output_file} ${message}","name":"Generate File From Template","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/optional\/gateway-api.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${template_file} ${output_file}"} {"code":"*** Settings ***\nDocumentation Test if healthcheck exits quickly when MicroShift service is disabled\n\nResource ..\/..\/resources\/common.resource\nResource ..\/..\/resources\/microshift-process.resource\nLibrary DateTime\n\nSuite Setup Setup Suite\nSuite Teardown Teardown Suite\n\n\n*** Test Cases ***\nHealthchecks Should Exit Fast And Successful When MicroShift Is Disabled\n [Documentation] When microshift.service is disabled, the healtchecks should\n ... exit quickly and without an error. They should not attempt to query API Server.\n [Tags] ushift-5381\n [Setup] Disable MicroShift\n\n ${stdout} ${stderr} ${rc}= SSHLibrary.Execute Command\n ... find \/etc\/greenboot\/check\/required.d\/ -iname '*_microshift_running_check_*'\n ... sudo=True\n ... return_rc=True\n ... return_stderr=True\n ... return_stdout=True\n Should Be Equal As Integers 0 ${rc}\n\n @{checks}= Split String ${stdout}\n FOR ${check} IN @{checks}\n ${stdout} ${stderr} ${rc}= SSHLibrary.Execute Command\n ... ${check}\n ... sudo=True\n ... return_rc=True\n ... return_stderr=True\n ... return_stdout=True\n Should Be Equal As Integers 0 ${rc}\n Should Contain ${stderr} microshift.service is not enabled\n END\n [Teardown] Enable MicroShift\n","name":"\/tmp\/repos\/microshift\/test\/suites\/optional\/healthchecks-disabled-service.robot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/optional\/healthchecks-disabled-service.robot","element_type":"test","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Healthchecks Should Exit Fast And Successful When MicroShift Is Disabled\n [Documentation] When microshift.service is disabled, the healtchecks should\n ... exit quickly and without an error. They should not attempt to query API Server.\n [Tags] ushift-5381\n [Setup] Disable MicroShift\n\n ${stdout} ${stderr} ${rc}= SSHLibrary.Execute Command\n ... find \/etc\/greenboot\/check\/required.d\/ -iname '*_microshift_running_check_*'\n ... sudo=True\n ... return_rc=True\n ... return_stderr=True\n ... return_stdout=True\n Should Be Equal As Integers 0 ${rc}\n\n @{checks}= Split String ${stdout}\n FOR ${check} IN @{checks}\n ${stdout} ${stderr} ${rc}= SSHLibrary.Execute Command\n ... ${check}\n ... sudo=True\n ... return_rc=True\n ... return_stderr=True\n ... return_stdout=True\n Should Be Equal As Integers 0 ${rc}\n Should Contain ${stderr} microshift.service is not enabled\n END\n [Teardown] Enable MicroShift","name":"Healthchecks Should Exit Fast And Successful When MicroShift Is Disabled","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/optional\/healthchecks-disabled-service.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"*** Settings ***\nDocumentation Tests for Multus and Bridge plugin on MicroShift\n\nResource ..\/..\/resources\/common.resource\nResource ..\/..\/resources\/multus.resource\nResource ..\/..\/resources\/microshift-process.resource\nResource ..\/..\/resources\/microshift-rpm.resource\n\nSuite Setup Setup\nSuite Teardown Teardown Suite With Namespace\n\nTest Tags vm-only\n\n\n*** Variables ***\n${BRIDGE_INTERFACE} br-test\n${BRIDGE_NAD_YAML} .\/assets\/multus\/bridge-nad.yaml\n${BRIDGE_POD_YAML} .\/assets\/multus\/bridge-pod.yaml\n${BRIDGE_POD_NAME} test-bridge\n${BRIDGE_IP} 10.10.0.10\/24\n\n${PE_BRIDGE_INTERFACE} br-preexisting\n${PE_BRIDGE_NAD_YAML} .\/assets\/multus\/bridge-preexisting-nad.yaml\n${PE_BRIDGE_POD_YAML} .\/assets\/multus\/bridge-preexisting-pod.yaml\n${PE_BRIDGE_POD_NAME} test-bridge-preexisting\n${PE_BRIDGE_IP} 10.10.1.10\/24\n\n${MACVLAN_NAD_YAML} .\/assets\/multus\/macvlan-nad.yaml\n${MACVLAN_POD_YAML} .\/assets\/multus\/macvlan-pod.yaml\n${MACVLAN_POD_NAME} test-macvlan\n${MACVLAN_MASTER} ${EMPTY}\n\n${IPVLAN_NAD_YAML} .\/assets\/multus\/ipvlan-nad.yaml\n${IPVLAN_POD_YAML} .\/assets\/multus\/ipvlan-pod.yaml\n${IPVLAN_POD_NAME} test-ipvlan\n${IPVLAN_MASTER} ${EMPTY}\n\n\n*** Test Cases ***\nPre-Existing Bridge Interface\n [Documentation] Test verifies if Bridge CNI plugin will work correctly with pre-existing interface.\n [Setup] Run Keywords\n ... Interface Should Not Exist ${PE_BRIDGE_INTERFACE}\n ... AND\n ... Create Interface ${PE_BRIDGE_INTERFACE}\n ... AND\n ... Create NAD And Pod ${PE_BRIDGE_NAD_YAML} ${PE_BRIDGE_POD_YAML}\n ... AND\n ... Named Pod Should Be Ready ${PE_BRIDGE_POD_NAME} ${NAMESPACE}\n ... AND\n ... Interface Should Exist ${PE_BRIDGE_INTERFACE}\n ... AND\n ... Set IP For Host Interface ${PE_BRIDGE_INTERFACE} ${PE_BRIDGE_IP}\n\n Connect To Pod Over Local Interface ${PE_BRIDGE_POD_NAME} ${NAMESPACE} ${PE_BRIDGE_INTERFACE}\n\n [Teardown] Cleanup Bridge Test\n ... ${PE_BRIDGE_NAD_YAML}\n ... ${PE_BRIDGE_POD_YAML}\n ... ${PE_BRIDGE_INTERFACE}\n\nNo Pre-Existing Bridge Interface\n [Documentation] Test verifies if Bridge CNI plugin will\n ... work correctly if there is no pre-existing bridge\n ... interface - it needs to be created.\n [Setup] Run Keywords\n ... Interface Should Not Exist ${BRIDGE_INTERFACE}\n ... AND\n ... Create NAD And Pod ${BRIDGE_NAD_YAML} ${BRIDGE_POD_YAML}\n ... AND\n ... Named Pod Should Be Ready ${BRIDGE_POD_NAME} ${NAMESPACE}\n ... AND\n ... Interface Should Exist ${BRIDGE_INTERFACE}\n ... AND\n ... Set IP For Host Interface ${BRIDGE_INTERFACE} ${BRIDGE_IP}\n\n Connect To Pod Over Local Interface ${BRIDGE_POD_NAME} ${NAMESPACE} ${BRIDGE_INTERFACE}\n\n [Teardown] Cleanup Bridge Test\n ... ${BRIDGE_NAD_YAML}\n ... ${BRIDGE_POD_YAML}\n ... ${BRIDGE_INTERFACE}\n\nMacvlan\n [Documentation] Tests if Pod with macvlan plugin interface is accessible\n ... from outside the MicroShift host.\n [Setup] Run Keywords\n ... Template And Create NAD And Pod ${MACVLAN_NAD_YAML} ${MACVLAN_POD_YAML}\n ... AND\n ... Named Pod Should Be Ready ${MACVLAN_POD_NAME} ${NAMESPACE}\n\n Wait Until Keyword Succeeds 5x 5s\n ... Connect To Pod From The Hypervisor ${MACVLAN_POD_NAME} ${NAMESPACE} ${NAMESPACE}\/macvlan-conf\n\n [Teardown] Remove NAD And Pod ${MACVLAN_NAD_YAML} ${MACVLAN_POD_YAML}\n\nIpvlan\n [Documentation] Tests if Pod with ipvlan plugin interface is accessible\n ... from outside the MicroShift host.\n [Setup] Run Keywords\n ... Template And Create NAD And Pod ${IPVLAN_NAD_YAML} ${IPVLAN_POD_YAML}\n ... AND\n ... Named Pod Should Be Ready ${IPVLAN_POD_NAME} ${NAMESPACE}\n\n Wait Until Keyword Succeeds 5x 5s\n ... Connect To Pod From The Hypervisor ${IPVLAN_POD_NAME} ${NAMESPACE} ${NAMESPACE}\/ipvlan-conf\n\n [Teardown] Remove NAD And Pod ${IPVLAN_NAD_YAML} ${IPVLAN_POD_YAML}\n\n\n*** Keywords ***\nSetup\n [Documentation] Setup test suite\n Setup Suite With Namespace\n\n ${out}= Command Should Work ip route list default | cut -d' ' -f5\n @{enps}= String.Split To Lines ${out}\n ${len}= Get Length ${enps}\n Should Be True ${len}>=2\n Set Suite Variable ${MACVLAN_MASTER} ${enps[0]}\n Set Suite Variable ${IPVLAN_MASTER} ${enps[1]}\n Verify MicroShift RPM Install\n\nTemplate And Create NAD And Pod\n [Documentation] Template NAD and create it along with Pod\n [Arguments] ${nad_tpl} ${pod}\n ${rand}= Generate Random String\n ${nad_tpl_output}= Join Path \/tmp multus-templates-${rand}.yaml\n ${template}= OperatingSystem.Get File ${nad_tpl}\n ${contents}= Replace Variables ${template}\n OperatingSystem.Append To File ${nad_tpl_output} ${contents}\n Create NAD And Pod ${nad_tpl_output} ${pod}\n OperatingSystem.Remove File ${nad_tpl_output}\n\nCleanup Bridge Test\n [Documentation] Removes provided NetworkAttachmentDefinition, Pod and network interface to allow for test rerun.\n [Arguments] ${nad} ${pod} ${if}\n Remove NAD And Pod ${nad} ${pod}\n Command Should Work ip link delete ${if}\n\nConnect To Pod From The Hypervisor\n [Documentation] Makes a HTTP request to port 8080 of a given Pod from the hypervisor machine.\n ... This is a limitation of macvlan devices - virtual devices cannot communicate with the master interface.\n [Arguments] ${pod} ${ns} ${extra_cni_name}\n\n ${networks}= Get And Verify Pod Networks ${pod} ${ns} ${extra_cni_name}\n ${extra_ip}= Set Variable ${networks}[1][ips][0]\n Should Contain ${extra_ip} 192.168.112\n\n ${result}= Process.Run Process curl -v ${extra_ip}:8080\n Should Contain ${result.stdout} Hello MicroShift\n\nInterface Should Not Exist\n [Documentation] Verifies that network interface does not exist.\n [Arguments] ${if}\n Command Should Fail ip link show ${if}\n\nCreate Interface\n [Documentation] Creates network interface.\n [Arguments] ${if} ${type}=bridge\n Command Should Work ip link add dev ${if} type ${type}\n\nInterface Should Exist\n [Documentation] Verifies that interface exists on the host.\n [Arguments] ${if}\n Command Should Work ip link show ${if}\n","name":"\/tmp\/repos\/microshift\/test\/suites\/optional\/multus.robot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/optional\/multus.robot","element_type":"test","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Pre-Existing Bridge Interface\n [Documentation] Test verifies if Bridge CNI plugin will work correctly with pre-existing interface.\n [Setup] Run Keywords\n ... Interface Should Not Exist ${PE_BRIDGE_INTERFACE}\n ... AND\n ... Create Interface ${PE_BRIDGE_INTERFACE}\n ... AND\n ... Create NAD And Pod ${PE_BRIDGE_NAD_YAML} ${PE_BRIDGE_POD_YAML}\n ... AND\n ... Named Pod Should Be Ready ${PE_BRIDGE_POD_NAME} ${NAMESPACE}\n ... AND\n ... Interface Should Exist ${PE_BRIDGE_INTERFACE}\n ... AND\n ... Set IP For Host Interface ${PE_BRIDGE_INTERFACE} ${PE_BRIDGE_IP}\n\n Connect To Pod Over Local Interface ${PE_BRIDGE_POD_NAME} ${NAMESPACE} ${PE_BRIDGE_INTERFACE}\n\n [Teardown] Cleanup Bridge Test\n ... ${PE_BRIDGE_NAD_YAML}\n ... ${PE_BRIDGE_POD_YAML}\n ... ${PE_BRIDGE_INTERFACE}","name":"Pre-Existing Bridge Interface","imports_file_locations":"{'..\/..\/resources\/multus.resource': 'test\/resources\/multus.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/optional\/multus.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'PE_BRIDGE_INTERFACE': {'text': '${PE_BRIDGE_INTERFACE} br-preexisting'}, 'PE_BRIDGE_NAD_YAML': {'text': '${PE_BRIDGE_NAD_YAML} .\/assets\/multus\/bridge-preexisting-nad.yaml'}, 'PE_BRIDGE_POD_YAML': {'text': '${PE_BRIDGE_POD_YAML} .\/assets\/multus\/bridge-preexisting-pod.yaml'}, 'PE_BRIDGE_POD_NAME': {'text': '${PE_BRIDGE_POD_NAME} test-bridge-preexisting'}, 'PE_BRIDGE_IP': {'text': '${PE_BRIDGE_IP} 10.10.1.10\/24'}}","documentation":""} {"code":"No Pre-Existing Bridge Interface\n [Documentation] Test verifies if Bridge CNI plugin will\n ... work correctly if there is no pre-existing bridge\n ... interface - it needs to be created.\n [Setup] Run Keywords\n ... Interface Should Not Exist ${BRIDGE_INTERFACE}\n ... AND\n ... Create NAD And Pod ${BRIDGE_NAD_YAML} ${BRIDGE_POD_YAML}\n ... AND\n ... Named Pod Should Be Ready ${BRIDGE_POD_NAME} ${NAMESPACE}\n ... AND\n ... Interface Should Exist ${BRIDGE_INTERFACE}\n ... AND\n ... Set IP For Host Interface ${BRIDGE_INTERFACE} ${BRIDGE_IP}\n\n Connect To Pod Over Local Interface ${BRIDGE_POD_NAME} ${NAMESPACE} ${BRIDGE_INTERFACE}\n\n [Teardown] Cleanup Bridge Test\n ... ${BRIDGE_NAD_YAML}\n ... ${BRIDGE_POD_YAML}\n ... ${BRIDGE_INTERFACE}","name":"No Pre-Existing Bridge Interface","imports_file_locations":"{'..\/..\/resources\/multus.resource': 'test\/resources\/multus.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/optional\/multus.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'BRIDGE_INTERFACE': {'text': '${BRIDGE_INTERFACE} br-test'}, 'BRIDGE_NAD_YAML': {'text': '${BRIDGE_NAD_YAML} .\/assets\/multus\/bridge-nad.yaml'}, 'BRIDGE_POD_YAML': {'text': '${BRIDGE_POD_YAML} .\/assets\/multus\/bridge-pod.yaml'}, 'BRIDGE_POD_NAME': {'text': '${BRIDGE_POD_NAME} test-bridge'}, 'BRIDGE_IP': {'text': '${BRIDGE_IP} 10.10.0.10\/24'}}","documentation":""} {"code":"Macvlan\n [Documentation] Tests if Pod with macvlan plugin interface is accessible\n ... from outside the MicroShift host.\n [Setup] Run Keywords\n ... Template And Create NAD And Pod ${MACVLAN_NAD_YAML} ${MACVLAN_POD_YAML}\n ... AND\n ... Named Pod Should Be Ready ${MACVLAN_POD_NAME} ${NAMESPACE}\n\n Wait Until Keyword Succeeds 5x 5s\n ... Connect To Pod From The Hypervisor ${MACVLAN_POD_NAME} ${NAMESPACE} ${NAMESPACE}\/macvlan-conf\n\n [Teardown] Remove NAD And Pod ${MACVLAN_NAD_YAML} ${MACVLAN_POD_YAML}","name":"Macvlan","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/optional\/multus.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'MACVLAN_NAD_YAML': {'text': '${MACVLAN_NAD_YAML} .\/assets\/multus\/macvlan-nad.yaml'}, 'MACVLAN_POD_YAML': {'text': '${MACVLAN_POD_YAML} .\/assets\/multus\/macvlan-pod.yaml'}, 'MACVLAN_POD_NAME': {'text': '${MACVLAN_POD_NAME} test-macvlan'}}","documentation":""} {"code":"Ipvlan\n [Documentation] Tests if Pod with ipvlan plugin interface is accessible\n ... from outside the MicroShift host.\n [Setup] Run Keywords\n ... Template And Create NAD And Pod ${IPVLAN_NAD_YAML} ${IPVLAN_POD_YAML}\n ... AND\n ... Named Pod Should Be Ready ${IPVLAN_POD_NAME} ${NAMESPACE}\n\n Wait Until Keyword Succeeds 5x 5s\n ... Connect To Pod From The Hypervisor ${IPVLAN_POD_NAME} ${NAMESPACE} ${NAMESPACE}\/ipvlan-conf\n\n [Teardown] Remove NAD And Pod ${IPVLAN_NAD_YAML} ${IPVLAN_POD_YAML}","name":"Ipvlan","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/optional\/multus.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'IPVLAN_NAD_YAML': {'text': '${IPVLAN_NAD_YAML} .\/assets\/multus\/ipvlan-nad.yaml'}, 'IPVLAN_POD_YAML': {'text': '${IPVLAN_POD_YAML} .\/assets\/multus\/ipvlan-pod.yaml'}, 'IPVLAN_POD_NAME': {'text': '${IPVLAN_POD_NAME} test-ipvlan'}}","documentation":""} {"code":"Setup\n [Documentation] Setup test suite\n Setup Suite With Namespace\n\n ${out}= Command Should Work ip route list default | cut -d' ' -f5\n @{enps}= String.Split To Lines ${out}\n ${len}= Get Length ${enps}\n Should Be True ${len}>=2\n Set Suite Variable ${MACVLAN_MASTER} ${enps[0]}\n Set Suite Variable ${IPVLAN_MASTER} ${enps[1]}\n Verify MicroShift RPM Install","name":"Setup","imports_file_locations":"{'..\/..\/resources\/microshift-rpm.resource': 'test\/resources\/microshift-rpm.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/optional\/multus.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'MACVLAN_MASTER': {'text': '${MACVLAN_MASTER} ${EMPTY}'}, 'IPVLAN_MASTER': {'text': '${IPVLAN_MASTER} ${EMPTY}'}}","documentation":"Setup Suite With Namespace"} {"code":"Template And Create NAD And Pod\n [Documentation] Template NAD and create it along with Pod\n [Arguments] ${nad_tpl} ${pod}\n ${rand}= Generate Random String\n ${nad_tpl_output}= Join Path \/tmp multus-templates-${rand}.yaml\n ${template}= OperatingSystem.Get File ${nad_tpl}\n ${contents}= Replace Variables ${template}\n OperatingSystem.Append To File ${nad_tpl_output} ${contents}\n Create NAD And Pod ${nad_tpl_output} ${pod}\n OperatingSystem.Remove File ${nad_tpl_output}","name":"Template And Create NAD And Pod","imports_file_locations":"{'..\/..\/resources\/multus.resource': 'test\/resources\/multus.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/optional\/multus.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${nad_tpl} ${pod}"} {"code":"Cleanup Bridge Test\n [Documentation] Removes provided NetworkAttachmentDefinition, Pod and network interface to allow for test rerun.\n [Arguments] ${nad} ${pod} ${if}\n Remove NAD And Pod ${nad} ${pod}\n Command Should Work ip link delete ${if}","name":"Cleanup Bridge Test","imports_file_locations":"{'..\/..\/resources\/multus.resource': 'test\/resources\/multus.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/optional\/multus.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${nad} ${pod} ${if}"} {"code":"Connect To Pod From The Hypervisor\n [Documentation] Makes a HTTP request to port 8080 of a given Pod from the hypervisor machine.\n ... This is a limitation of macvlan devices - virtual devices cannot communicate with the master interface.\n [Arguments] ${pod} ${ns} ${extra_cni_name}\n\n ${networks}= Get And Verify Pod Networks ${pod} ${ns} ${extra_cni_name}\n ${extra_ip}= Set Variable ${networks}[1][ips][0]\n Should Contain ${extra_ip} 192.168.112\n\n ${result}= Process.Run Process curl -v ${extra_ip}:8080\n Should Contain ${result.stdout} Hello MicroShift","name":"Connect To Pod From The Hypervisor","imports_file_locations":"{'..\/..\/resources\/multus.resource': 'test\/resources\/multus.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/optional\/multus.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${pod} ${ns} ${extra_cni_name}"} {"code":"Interface Should Not Exist\n [Documentation] Verifies that network interface does not exist.\n [Arguments] ${if}\n Command Should Fail ip link show ${if}","name":"Interface Should Not Exist","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/optional\/multus.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${if}"} {"code":"Create Interface\n [Documentation] Creates network interface.\n [Arguments] ${if} ${type}=bridge\n Command Should Work ip link add dev ${if} type ${type}","name":"Create Interface","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/optional\/multus.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${if} ${type}=bridge"} {"code":"Interface Should Exist\n [Documentation] Verifies that interface exists on the host.\n [Arguments] ${if}\n Command Should Work ip link show ${if}","name":"Interface Should Exist","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/optional\/multus.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${if}"} {"code":"*** Settings ***\nDocumentation Operator Lifecycle Manager on MicroShift\n\nResource ..\/..\/resources\/common.resource\nResource ..\/..\/resources\/microshift-process.resource\nResource ..\/..\/resources\/microshift-rpm.resource\n\nSuite Setup Setup\nSuite Teardown Teardown\n\n\n*** Variables ***\n${CATALOG_SOURCE} .\/assets\/olm\/catalog-source.yaml\n${SUBSCRIPTION} .\/assets\/olm\/subscription.yaml\n${SUBSCRIPTION_NAME} amq-broker\n${MARKETPLACE_NAMESPACE} openshift-marketplace\n${OPERATORS_NAMESPACE} openshift-operators\n\n\n*** Test Cases ***\nDeploy AmqBroker From Red Hat Operators catalog\n [Documentation] Deploy AMQ Broker from Red Hat Operators catalog.\n [Setup] Run Keywords\n ... OLM Should Be Ready\n ... Create CatalogSource\n ... Create Subscription\n\n ${csv}= Get CSV Name From Subscription ${OPERATORS_NAMESPACE} ${SUBSCRIPTION_NAME}\n Wait For CSV ${OPERATORS_NAMESPACE} ${csv}\n @{deployments}= Get Deployments From CSV ${OPERATORS_NAMESPACE} ${csv}\n Wait For Deployments ${OPERATORS_NAMESPACE} @{deployments}\n\n [Teardown] Run Keywords\n ... Delete CatalogSource\n ... AND\n ... Delete Subscription\n ... AND\n ... Delete CSV ${OPERATORS_NAMESPACE} ${csv}\n ... AND\n ... Wait For Deployments Deletion @{deployments}\n\n\n*** Keywords ***\nSetup\n [Documentation] Test suite setup\n Check Required Env Variables\n Login MicroShift Host\n Setup Kubeconfig\n Verify MicroShift RPM Install\n\nTeardown\n [Documentation] Test suite teardown\n Logout MicroShift Host\n Remove Kubeconfig\n\nOLM Should Be Ready\n [Documentation] Verify that OLM is running.\n Named Deployment Should Be Available catalog-operator openshift-operator-lifecycle-manager\n Named Deployment Should Be Available olm-operator openshift-operator-lifecycle-manager\n\nCreate CatalogSource\n [Documentation] Create CatalogSource resource with Red Hat Community Catalog Index.\n Oc Create -f ${CATALOG_SOURCE}\n Wait Until Keyword Succeeds 120s 5s\n ... CatalogSource Should Be Ready ${MARKETPLACE_NAMESPACE} redhat-operators\n\nCatalogSource Should Be Ready\n [Documentation] Checks if CatalogSource is ready.\n [Arguments] ${namespace} ${name}\n ${catalog}= Oc Get catalogsources ${namespace} ${name}\n Should Be Equal As Strings READY ${catalog.status.connectionState.lastObservedState}\n\nCreate Subscription\n [Documentation] Creates subscription.\n Oc Create -f ${SUBSCRIPTION}\n Wait Until Keyword Succeeds 120s 5s\n ... Subscription Should Be AtLatestKnown ${OPERATORS_NAMESPACE} ${SUBSCRIPTION_NAME}\n\nSubscription Should Be AtLatestKnown\n [Documentation] Checks if subscription has state \"AtLeastKnown\"\n [Arguments] ${namespace} ${name}\n ${sub}= Oc Get subscriptions.operators.coreos.com ${namespace} ${name}\n Should Be Equal As Strings AtLatestKnown ${sub.status.state}\n\nGet CSV Name From Subscription\n [Documentation] Obtains Subscription's CSV name.\n [Arguments] ${namespace} ${name}\n ${sub}= Oc Get subscriptions.operators.coreos.com ${OPERATORS_NAMESPACE} ${SUBSCRIPTION_NAME}\n RETURN ${sub.status.currentCSV}\n\nWait For CSV\n [Documentation] Waits for ready CSV.\n [Arguments] ${namespace} ${name}\n\n Wait Until Keyword Succeeds 120s 5s\n ... CSV Should Be Succeeded ${namespace} ${name}\n\nCSV Should Be Succeeded\n [Documentation] Verifies that phase of CSV is \"Succeeded\".\n [Arguments] ${namespace} ${name}\n ${csv_phase}= Oc Get JsonPath csv ${namespace} ${name} .status.phase\n Should Be Equal As Strings Succeeded ${csv_phase}\n\nGet Deployments From CSV\n [Documentation] Obtains list of Deployments created by CSV.\n [Arguments] ${namespace} ${name}\n ${csv_dss}= Oc Get JsonPath\n ... csv\n ... ${namespace}\n ... ${name}\n ... .spec.install.spec.deployments[*].name\n @{deployments}= Split String ${csv_dss} ${SPACE}\n RETURN @{deployments}\n\nWait For Deployments\n [Documentation] Waits for availability of Deployments.\n [Arguments] ${namespace} @{deployments}\n FOR ${deploy} IN @{deployments}\n Named Deployment Should Be Available ${deploy} ${namespace} 120s\n END\n\nDelete CatalogSource\n [Documentation] Delete CatalogSource.\n Oc Delete -f ${CATALOG_SOURCE}\n\nDelete Subscription\n [Documentation] Delete Subscription.\n Oc Delete -f ${SUBSCRIPTION}\n\nDelete CSV\n [Documentation] Delete CSV.\n [Arguments] ${namespace} ${name}\n Oc Delete csv -n ${namespace} ${name}\n\nWait For Deployments Deletion\n [Documentation] Wait for Deployments to be deleted.\n [Arguments] ${namespace} @{deployments}\n FOR ${deploy} IN @{deployments}\n Run With Kubeconfig kubectl wait deployment --for=delete -n ${namespace} ${deploy} --timeout=60s\n END\n","name":"\/tmp\/repos\/microshift\/test\/suites\/optional\/olm.robot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/optional\/olm.robot","element_type":"test","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Deploy AmqBroker From Red Hat Operators catalog\n [Documentation] Deploy AMQ Broker from Red Hat Operators catalog.\n [Setup] Run Keywords\n ... OLM Should Be Ready\n ... Create CatalogSource\n ... Create Subscription\n\n ${csv}= Get CSV Name From Subscription ${OPERATORS_NAMESPACE} ${SUBSCRIPTION_NAME}\n Wait For CSV ${OPERATORS_NAMESPACE} ${csv}\n @{deployments}= Get Deployments From CSV ${OPERATORS_NAMESPACE} ${csv}\n Wait For Deployments ${OPERATORS_NAMESPACE} @{deployments}\n\n [Teardown] Run Keywords\n ... Delete CatalogSource\n ... AND\n ... Delete Subscription\n ... AND\n ... Delete CSV ${OPERATORS_NAMESPACE} ${csv}\n ... AND\n ... Wait For Deployments Deletion @{deployments}","name":"Deploy AmqBroker From Red Hat Operators catalog","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/optional\/olm.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'OPERATORS_NAMESPACE': {'text': '${OPERATORS_NAMESPACE} openshift-operators'}, 'SUBSCRIPTION_NAME': {'text': '${SUBSCRIPTION_NAME} amq-broker'}}","documentation":""} {"code":"Setup\n [Documentation] Test suite setup\n Check Required Env Variables\n Login MicroShift Host\n Setup Kubeconfig\n Verify MicroShift RPM Install","name":"Setup","imports_file_locations":"{'..\/..\/resources\/microshift-rpm.resource': 'test\/resources\/microshift-rpm.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/optional\/olm.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Check Required Env Variables"} {"code":"Teardown\n [Documentation] Test suite teardown\n Logout MicroShift Host\n Remove Kubeconfig","name":"Teardown","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/optional\/olm.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Logout MicroShift Host"} {"code":"OLM Should Be Ready\n [Documentation] Verify that OLM is running.\n Named Deployment Should Be Available catalog-operator openshift-operator-lifecycle-manager\n Named Deployment Should Be Available olm-operator openshift-operator-lifecycle-manager","name":"OLM Should Be Ready","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/optional\/olm.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Named Deployment Should Be Available catalog-operator openshift-operator-lifecycle-manager"} {"code":"Create CatalogSource\n [Documentation] Create CatalogSource resource with Red Hat Community Catalog Index.\n Oc Create -f ${CATALOG_SOURCE}\n Wait Until Keyword Succeeds 120s 5s\n ... CatalogSource Should Be Ready ${MARKETPLACE_NAMESPACE} redhat-operators","name":"Create CatalogSource","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/optional\/olm.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'CATALOG_SOURCE': {'text': '${CATALOG_SOURCE} .\/assets\/olm\/catalog-source.yaml'}, 'MARKETPLACE_NAMESPACE': {'text': '${MARKETPLACE_NAMESPACE} openshift-marketplace'}}","documentation":"Oc Create -f ${CATALOG_SOURCE}"} {"code":"CatalogSource Should Be Ready\n [Documentation] Checks if CatalogSource is ready.\n [Arguments] ${namespace} ${name}\n ${catalog}= Oc Get catalogsources ${namespace} ${name}\n Should Be Equal As Strings READY ${catalog.status.connectionState.lastObservedState}","name":"CatalogSource Should Be Ready","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/optional\/olm.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${namespace} ${name}"} {"code":"Create Subscription\n [Documentation] Creates subscription.\n Oc Create -f ${SUBSCRIPTION}\n Wait Until Keyword Succeeds 120s 5s\n ... Subscription Should Be AtLatestKnown ${OPERATORS_NAMESPACE} ${SUBSCRIPTION_NAME}","name":"Create Subscription","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/optional\/olm.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'SUBSCRIPTION': {'text': '${SUBSCRIPTION} .\/assets\/olm\/subscription.yaml'}, 'OPERATORS_NAMESPACE': {'text': '${OPERATORS_NAMESPACE} openshift-operators'}, 'SUBSCRIPTION_NAME': {'text': '${SUBSCRIPTION_NAME} amq-broker'}}","documentation":"Oc Create -f ${SUBSCRIPTION}"} {"code":"Subscription Should Be AtLatestKnown\n [Documentation] Checks if subscription has state \"AtLeastKnown\"\n [Arguments] ${namespace} ${name}\n ${sub}= Oc Get subscriptions.operators.coreos.com ${namespace} ${name}\n Should Be Equal As Strings AtLatestKnown ${sub.status.state}","name":"Subscription Should Be AtLatestKnown","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/optional\/olm.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${namespace} ${name}"} {"code":"Get CSV Name From Subscription\n [Documentation] Obtains Subscription's CSV name.\n [Arguments] ${namespace} ${name}\n ${sub}= Oc Get subscriptions.operators.coreos.com ${OPERATORS_NAMESPACE} ${SUBSCRIPTION_NAME}\n RETURN ${sub.status.currentCSV}","name":"Get CSV Name From Subscription","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/optional\/olm.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'OPERATORS_NAMESPACE': {'text': '${OPERATORS_NAMESPACE} openshift-operators'}, 'SUBSCRIPTION_NAME': {'text': '${SUBSCRIPTION_NAME} amq-broker'}}","documentation":"[Arguments] ${namespace} ${name}"} {"code":"Wait For CSV\n [Documentation] Waits for ready CSV.\n [Arguments] ${namespace} ${name}\n\n Wait Until Keyword Succeeds 120s 5s\n ... CSV Should Be Succeeded ${namespace} ${name}","name":"Wait For CSV","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/optional\/olm.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${namespace} ${name}"} {"code":"CSV Should Be Succeeded\n [Documentation] Verifies that phase of CSV is \"Succeeded\".\n [Arguments] ${namespace} ${name}\n ${csv_phase}= Oc Get JsonPath csv ${namespace} ${name} .status.phase\n Should Be Equal As Strings Succeeded ${csv_phase}","name":"CSV Should Be Succeeded","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/optional\/olm.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${namespace} ${name}"} {"code":"Get Deployments From CSV\n [Documentation] Obtains list of Deployments created by CSV.\n [Arguments] ${namespace} ${name}\n ${csv_dss}= Oc Get JsonPath\n ... csv\n ... ${namespace}\n ... ${name}\n ... .spec.install.spec.deployments[*].name\n @{deployments}= Split String ${csv_dss} ${SPACE}\n RETURN @{deployments}","name":"Get Deployments From CSV","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/optional\/olm.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${namespace} ${name}"} {"code":"Wait For Deployments\n [Documentation] Waits for availability of Deployments.\n [Arguments] ${namespace} @{deployments}\n FOR ${deploy} IN @{deployments}\n Named Deployment Should Be Available ${deploy} ${namespace} 120s\n END","name":"Wait For Deployments","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/optional\/olm.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${namespace} @{deployments}"} {"code":"Delete CatalogSource\n [Documentation] Delete CatalogSource.\n Oc Delete -f ${CATALOG_SOURCE}","name":"Delete CatalogSource","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/optional\/olm.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'CATALOG_SOURCE': {'text': '${CATALOG_SOURCE} .\/assets\/olm\/catalog-source.yaml'}}","documentation":"Oc Delete -f ${CATALOG_SOURCE}"} {"code":"Delete Subscription\n [Documentation] Delete Subscription.\n Oc Delete -f ${SUBSCRIPTION}","name":"Delete Subscription","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/optional\/olm.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'SUBSCRIPTION': {'text': '${SUBSCRIPTION} .\/assets\/olm\/subscription.yaml'}}","documentation":"Oc Delete -f ${SUBSCRIPTION}"} {"code":"Delete CSV\n [Documentation] Delete CSV.\n [Arguments] ${namespace} ${name}\n Oc Delete csv -n ${namespace} ${name}","name":"Delete CSV","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/optional\/olm.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${namespace} ${name}"} {"code":"Wait For Deployments Deletion\n [Documentation] Wait for Deployments to be deleted.\n [Arguments] ${namespace} @{deployments}\n FOR ${deploy} IN @{deployments}\n Run With Kubeconfig kubectl wait deployment --for=delete -n ${namespace} ${deploy} --timeout=60s\n END","name":"Wait For Deployments Deletion","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/optional\/olm.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${namespace} @{deployments}"} {"code":"*** Settings ***\nDocumentation Tests verifying microshift-cleanup-data script functionality\n\nResource ..\/..\/resources\/common.resource\nResource ..\/..\/resources\/systemd.resource\nResource ..\/..\/resources\/ostree.resource\nResource ..\/..\/resources\/ostree-health.resource\nResource ..\/..\/resources\/microshift-config.resource\nResource ..\/..\/resources\/microshift-network.resource\nResource ..\/..\/resources\/kubeconfig.resource\n\nSuite Setup Setup Suite\n\nTest Tags slow\n\n\n*** Test Cases ***\nVerify Invalid Command Line\n [Documentation] Verify invalid command line combinations\n\n # Usage message\n ${rc}= Run MicroShift Cleanup Data ${EMPTY}\n Should Not Be Equal As Integers ${rc} 0\n\n # Invalid option combination\n ${rc}= Run MicroShift Cleanup Data --ovn --keep-images\n Should Not Be Equal As Integers ${rc} 0\n\n ${rc}= Run MicroShift Cleanup Data --all --ovn\n Should Not Be Equal As Integers ${rc} 0\n\n ${rc}= Run MicroShift Cleanup Data --all --cert\n Should Not Be Equal As Integers ${rc} 0\n\n ${rc}= Run MicroShift Cleanup Data --ovn --cert\n Should Not Be Equal As Integers ${rc} 0\n\n ${rc}= Run MicroShift Cleanup Data --keep-images\n Should Not Be Equal As Integers ${rc} 0\n\nVerify Full Cleanup Data\n [Documentation] Verify full data clean scenarios\n [Setup] Run Keywords\n ... Setup Suite With Namespace\n ... Create Hello MicroShift Pod\n\n ${rc}= Run MicroShift Cleanup Data --all\n Should Be Equal As Integers ${rc} 0\n\n MicroShift Processes Should Not Exist\n Verify Remote Directory Does Not Exist With Sudo \/var\/lib\/microshift\n Verify Remote Directory Exists With Sudo \/var\/lib\/microshift-backups\n\n Crio Containers Should Not Exist\n Crio Pods Should Not Exist\n Crio Images Should Not Exist\n\n OVN Processes Should Not Exist\n OVN Data Should Not Exist\n OVN Internal Bridge Should Not Exist\n\n [Teardown] Run Keywords\n ... Run MicroShift Test Case Teardown\n\nVerify Keep Images Cleanup Data\n [Documentation] Verify keep images data clean scenario\n [Setup] Run Keywords\n ... Setup Suite With Namespace\n ... Create Hello MicroShift Pod\n\n ${rc}= Run MicroShift Cleanup Data --keep-images --all\n Should Be Equal As Integers ${rc} 0\n\n MicroShift Processes Should Not Exist\n Verify Remote Directory Does Not Exist With Sudo \/var\/lib\/microshift\n Verify Remote Directory Exists With Sudo \/var\/lib\/microshift-backups\n\n Crio Containers Should Not Exist\n Crio Pods Should Not Exist\n Crio Images Should Exist\n\n OVN Processes Should Not Exist\n OVN Data Should Not Exist\n OVN Internal Bridge Should Not Exist\n\n [Teardown] Run Keywords\n ... Run MicroShift Test Case Teardown\n\nVerify OVN Cleanup Data\n [Documentation] Verify OVN data cleanup scenario\n [Setup] Run Keywords\n ... Setup Suite With Namespace\n ... Create Hello MicroShift Pod\n\n ${rc}= Run MicroShift Cleanup Data --ovn\n Should Be Equal As Integers ${rc} 0\n\n MicroShift Processes Should Not Exist\n Verify Remote Directory Exists With Sudo \/var\/lib\/microshift\n Verify Remote Directory Exists With Sudo \/var\/lib\/microshift\/certs\n Verify Remote Directory Exists With Sudo \/var\/lib\/microshift-backups\n\n Crio Containers Should Not Exist\n Crio Pods Should Not Exist\n Crio Images Should Exist\n\n OVN Processes Should Not Exist\n OVN Data Should Not Exist\n OVN Internal Bridge Should Not Exist\n\n [Teardown] Run Keywords\n ... Run MicroShift Test Case Teardown\n\nVerify Cert Cleanup Data\n [Documentation] Verify certificate data cleanup scenario\n [Setup] Run Keywords\n ... Setup Suite With Namespace\n ... Create Hello MicroShift Pod\n\n ${rc}= Run MicroShift Cleanup Data --cert\n Should Be Equal As Integers ${rc} 0\n\n MicroShift Processes Should Not Exist\n Verify Remote Directory Exists With Sudo \/var\/lib\/microshift\n Verify Remote Directory Does Not Exist With Sudo \/var\/lib\/microshift\/certs\n Verify Remote Directory Exists With Sudo \/var\/lib\/microshift-backups\n\n Crio Containers Should Not Exist\n Crio Pods Should Not Exist\n Crio Images Should Exist\n\n OVN Processes Should Exist\n OVN Data Should Exist\n OVN Internal Bridge Should Exist\n\n [Teardown] Run Keywords\n ... Run MicroShift Test Case Teardown\n\n\n*** Keywords ***\nSetup Suite\n [Documentation] Set up all of the tests in this suite\n Check Required Env Variables\n Login MicroShift Host\n Start MicroShift And Wait Until Ready\n\nStart MicroShift And Wait Until Ready\n [Documentation] Start the service and wait until fully initialized\n Systemctl enable microshift\n Systemctl start microshift\n Restart Greenboot And Wait For Success\n\nRun MicroShift Cleanup Data\n [Documentation] Run the microshift-cleanup-data script and\n ... return its exit code\n [Arguments] ${cmd} ${opt}=${EMPTY}\n ${stdout} ${stderr} ${rc}= Execute Command\n ... echo 1 | sudo microshift-cleanup-data ${cmd} ${opt}\n ... return_stdout=True return_stderr=True return_rc=True\n RETURN ${rc}\n\nRun MicroShift Test Case Teardown\n [Documentation] Run the microshift-cleanup-data script and restart\n ... the service to ensure clean startup of other tests\n # Try keeping the images to save on restart times\n ${rc}= Run MicroShift Cleanup Data --keep-images --all\n Should Be Equal As Integers ${rc} 0\n Start MicroShift And Wait Until Ready\n\nMicroShift Processes Should Not Exist\n [Documentation] Make sure that MicroShift and Etcd services are not running\n\n # MicroShift service and Etcd process should be down\n ${stdout} ${stderr} ${rc}= Execute Command\n ... pidof microshift microshift-etcd\n ... return_stdout=True return_stderr=True return_rc=True\n Should Not Be Equal As Integers ${rc} 0\n\nCrio Containers Should Not Exist\n [Documentation] Make sure cri-o containers do not exist\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... crictl ps -a | wc -l\n ... sudo=True return_stdout=True return_stderr=True return_rc=True\n Should Be Equal As Integers ${rc} 0\n Should Be Equal As Integers ${stdout} 1\n\nCrio Pods Should Not Exist\n [Documentation] Make sure cri-o pods do not exist\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... crictl pods | wc -l\n ... sudo=True return_stdout=True return_stderr=True return_rc=True\n Should Be Equal As Integers ${rc} 0\n Should Be Equal As Integers ${stdout} 1\n\nCrio Images Should Exist\n [Documentation] Make sure cri-o images exist\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... crictl images | wc -l\n ... sudo=True return_stdout=True return_stderr=True return_rc=True\n Should Be Equal As Integers ${rc} 0\n\n ${stdout_int}= Convert To Integer ${stdout}\n Should Be True ${stdout_int} > 1\n\nCrio Images Should Not Exist\n [Documentation] Make sure cri-o images do not exist\n\n ${status}= Run Keyword And Return Status\n ... Crio Images Should Exist\n Should Not Be True ${status}\n\nOVN Processes Should Not Exist\n [Documentation] Make sure that OVN processes are not running\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... pidof conmon pause ovn-controller ovn-northd ovsdb-server\n ... return_stdout=True return_stderr=True return_rc=True\n Should Not Be Equal As Integers ${rc} 0\n\nOVN Processes Should Exist\n [Documentation] Make sure that OVN processes are running\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... pidof conmon pause ovn-controller ovn-northd ovsdb-server\n ... return_stdout=True return_stderr=True return_rc=True\n Should Be Equal As Integers ${rc} 0\n\nOVN Data Should Not Exist\n [Documentation] Make sure that OVN data files and directories are deleted\n\n # OVN data directories and files should be deleted\n Verify Remote Directory Does Not Exist With Sudo \/var\/run\/ovn\n Verify Remote Directory Does Not Exist With Sudo \/var\/run\/ovn-kubernetes\n Verify Remote File Does Not Exist With Sudo \/etc\/cni\/net.d\/10-ovn-kubernetes.conf\n Verify Remote File Does Not Exist With Sudo \/run\/cni\/bin\/ovn-k8s-cni-overlay\n\nOVN Data Should Exist\n [Documentation] Make sure that OVN data files and directories exist\n\n # OVN data directories and files should be deleted\n Verify Remote Directory Exists With Sudo \/var\/run\/ovn\n Verify Remote Directory Exists With Sudo \/var\/run\/ovn-kubernetes\n Verify Remote File Exists With Sudo \/etc\/cni\/net.d\/10-ovn-kubernetes.conf\n Verify Remote File Exists With Sudo \/run\/cni\/bin\/ovn-k8s-cni-overlay\n\nOVN Internal Bridge Should Not Exist\n [Documentation] Make sure that OVN internal bridge devices do not exist\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... ovs-vsctl br-exists br-int\n ... sudo=True return_stdout=True return_stderr=True return_rc=True\n Should Not Be Equal As Integers ${rc} 0\n\nOVN Internal Bridge Should Exist\n [Documentation] Make sure that OVN internal bridge devices exist\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... ovs-vsctl br-exists br-int\n ... sudo=True return_stdout=True return_stderr=True return_rc=True\n Should Be Equal As Integers ${rc} 0\n","name":"\/tmp\/repos\/microshift\/test\/suites\/osconfig\/cleanup-data.robot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/cleanup-data.robot","element_type":"test","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Verify Invalid Command Line\n [Documentation] Verify invalid command line combinations\n\n # Usage message\n ${rc}= Run MicroShift Cleanup Data ${EMPTY}\n Should Not Be Equal As Integers ${rc} 0\n\n # Invalid option combination\n ${rc}= Run MicroShift Cleanup Data --ovn --keep-images\n Should Not Be Equal As Integers ${rc} 0\n\n ${rc}= Run MicroShift Cleanup Data --all --ovn\n Should Not Be Equal As Integers ${rc} 0\n\n ${rc}= Run MicroShift Cleanup Data --all --cert\n Should Not Be Equal As Integers ${rc} 0\n\n ${rc}= Run MicroShift Cleanup Data --ovn --cert\n Should Not Be Equal As Integers ${rc} 0\n\n ${rc}= Run MicroShift Cleanup Data --keep-images\n Should Not Be Equal As Integers ${rc} 0","name":"Verify Invalid Command Line","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/cleanup-data.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Verify Full Cleanup Data\n [Documentation] Verify full data clean scenarios\n [Setup] Run Keywords\n ... Setup Suite With Namespace\n ... Create Hello MicroShift Pod\n\n ${rc}= Run MicroShift Cleanup Data --all\n Should Be Equal As Integers ${rc} 0\n\n MicroShift Processes Should Not Exist\n Verify Remote Directory Does Not Exist With Sudo \/var\/lib\/microshift\n Verify Remote Directory Exists With Sudo \/var\/lib\/microshift-backups\n\n Crio Containers Should Not Exist\n Crio Pods Should Not Exist\n Crio Images Should Not Exist\n\n OVN Processes Should Not Exist\n OVN Data Should Not Exist\n OVN Internal Bridge Should Not Exist\n\n [Teardown] Run Keywords\n ... Run MicroShift Test Case Teardown","name":"Verify Full Cleanup Data","imports_file_locations":"{'..\/..\/resources\/common.resource': 'test\/resources\/common.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/cleanup-data.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Verify Keep Images Cleanup Data\n [Documentation] Verify keep images data clean scenario\n [Setup] Run Keywords\n ... Setup Suite With Namespace\n ... Create Hello MicroShift Pod\n\n ${rc}= Run MicroShift Cleanup Data --keep-images --all\n Should Be Equal As Integers ${rc} 0\n\n MicroShift Processes Should Not Exist\n Verify Remote Directory Does Not Exist With Sudo \/var\/lib\/microshift\n Verify Remote Directory Exists With Sudo \/var\/lib\/microshift-backups\n\n Crio Containers Should Not Exist\n Crio Pods Should Not Exist\n Crio Images Should Exist\n\n OVN Processes Should Not Exist\n OVN Data Should Not Exist\n OVN Internal Bridge Should Not Exist\n\n [Teardown] Run Keywords\n ... Run MicroShift Test Case Teardown","name":"Verify Keep Images Cleanup Data","imports_file_locations":"{'..\/..\/resources\/common.resource': 'test\/resources\/common.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/cleanup-data.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Verify OVN Cleanup Data\n [Documentation] Verify OVN data cleanup scenario\n [Setup] Run Keywords\n ... Setup Suite With Namespace\n ... Create Hello MicroShift Pod\n\n ${rc}= Run MicroShift Cleanup Data --ovn\n Should Be Equal As Integers ${rc} 0\n\n MicroShift Processes Should Not Exist\n Verify Remote Directory Exists With Sudo \/var\/lib\/microshift\n Verify Remote Directory Exists With Sudo \/var\/lib\/microshift\/certs\n Verify Remote Directory Exists With Sudo \/var\/lib\/microshift-backups\n\n Crio Containers Should Not Exist\n Crio Pods Should Not Exist\n Crio Images Should Exist\n\n OVN Processes Should Not Exist\n OVN Data Should Not Exist\n OVN Internal Bridge Should Not Exist\n\n [Teardown] Run Keywords\n ... Run MicroShift Test Case Teardown","name":"Verify OVN Cleanup Data","imports_file_locations":"{'..\/..\/resources\/common.resource': 'test\/resources\/common.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/cleanup-data.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Verify Cert Cleanup Data\n [Documentation] Verify certificate data cleanup scenario\n [Setup] Run Keywords\n ... Setup Suite With Namespace\n ... Create Hello MicroShift Pod\n\n ${rc}= Run MicroShift Cleanup Data --cert\n Should Be Equal As Integers ${rc} 0\n\n MicroShift Processes Should Not Exist\n Verify Remote Directory Exists With Sudo \/var\/lib\/microshift\n Verify Remote Directory Does Not Exist With Sudo \/var\/lib\/microshift\/certs\n Verify Remote Directory Exists With Sudo \/var\/lib\/microshift-backups\n\n Crio Containers Should Not Exist\n Crio Pods Should Not Exist\n Crio Images Should Exist\n\n OVN Processes Should Exist\n OVN Data Should Exist\n OVN Internal Bridge Should Exist\n\n [Teardown] Run Keywords\n ... Run MicroShift Test Case Teardown","name":"Verify Cert Cleanup Data","imports_file_locations":"{'..\/..\/resources\/common.resource': 'test\/resources\/common.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/cleanup-data.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Setup Suite\n [Documentation] Set up all of the tests in this suite\n Check Required Env Variables\n Login MicroShift Host\n Start MicroShift And Wait Until Ready","name":"Setup Suite","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/cleanup-data.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Check Required Env Variables"} {"code":"Start MicroShift And Wait Until Ready\n [Documentation] Start the service and wait until fully initialized\n Systemctl enable microshift\n Systemctl start microshift\n Restart Greenboot And Wait For Success","name":"Start MicroShift And Wait Until Ready","imports_file_locations":"{'..\/..\/resources\/ostree-health.resource': 'test\/resources\/ostree-health.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/cleanup-data.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Systemctl enable microshift"} {"code":"Run MicroShift Cleanup Data\n [Documentation] Run the microshift-cleanup-data script and\n ... return its exit code\n [Arguments] ${cmd} ${opt}=${EMPTY}\n ${stdout} ${stderr} ${rc}= Execute Command\n ... echo 1 | sudo microshift-cleanup-data ${cmd} ${opt}\n ... return_stdout=True return_stderr=True return_rc=True\n RETURN ${rc}","name":"Run MicroShift Cleanup Data","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/cleanup-data.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"return its exit code"} {"code":"Run MicroShift Test Case Teardown\n [Documentation] Run the microshift-cleanup-data script and restart\n ... the service to ensure clean startup of other tests\n # Try keeping the images to save on restart times\n ${rc}= Run MicroShift Cleanup Data --keep-images --all\n Should Be Equal As Integers ${rc} 0\n Start MicroShift And Wait Until Ready","name":"Run MicroShift Test Case Teardown","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/cleanup-data.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"the service to ensure clean startup of other tests"} {"code":"MicroShift Processes Should Not Exist\n [Documentation] Make sure that MicroShift and Etcd services are not running\n\n # MicroShift service and Etcd process should be down\n ${stdout} ${stderr} ${rc}= Execute Command\n ... pidof microshift microshift-etcd\n ... return_stdout=True return_stderr=True return_rc=True\n Should Not Be Equal As Integers ${rc} 0","name":"MicroShift Processes Should Not Exist","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/cleanup-data.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Make sure that MicroShift and Etcd services are not running"} {"code":"Crio Containers Should Not Exist\n [Documentation] Make sure cri-o containers do not exist\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... crictl ps -a | wc -l\n ... sudo=True return_stdout=True return_stderr=True return_rc=True\n Should Be Equal As Integers ${rc} 0\n Should Be Equal As Integers ${stdout} 1","name":"Crio Containers Should Not Exist","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/cleanup-data.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${stdout} ${stderr} ${rc}= Execute Command\n ... crictl ps -a | wc -l\n ... sudo=True return_stdout=True return_stderr=True return_rc=True"} {"code":"Crio Pods Should Not Exist\n [Documentation] Make sure cri-o pods do not exist\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... crictl pods | wc -l\n ... sudo=True return_stdout=True return_stderr=True return_rc=True\n Should Be Equal As Integers ${rc} 0\n Should Be Equal As Integers ${stdout} 1","name":"Crio Pods Should Not Exist","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/cleanup-data.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${stdout} ${stderr} ${rc}= Execute Command\n ... crictl pods | wc -l\n ... sudo=True return_stdout=True return_stderr=True return_rc=True"} {"code":"Crio Images Should Exist\n [Documentation] Make sure cri-o images exist\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... crictl images | wc -l\n ... sudo=True return_stdout=True return_stderr=True return_rc=True\n Should Be Equal As Integers ${rc} 0\n\n ${stdout_int}= Convert To Integer ${stdout}\n Should Be True ${stdout_int} > 1","name":"Crio Images Should Exist","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/cleanup-data.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${stdout} ${stderr} ${rc}= Execute Command\n ... crictl images | wc -l\n ... sudo=True return_stdout=True return_stderr=True return_rc=True"} {"code":"Crio Images Should Not Exist\n [Documentation] Make sure cri-o images do not exist\n\n ${status}= Run Keyword And Return Status\n ... Crio Images Should Exist\n Should Not Be True ${status}","name":"Crio Images Should Not Exist","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/cleanup-data.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${status}= Run Keyword And Return Status\n ... Crio Images Should Exist"} {"code":"OVN Processes Should Not Exist\n [Documentation] Make sure that OVN processes are not running\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... pidof conmon pause ovn-controller ovn-northd ovsdb-server\n ... return_stdout=True return_stderr=True return_rc=True\n Should Not Be Equal As Integers ${rc} 0","name":"OVN Processes Should Not Exist","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/cleanup-data.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${stdout} ${stderr} ${rc}= Execute Command\n ... pidof conmon pause ovn-controller ovn-northd ovsdb-server\n ... return_stdout=True return_stderr=True return_rc=True"} {"code":"OVN Processes Should Exist\n [Documentation] Make sure that OVN processes are running\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... pidof conmon pause ovn-controller ovn-northd ovsdb-server\n ... return_stdout=True return_stderr=True return_rc=True\n Should Be Equal As Integers ${rc} 0","name":"OVN Processes Should Exist","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/cleanup-data.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${stdout} ${stderr} ${rc}= Execute Command\n ... pidof conmon pause ovn-controller ovn-northd ovsdb-server\n ... return_stdout=True return_stderr=True return_rc=True"} {"code":"OVN Data Should Not Exist\n [Documentation] Make sure that OVN data files and directories are deleted\n\n # OVN data directories and files should be deleted\n Verify Remote Directory Does Not Exist With Sudo \/var\/run\/ovn\n Verify Remote Directory Does Not Exist With Sudo \/var\/run\/ovn-kubernetes\n Verify Remote File Does Not Exist With Sudo \/etc\/cni\/net.d\/10-ovn-kubernetes.conf\n Verify Remote File Does Not Exist With Sudo \/run\/cni\/bin\/ovn-k8s-cni-overlay","name":"OVN Data Should Not Exist","imports_file_locations":"{'..\/..\/resources\/common.resource': 'test\/resources\/common.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/cleanup-data.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Make sure that OVN data files and directories are deleted"} {"code":"OVN Data Should Exist\n [Documentation] Make sure that OVN data files and directories exist\n\n # OVN data directories and files should be deleted\n Verify Remote Directory Exists With Sudo \/var\/run\/ovn\n Verify Remote Directory Exists With Sudo \/var\/run\/ovn-kubernetes\n Verify Remote File Exists With Sudo \/etc\/cni\/net.d\/10-ovn-kubernetes.conf\n Verify Remote File Exists With Sudo \/run\/cni\/bin\/ovn-k8s-cni-overlay","name":"OVN Data Should Exist","imports_file_locations":"{'..\/..\/resources\/common.resource': 'test\/resources\/common.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/cleanup-data.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Make sure that OVN data files and directories exist"} {"code":"OVN Internal Bridge Should Not Exist\n [Documentation] Make sure that OVN internal bridge devices do not exist\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... ovs-vsctl br-exists br-int\n ... sudo=True return_stdout=True return_stderr=True return_rc=True\n Should Not Be Equal As Integers ${rc} 0","name":"OVN Internal Bridge Should Not Exist","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/cleanup-data.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${stdout} ${stderr} ${rc}= Execute Command\n ... ovs-vsctl br-exists br-int\n ... sudo=True return_stdout=True return_stderr=True return_rc=True"} {"code":"OVN Internal Bridge Should Exist\n [Documentation] Make sure that OVN internal bridge devices exist\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... ovs-vsctl br-exists br-int\n ... sudo=True return_stdout=True return_stderr=True return_rc=True\n Should Be Equal As Integers ${rc} 0","name":"OVN Internal Bridge Should Exist","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/cleanup-data.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${stdout} ${stderr} ${rc}= Execute Command\n ... ovs-vsctl br-exists br-int\n ... sudo=True return_stdout=True return_stderr=True return_rc=True"} {"code":"*** Settings ***\nDocumentation Tests verifying MicroShift cluster ID functionality\n\nResource ..\/..\/resources\/microshift-host.resource\nResource ..\/..\/resources\/microshift-process.resource\nResource ..\/..\/resources\/oc.resource\nResource ..\/..\/resources\/ostree-health.resource\n\nSuite Setup Setup\nSuite Teardown Teardown\n\nTest Tags restart slow\n\n\n*** Variables ***\n${CLUSTERID_FILE} \/var\/lib\/microshift\/cluster-id\n${CLUSTERID_NS} kube-system\n\n\n*** Test Cases ***\nVerify Cluster ID Change For New Database\n [Documentation] Verify that cluster ID changes after MicroShift\n ... database is cleaned and service restarted\n\n ${old_nid}= Get MicroShift Cluster ID From Namespace\n ${old_fid}= Get MicroShift Cluster ID From File\n Create New MicroShift Cluster\n ${new_nid}= Get MicroShift Cluster ID From Namespace\n ${new_fid}= Get MicroShift Cluster ID From File\n\n Should Be Equal As Strings ${old_nid} ${old_fid}\n Should Be Equal As Strings ${new_nid} ${new_fid}\n\n Should Not Be Equal As Strings ${old_nid} ${new_nid}\n Should Not Be Equal As Strings ${old_fid} ${new_fid}\n\nVerify Sos Report Contains ID In kube-system Namespace\n [Documentation] Verify that cluster ID can be retrieved from Sos Report\n\n ${sos_report_tarfile}= Create Sos Report\n ${sos_report_id}= Get MicroShift Cluster ID From Sos Report ${sos_report_tarfile}\n ${id}= Get MicroShift Cluster ID From Namespace\n Should Be Equal As Strings ${sos_report_id} ${id}\n\nVerify Inconsistent Cluster ID Recovery\n [Documentation] Verify that cluster ID file is correctly rewritten\n ... on the service restart after manual tampering by a user.\n\n Tamper With Cluster ID File\n Restart MicroShift\n\n ${nid}= Get MicroShift Cluster ID From Namespace\n ${fid}= Get MicroShift Cluster ID From File\n Should Be Equal As Strings ${nid} ${fid}\n\nVerify Missing Cluster ID Recovery\n [Documentation] Verify that cluster ID file is correctly recreated\n ... on the service restart after manual removing by a user.\n\n Remove Cluster ID File\n Restart MicroShift\n\n ${nid}= Get MicroShift Cluster ID From Namespace\n ${fid}= Get MicroShift Cluster ID From File\n Should Be Equal As Strings ${nid} ${fid}\n\n\n*** Keywords ***\nSetup\n [Documentation] Set up all of the tests in this suite\n Check Required Env Variables\n Login MicroShift Host\n Setup Kubeconfig\n\nTeardown\n [Documentation] Test suite teardown\n Remove Kubeconfig\n Logout MicroShift Host\n\nCreate New MicroShift Cluster\n [Documentation] Clean the database and restart MicroShift service.\n Cleanup MicroShift --all --keep-images\n Enable MicroShift\n Start MicroShift\n Setup Kubeconfig\n Restart Greenboot And Wait For Success\n\nGet MicroShift Cluster ID From File\n [Documentation] Read and return the cluster ID from the file.\n ${id}= Command Should Work cat ${CLUSTERID_FILE}\n\n Should Not Be Empty ${id}\n RETURN ${id}\n\nGet MicroShift Cluster ID From Namespace\n [Documentation] Read and return the cluster ID from the kube-system namespace.\n ${clusterid}= Oc Get Jsonpath namespaces ${CLUSTERID_NS} ${CLUSTERID_NS} .metadata.uid\n\n Should Not Be Empty ${clusterid}\n RETURN ${clusterid}\n\nCreate Sos Report\n [Documentation] Create a MicroShift Sos Report and return the tar file path\n\n ${rand_str}= Generate Random String 4 [NUMBERS]\n ${sos_report_dir}= Catenate SEPARATOR= \/tmp\/rf-test\/sos-report_ ${rand_str}\n\n Command Should Work mkdir -p ${sos_report_dir}\n Command Should Work sos report --batch --all-logs --tmp-dir ${sos_report_dir} -p microshift -o logs\n ${sos_report_tarfile}= Command Should Work find ${sos_report_dir} -type f -name \"sosreport-*.tar.xz\"\n\n Should Not Be Empty ${sos_report_tarfile}\n RETURN ${sos_report_tarfile}\n\nGet MicroShift Cluster ID From Sos Report\n [Documentation] Read and return the Cluster ID from the kube-system namespace yaml description in the Sos Report.\n [Arguments] ${sos_report_tarfile}\n\n ${sos_report_untared}= Extract Sos Report ${sos_report_tarfile}\n ${output_yaml}= Command Should Work\n ... cat ${sos_report_untared}\/sos_commands\/microshift\/namespaces\/${CLUSTERID_NS}\/${CLUSTERID_NS}.yaml\n ${namespace_yaml}= Yaml Parse ${output_yaml}\n\n Should Not Be Empty ${namespace_yaml.metadata.uid}\n RETURN ${namespace_yaml.metadata.uid}\n\nExtract Sos Report\n [Documentation] Extract Sos Report from the tar file\n [Arguments] ${sos_report_tarfile}\n\n ${sos_report_dir} ${file}= Split Path ${sos_report_tarfile}\n ${sos_report_dir}= Command Should Work dirname ${sos_report_tarfile}\n Command Should Work tar xf ${sos_report_tarfile} -C ${sos_report_dir}\n ${sos_report_untared}= Command Should Work find ${sos_report_dir} -type d -name \"sosreport-*\"\n\n Should Not Be Empty ${sos_report_untared}\n RETURN ${sos_report_untared}\n\nTamper With Cluster ID File\n [Documentation] Append invalid characters to the cluster ID file.\n Command Should Work sed -i '$ s\/$\/123\/' ${CLUSTERID_FILE}\n\nRemove Cluster ID File\n [Documentation] Append invalid characters to the cluster ID file.\n Command Should Work rm -f ${CLUSTERID_FILE}\n","name":"\/tmp\/repos\/microshift\/test\/suites\/osconfig\/clusterid.robot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/clusterid.robot","element_type":"test","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Verify Cluster ID Change For New Database\n [Documentation] Verify that cluster ID changes after MicroShift\n ... database is cleaned and service restarted\n\n ${old_nid}= Get MicroShift Cluster ID From Namespace\n ${old_fid}= Get MicroShift Cluster ID From File\n Create New MicroShift Cluster\n ${new_nid}= Get MicroShift Cluster ID From Namespace\n ${new_fid}= Get MicroShift Cluster ID From File\n\n Should Be Equal As Strings ${old_nid} ${old_fid}\n Should Be Equal As Strings ${new_nid} ${new_fid}\n\n Should Not Be Equal As Strings ${old_nid} ${new_nid}\n Should Not Be Equal As Strings ${old_fid} ${new_fid}","name":"Verify Cluster ID Change For New Database","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/clusterid.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Verify Sos Report Contains ID In kube-system Namespace\n [Documentation] Verify that cluster ID can be retrieved from Sos Report\n\n ${sos_report_tarfile}= Create Sos Report\n ${sos_report_id}= Get MicroShift Cluster ID From Sos Report ${sos_report_tarfile}\n ${id}= Get MicroShift Cluster ID From Namespace\n Should Be Equal As Strings ${sos_report_id} ${id}","name":"Verify Sos Report Contains ID In kube-system Namespace","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/clusterid.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Verify Inconsistent Cluster ID Recovery\n [Documentation] Verify that cluster ID file is correctly rewritten\n ... on the service restart after manual tampering by a user.\n\n Tamper With Cluster ID File\n Restart MicroShift\n\n ${nid}= Get MicroShift Cluster ID From Namespace\n ${fid}= Get MicroShift Cluster ID From File\n Should Be Equal As Strings ${nid} ${fid}","name":"Verify Inconsistent Cluster ID Recovery","imports_file_locations":"{'..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/clusterid.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Verify Missing Cluster ID Recovery\n [Documentation] Verify that cluster ID file is correctly recreated\n ... on the service restart after manual removing by a user.\n\n Remove Cluster ID File\n Restart MicroShift\n\n ${nid}= Get MicroShift Cluster ID From Namespace\n ${fid}= Get MicroShift Cluster ID From File\n Should Be Equal As Strings ${nid} ${fid}","name":"Verify Missing Cluster ID Recovery","imports_file_locations":"{'..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/clusterid.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Setup\n [Documentation] Set up all of the tests in this suite\n Check Required Env Variables\n Login MicroShift Host\n Setup Kubeconfig","name":"Setup","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/clusterid.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Check Required Env Variables"} {"code":"Teardown\n [Documentation] Test suite teardown\n Remove Kubeconfig\n Logout MicroShift Host","name":"Teardown","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/clusterid.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Remove Kubeconfig"} {"code":"Create New MicroShift Cluster\n [Documentation] Clean the database and restart MicroShift service.\n Cleanup MicroShift --all --keep-images\n Enable MicroShift\n Start MicroShift\n Setup Kubeconfig\n Restart Greenboot And Wait For Success","name":"Create New MicroShift Cluster","imports_file_locations":"{'..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource', '..\/..\/resources\/ostree-health.resource': 'test\/resources\/ostree-health.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/clusterid.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Cleanup MicroShift --all --keep-images"} {"code":"Get MicroShift Cluster ID From File\n [Documentation] Read and return the cluster ID from the file.\n ${id}= Command Should Work cat ${CLUSTERID_FILE}\n\n Should Not Be Empty ${id}\n RETURN ${id}","name":"Get MicroShift Cluster ID From File","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/clusterid.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'CLUSTERID_FILE': {'text': '${CLUSTERID_FILE} \/var\/lib\/microshift\/cluster-id'}}","documentation":"${id}= Command Should Work cat ${CLUSTERID_FILE}"} {"code":"Get MicroShift Cluster ID From Namespace\n [Documentation] Read and return the cluster ID from the kube-system namespace.\n ${clusterid}= Oc Get Jsonpath namespaces ${CLUSTERID_NS} ${CLUSTERID_NS} .metadata.uid\n\n Should Not Be Empty ${clusterid}\n RETURN ${clusterid}","name":"Get MicroShift Cluster ID From Namespace","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/clusterid.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'CLUSTERID_NS': {'text': '${CLUSTERID_NS} kube-system'}}","documentation":"${clusterid}= Oc Get Jsonpath namespaces ${CLUSTERID_NS} ${CLUSTERID_NS} .metadata.uid"} {"code":"Create Sos Report\n [Documentation] Create a MicroShift Sos Report and return the tar file path\n\n ${rand_str}= Generate Random String 4 [NUMBERS]\n ${sos_report_dir}= Catenate SEPARATOR= \/tmp\/rf-test\/sos-report_ ${rand_str}\n\n Command Should Work mkdir -p ${sos_report_dir}\n Command Should Work sos report --batch --all-logs --tmp-dir ${sos_report_dir} -p microshift -o logs\n ${sos_report_tarfile}= Command Should Work find ${sos_report_dir} -type f -name \"sosreport-*.tar.xz\"\n\n Should Not Be Empty ${sos_report_tarfile}\n RETURN ${sos_report_tarfile}","name":"Create Sos Report","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/clusterid.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${rand_str}= Generate Random String 4 [NUMBERS]"} {"code":"Get MicroShift Cluster ID From Sos Report\n [Documentation] Read and return the Cluster ID from the kube-system namespace yaml description in the Sos Report.\n [Arguments] ${sos_report_tarfile}\n\n ${sos_report_untared}= Extract Sos Report ${sos_report_tarfile}\n ${output_yaml}= Command Should Work\n ... cat ${sos_report_untared}\/sos_commands\/microshift\/namespaces\/${CLUSTERID_NS}\/${CLUSTERID_NS}.yaml\n ${namespace_yaml}= Yaml Parse ${output_yaml}\n\n Should Not Be Empty ${namespace_yaml.metadata.uid}\n RETURN ${namespace_yaml.metadata.uid}","name":"Get MicroShift Cluster ID From Sos Report","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/clusterid.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'CLUSTERID_NS': {'text': '${CLUSTERID_NS} kube-system'}}","documentation":"[Arguments] ${sos_report_tarfile}"} {"code":"Extract Sos Report\n [Documentation] Extract Sos Report from the tar file\n [Arguments] ${sos_report_tarfile}\n\n ${sos_report_dir} ${file}= Split Path ${sos_report_tarfile}\n ${sos_report_dir}= Command Should Work dirname ${sos_report_tarfile}\n Command Should Work tar xf ${sos_report_tarfile} -C ${sos_report_dir}\n ${sos_report_untared}= Command Should Work find ${sos_report_dir} -type d -name \"sosreport-*\"\n\n Should Not Be Empty ${sos_report_untared}\n RETURN ${sos_report_untared}","name":"Extract Sos Report","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/clusterid.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${sos_report_tarfile}"} {"code":"Tamper With Cluster ID File\n [Documentation] Append invalid characters to the cluster ID file.\n Command Should Work sed -i '$ s\/$\/123\/' ${CLUSTERID_FILE}","name":"Tamper With Cluster ID File","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/clusterid.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'CLUSTERID_FILE': {'text': '${CLUSTERID_FILE} \/var\/lib\/microshift\/cluster-id'}}","documentation":"Command Should Work sed -i '$ s\/$\/123\/' ${CLUSTERID_FILE}"} {"code":"Remove Cluster ID File\n [Documentation] Append invalid characters to the cluster ID file.\n Command Should Work rm -f ${CLUSTERID_FILE}","name":"Remove Cluster ID File","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/clusterid.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'CLUSTERID_FILE': {'text': '${CLUSTERID_FILE} \/var\/lib\/microshift\/cluster-id'}}","documentation":"Command Should Work rm -f ${CLUSTERID_FILE}"} {"code":"*** Settings ***\nDocumentation Tests for MicroShift service lifecycle\n\nResource ..\/..\/resources\/common.resource\nResource ..\/..\/resources\/microshift-process.resource\n\nSuite Setup Setup\nSuite Teardown Teardown\n\nTest Tags restart\n\n\n*** Variables ***\n${RESTART_ATTEMPTS} 3\n\n\n*** Test Cases ***\nRestarting MicroShift In The Middle Of Startup Should Succeed\n [Documentation] Checks if restarting MicroShift during startup fails.\n ... (for example due to not stopped microshift-etcd.scope).\n [Template] Restart MicroShift ${TIME_TO_WAIT} Seconds After Starting\n\n 40\n 30\n 20\n 15\n 10\n 5\n 3\n 1\n\n\n*** Keywords ***\nSetup\n [Documentation] Test suite setup\n Check Required Env Variables\n Login MicroShift Host\n Setup Kubeconfig # for readiness checks\n\nTeardown\n [Documentation] Test suite teardown\n Restart MicroShift\n Logout MicroShift Host\n Remove Kubeconfig\n\nRestart MicroShift ${time_to_wait} Seconds After Starting\n [Documentation] Tests MicroShift's resilience when restarted during startup.\n\n FOR ${attempt} IN RANGE ${RESTART_ATTEMPTS}\n # Make sure MicroShift is fully stopped first,\n # so it's startup can be interrupted after specified amount of time.\n Stop MicroShift\n Start MicroShift Without Waiting For Systemd Readiness\n Sleep ${time_to_wait}s\n Restarting MicroShift Should Be Successful On First Try\n END\n\nRestarting MicroShift Should Be Successful On First Try\n [Documentation] Restarts MicroShift without additional retries, so\n ... MicroShift will have one chance to shutdown and restart correctly.\n ... Although normally (on boot) systemd attempts to start service\n ... several times, here it is expected that single attempt is enough.\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... systemctl restart microshift\n ... sudo=True\n ... return_stdout=True\n ... return_stderr=True\n ... return_rc=True\n Should Be Equal As Integers 0 ${rc}\n\nStart MicroShift Without Waiting For Systemd Readiness\n [Documentation] Starts MicroShift without waiting for daemon readiness\n ... (which happens after all internal services\/components declare ready\n ... (close ready channel)), so it can be interrupted (restarted) mid startup.\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... systemctl start microshift --no-block\n ... sudo=True\n ... return_stdout=True\n ... return_stderr=True\n ... return_rc=True\n Should Be Equal As Integers 0 ${rc}\n","name":"\/tmp\/repos\/microshift\/test\/suites\/osconfig\/lifecycle.robot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/lifecycle.robot","element_type":"test","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Restarting MicroShift In The Middle Of Startup Should Succeed\n [Documentation] Checks if restarting MicroShift during startup fails.\n ... (for example due to not stopped microshift-etcd.scope).\n [Template] Restart MicroShift ${TIME_TO_WAIT} Seconds After Starting\n\n 40\n 30\n 20\n 15\n 10\n 5\n 3\n 1","name":"Restarting MicroShift In The Middle Of Startup Should Succeed","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/lifecycle.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Setup\n [Documentation] Test suite setup\n Check Required Env Variables\n Login MicroShift Host\n Setup Kubeconfig # for readiness checks","name":"Setup","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/lifecycle.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Check Required Env Variables"} {"code":"Teardown\n [Documentation] Test suite teardown\n Restart MicroShift\n Logout MicroShift Host\n Remove Kubeconfig","name":"Teardown","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/lifecycle.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Restart MicroShift"} {"code":"Restart MicroShift ${time_to_wait} Seconds After Starting\n [Documentation] Tests MicroShift's resilience when restarted during startup.\n\n FOR ${attempt} IN RANGE ${RESTART_ATTEMPTS}\n # Make sure MicroShift is fully stopped first,\n # so it's startup can be interrupted after specified amount of time.\n Stop MicroShift\n Start MicroShift Without Waiting For Systemd Readiness\n Sleep ${time_to_wait}s\n Restarting MicroShift Should Be Successful On First Try\n END","name":"Restart MicroShift","imports_file_locations":"{'..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/lifecycle.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'RESTART_ATTEMPTS': {'text': '${RESTART_ATTEMPTS} 3'}}","documentation":"FOR ${attempt} IN RANGE ${RESTART_ATTEMPTS}"} {"code":"Restarting MicroShift Should Be Successful On First Try\n [Documentation] Restarts MicroShift without additional retries, so\n ... MicroShift will have one chance to shutdown and restart correctly.\n ... Although normally (on boot) systemd attempts to start service\n ... several times, here it is expected that single attempt is enough.\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... systemctl restart microshift\n ... sudo=True\n ... return_stdout=True\n ... return_stderr=True\n ... return_rc=True\n Should Be Equal As Integers 0 ${rc}","name":"Restarting MicroShift Should Be Successful On First Try","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/lifecycle.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${stdout} ${stderr} ${rc}= Execute Command\n ... systemctl restart microshift\n ... sudo=True\n ... return_stdout=True\n ... return_stderr=True"} {"code":"Start MicroShift Without Waiting For Systemd Readiness\n [Documentation] Starts MicroShift without waiting for daemon readiness\n ... (which happens after all internal services\/components declare ready\n ... (close ready channel)), so it can be interrupted (restarted) mid startup.\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... systemctl start microshift --no-block\n ... sudo=True\n ... return_stdout=True\n ... return_stderr=True\n ... return_rc=True\n Should Be Equal As Integers 0 ${rc}","name":"Start MicroShift Without Waiting For Systemd Readiness","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/lifecycle.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${stdout} ${stderr} ${rc}= Execute Command\n ... systemctl start microshift --no-block\n ... sudo=True\n ... return_stdout=True\n ... return_stderr=True"} {"code":"*** Settings ***\nDocumentation Verify MicroShift host name resolution with and without systemd-resolved installed\n\nResource ..\/..\/resources\/common.resource\nResource ..\/..\/resources\/microshift-host.resource\nResource ..\/..\/resources\/microshift-process.resource\nResource ..\/..\/resources\/ostree.resource\nResource ..\/..\/resources\/ostree-health.resource\nResource ..\/..\/resources\/systemd.resource\n\nSuite Setup Setup\nSuite Teardown Teardown\n\nTest Tags slow\n\n\n*** Variables ***\n${KUBELET_CONFIG_FILE} \/var\/lib\/microshift\/resources\/kubelet\/config\/config.yaml\n${RESOLVE_CONF_FILE} \/run\/systemd\/resolve\/resolv.conf\n\n\n*** Test Cases ***\nVerify Kubelet Config With Systemd-Resolved Running\n [Documentation] Verify kubelet uses the upstream resolve file of\n ... systemd-resolved when the service is running\n [Setup] Run Keywords\n ... Systemd-Resolved Must Be Installed And Disabled\n ... Start Systemd-Resolved\n\n Delete Kubelet Configuration File\n Restart MicroShift\n\n # Verify the presence of the kubelet option\n ${rc}= Check ResolveConf Option Presence\n Should Be Equal As Integers 0 ${rc}\n\n [Teardown] Run Keywords\n ... Stop Systemd-Resolved\n\nVerify Kubelet Config With Systemd-Resolved Disabled\n [Documentation] Verify kubelet does not use the upstream resolve file of\n ... systemd-resolved when the service is disabled\n [Setup] Run Keywords\n ... Systemd-Resolved Must Be Installed And Disabled\n\n Delete Kubelet Configuration File\n Restart MicroShift\n\n # Verify the absence of the kubelet option\n ${rc}= Check ResolveConf Option Presence\n Should Not Be Equal As Integers 0 ${rc}\n\nVerify Kubelet Config With Systemd-Resolved Uninstalled\n [Documentation] Verify kubelet does not use the upstream resolve file of\n ... systemd-resolved when the package is not present\n [Setup] Run Keywords\n ... Uninstall Systemd-Resolved\n ... Systemd-Resolved Must Not Be Installed\n\n Delete Kubelet Configuration File\n Restart MicroShift\n\n # Verify the absence of the kubelet option\n ${rc}= Check ResolveConf Option Presence\n Should Not Be Equal As Integers 0 ${rc}\n\n # Revert the system to the original configuration\n [Teardown] Run Keywords\n ... Restore Systemd-Resolved\n ... Systemd-Resolved Must Be Installed And Disabled\n\n\n*** Keywords ***\nSetup\n [Documentation] Test suite setup\n Check Required Env Variables\n Login MicroShift Host\n\nTeardown\n [Documentation] Test suite teardown\n Logout MicroShift Host\n\nSystemd-Resolved Must Be Installed And Disabled\n [Documentation] Verify the systemd-resolved package is installed\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... rpm -q systemd-resolved\n ... sudo=False return_rc=True return_stdout=True return_stderr=True\n Should Be Equal As Integers 0 ${rc}\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... systemctl is-enabled -q systemd-resolved.service\n ... sudo=False return_rc=True return_stdout=True return_stderr=True\n Should Not Be Equal As Integers 0 ${rc}\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... systemctl is-active -q systemd-resolved.service\n ... sudo=False return_rc=True return_stdout=True return_stderr=True\n Should Not Be Equal As Integers 0 ${rc}\n\nSystemd-Resolved Must Not Be Installed\n [Documentation] Verify the systemd-resolved package is installed\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... rpm -q systemd-resolved\n ... sudo=False return_rc=True return_stdout=True return_stderr=True\n Should Not Be Equal As Integers 0 ${rc}\n\nDelete Kubelet Configuration File\n [Documentation] Delete the kubelet configuration file\n\n ${stderr} ${rc}= Execute Command\n ... rm -f ${KUBELET_CONFIG_FILE}\n ... sudo=True return_rc=True return_stderr=True return_stdout=False\n Log ${stderr}\n Should Be Equal As Integers 0 ${rc}\n\nStart Systemd-Resolved\n [Documentation] Start the systemd-resolved service\n\n Systemd-Resolved Must Be Installed And Disabled\n Systemctl start systemd-resolved\n\nStop Systemd-Resolved\n [Documentation] Stop the systemd-resolved service\n\n Systemctl stop systemd-resolved\n Reboot MicroShift Host\n Wait Until Greenboot Health Check Exited\n\nUninstall Systemd-Resolved\n [Documentation] Remove the systemd-resolved package\n\n ${is_ostree}= Is System OSTree\n IF ${is_ostree} == ${TRUE} Create Usr Directory Overlay\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... rpm -ev systemd-resolved\n ... sudo=True return_rc=True return_stdout=True return_stderr=True\n Should Be Equal As Integers 0 ${rc}\n\nRestore Systemd-Resolved\n [Documentation] Install the systemd-resolved package\n\n ${is_ostree}= Is System OSTree\n IF ${is_ostree} == ${TRUE}\n Reboot MicroShift Host\n Wait Until Greenboot Health Check Exited\n ELSE\n ${stdout} ${stderr} ${rc}= Execute Command\n ... dnf install -y systemd-resolved\n ... sudo=True return_rc=True return_stdout=True return_stderr=True\n Should Be Equal As Integers 0 ${rc}\n END\n\nCheck ResolveConf Option Presence\n [Documentation] Check if the 'resolvConf' option is present in the kubelet\n ... configuration file. Return a none-zero code if not present.\n\n ${rc}= Execute Command\n ... grep -qE \"^resolvConf:.*${RESOLVE_CONF_FILE}\" ${KUBELET_CONFIG_FILE}\n ... sudo=True return_rc=True return_stdout=False return_stderr=False\n RETURN ${rc}\n","name":"\/tmp\/repos\/microshift\/test\/suites\/osconfig\/systemd-resolved.robot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/systemd-resolved.robot","element_type":"test","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Verify Kubelet Config With Systemd-Resolved Running\n [Documentation] Verify kubelet uses the upstream resolve file of\n ... systemd-resolved when the service is running\n [Setup] Run Keywords\n ... Systemd-Resolved Must Be Installed And Disabled\n ... Start Systemd-Resolved\n\n Delete Kubelet Configuration File\n Restart MicroShift\n\n # Verify the presence of the kubelet option\n ${rc}= Check ResolveConf Option Presence\n Should Be Equal As Integers 0 ${rc}\n\n [Teardown] Run Keywords\n ... Stop Systemd-Resolved","name":"Verify Kubelet Config With Systemd-Resolved Running","imports_file_locations":"{'..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/systemd-resolved.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Verify Kubelet Config With Systemd-Resolved Disabled\n [Documentation] Verify kubelet does not use the upstream resolve file of\n ... systemd-resolved when the service is disabled\n [Setup] Run Keywords\n ... Systemd-Resolved Must Be Installed And Disabled\n\n Delete Kubelet Configuration File\n Restart MicroShift\n\n # Verify the absence of the kubelet option\n ${rc}= Check ResolveConf Option Presence\n Should Not Be Equal As Integers 0 ${rc}","name":"Verify Kubelet Config With Systemd-Resolved Disabled","imports_file_locations":"{'..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/systemd-resolved.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Verify Kubelet Config With Systemd-Resolved Uninstalled\n [Documentation] Verify kubelet does not use the upstream resolve file of\n ... systemd-resolved when the package is not present\n [Setup] Run Keywords\n ... Uninstall Systemd-Resolved\n ... Systemd-Resolved Must Not Be Installed\n\n Delete Kubelet Configuration File\n Restart MicroShift\n\n # Verify the absence of the kubelet option\n ${rc}= Check ResolveConf Option Presence\n Should Not Be Equal As Integers 0 ${rc}\n\n # Revert the system to the original configuration\n [Teardown] Run Keywords\n ... Restore Systemd-Resolved\n ... Systemd-Resolved Must Be Installed And Disabled","name":"Verify Kubelet Config With Systemd-Resolved Uninstalled","imports_file_locations":"{'..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/systemd-resolved.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Setup\n [Documentation] Test suite setup\n Check Required Env Variables\n Login MicroShift Host","name":"Setup","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/systemd-resolved.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Check Required Env Variables"} {"code":"Teardown\n [Documentation] Test suite teardown\n Logout MicroShift Host","name":"Teardown","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/systemd-resolved.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Logout MicroShift Host"} {"code":"Systemd-Resolved Must Be Installed And Disabled\n [Documentation] Verify the systemd-resolved package is installed\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... rpm -q systemd-resolved\n ... sudo=False return_rc=True return_stdout=True return_stderr=True\n Should Be Equal As Integers 0 ${rc}\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... systemctl is-enabled -q systemd-resolved.service\n ... sudo=False return_rc=True return_stdout=True return_stderr=True\n Should Not Be Equal As Integers 0 ${rc}\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... systemctl is-active -q systemd-resolved.service\n ... sudo=False return_rc=True return_stdout=True return_stderr=True\n Should Not Be Equal As Integers 0 ${rc}","name":"Systemd-Resolved Must Be Installed And Disabled","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/systemd-resolved.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${stdout} ${stderr} ${rc}= Execute Command\n ... rpm -q systemd-resolved\n ... sudo=False return_rc=True return_stdout=True return_stderr=True"} {"code":"Systemd-Resolved Must Not Be Installed\n [Documentation] Verify the systemd-resolved package is installed\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... rpm -q systemd-resolved\n ... sudo=False return_rc=True return_stdout=True return_stderr=True\n Should Not Be Equal As Integers 0 ${rc}","name":"Systemd-Resolved Must Not Be Installed","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/systemd-resolved.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${stdout} ${stderr} ${rc}= Execute Command\n ... rpm -q systemd-resolved\n ... sudo=False return_rc=True return_stdout=True return_stderr=True"} {"code":"Delete Kubelet Configuration File\n [Documentation] Delete the kubelet configuration file\n\n ${stderr} ${rc}= Execute Command\n ... rm -f ${KUBELET_CONFIG_FILE}\n ... sudo=True return_rc=True return_stderr=True return_stdout=False\n Log ${stderr}\n Should Be Equal As Integers 0 ${rc}","name":"Delete Kubelet Configuration File","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/systemd-resolved.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'KUBELET_CONFIG_FILE': {'text': '${KUBELET_CONFIG_FILE} \/var\/lib\/microshift\/resources\/kubelet\/config\/config.yaml'}}","documentation":"${stderr} ${rc}= Execute Command\n ... rm -f ${KUBELET_CONFIG_FILE}\n ... sudo=True return_rc=True return_stderr=True return_stdout=False"} {"code":"Start Systemd-Resolved\n [Documentation] Start the systemd-resolved service\n\n Systemd-Resolved Must Be Installed And Disabled\n Systemctl start systemd-resolved","name":"Start Systemd-Resolved","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/systemd-resolved.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Systemd-Resolved Must Be Installed And Disabled"} {"code":"Stop Systemd-Resolved\n [Documentation] Stop the systemd-resolved service\n\n Systemctl stop systemd-resolved\n Reboot MicroShift Host\n Wait Until Greenboot Health Check Exited","name":"Stop Systemd-Resolved","imports_file_locations":"{'..\/..\/resources\/ostree-health.resource': 'test\/resources\/ostree-health.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/systemd-resolved.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Systemctl stop systemd-resolved"} {"code":"Uninstall Systemd-Resolved\n [Documentation] Remove the systemd-resolved package\n\n ${is_ostree}= Is System OSTree\n IF ${is_ostree} == ${TRUE} Create Usr Directory Overlay\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... rpm -ev systemd-resolved\n ... sudo=True return_rc=True return_stdout=True return_stderr=True\n Should Be Equal As Integers 0 ${rc}","name":"Uninstall Systemd-Resolved","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/systemd-resolved.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${is_ostree}= Is System OSTree"} {"code":"Restore Systemd-Resolved\n [Documentation] Install the systemd-resolved package\n\n ${is_ostree}= Is System OSTree\n IF ${is_ostree} == ${TRUE}\n Reboot MicroShift Host\n Wait Until Greenboot Health Check Exited\n ELSE\n ${stdout} ${stderr} ${rc}= Execute Command\n ... dnf install -y systemd-resolved\n ... sudo=True return_rc=True return_stdout=True return_stderr=True\n Should Be Equal As Integers 0 ${rc}\n END","name":"Restore Systemd-Resolved","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/systemd-resolved.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${is_ostree}= Is System OSTree"} {"code":"Check ResolveConf Option Presence\n [Documentation] Check if the 'resolvConf' option is present in the kubelet\n ... configuration file. Return a none-zero code if not present.\n\n ${rc}= Execute Command\n ... grep -qE \"^resolvConf:.*${RESOLVE_CONF_FILE}\" ${KUBELET_CONFIG_FILE}\n ... sudo=True return_rc=True return_stdout=False return_stderr=False\n RETURN ${rc}","name":"Check ResolveConf Option Presence","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/osconfig\/systemd-resolved.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'RESOLVE_CONF_FILE': {'text': '${RESOLVE_CONF_FILE} \/run\/systemd\/resolve\/resolv.conf'}, 'KUBELET_CONFIG_FILE': {'text': '${KUBELET_CONFIG_FILE} \/var\/lib\/microshift\/resources\/kubelet\/config\/config.yaml'}}","documentation":"configuration file. Return a none-zero code if not present."} {"code":"*** Comments ***\n# NOTE: Unlike most suites, these tests rely on being run IN ORDER to\n# ensure the host is in a good state at the start of each test. We\n# could have separated them and run them as separate scenarios, but\n# did not want to spend the resources on a new VM.\n#\n# The \"Install Source Version\" test wants to be run on a system where\n# MicroShift has never been installed before to ensure that all of the\n# dependencies are installed automatically. The test teardown step\n# removes those RPMs, and then \"Upgrade From Previous Version\"\n# installs the _older_ version of MicroShift and tries to upgrade it.\n\n\n*** Settings ***\nDocumentation Tests related to installing MicroShift on a non-ostree system\n\nResource ..\/..\/resources\/common.resource\nResource ..\/..\/resources\/microshift-rpm.resource\nResource ..\/..\/resources\/microshift-host.resource\nResource ..\/..\/resources\/microshift-process.resource\nResource ..\/..\/resources\/ostree-data.resource\nResource ..\/..\/resources\/ostree-health.resource\nLibrary Collections\nLibrary SSHLibrary\n\nSuite Setup Setup\nSuite Teardown Teardown\n\nTest Tags restart rpm-based-system slow\n\n\n*** Variables ***\n# The URL to the repo with the version of microshift build from source\n${SOURCE_REPO_URL} ${EMPTY}\n# The version of microshift we expect to find in that repo\n${TARGET_VERSION} ${EMPTY}\n\n\n*** Test Cases ***\nInstall Source Version\n [Documentation] Install the version built from source\n Install Third Party Packages With Warnings\n Install MicroShift RPM Packages From Repo ${SOURCE_REPO_URL} ${TARGET_VERSION}\n Start MicroShift\n Wait For MicroShift\n [Teardown] Clean Up Test\n\nUpgrade From Previous Version\n [Documentation] Install the previous version, then upgrade the package\n ... also verifying that crio and microshift services were restarted\n # Always install from system repo, because the scenario script\n # is enabling all the repositories needed.\n #\n # Ignore warnings when installing the previous version because we\n # know some of our older RPMs generate warnings. We care more\n # about warnings on the new RPM.\n Install MicroShift RPM Packages From System Repo\n ... 4.${PREVIOUS_MINOR_VERSION}.*\n ... check_warnings=False\n # Verify the package version is as expected\n ${version}= MicroShift Version\n Should Be Equal As Integers ${version.minor} ${PREVIOUS_MINOR_VERSION}\n # Start the service and wait until initialized\n Start MicroShift\n Wait For MicroShift\n # Take active timestamps for services\n ${cts1}= Command Should Work systemctl show -p ActiveEnterTimestamp crio\n ${mts1}= Command Should Work systemctl show -p ActiveEnterTimestamp microshift\n # Upgrade the package without explicitly restarting the service\n Install MicroShift RPM Packages From Repo ${SOURCE_REPO_URL} ${TARGET_VERSION}\n Wait For MicroShift\n # Take active timestamps for services\n ${cts2}= Command Should Work systemctl show -p ActiveEnterTimestamp crio\n ${mts2}= Command Should Work systemctl show -p ActiveEnterTimestamp microshift\n # Run the timestamp verification\n Verify Service Active Timestamps\n ... ${cts1} ${mts1}\n ... ${cts2} ${mts2}\n # Restart the host to verify a clean start\n Reboot MicroShift Host\n # Health of the system is implicitly checked by greenboot successful exit\n Wait Until Greenboot Health Check Exited\n [Teardown] Clean Up Test\n\n\n*** Keywords ***\nSetup\n [Documentation] Test suite setup\n Check Required Env Variables\n Should Not Be Empty ${SOURCE_REPO_URL} SOURCE_REPO_URL variable is required\n Should Not Be Empty ${TARGET_VERSION} TARGET_VERSION variable is required\n Login MicroShift Host\n System Should Not Be Ostree\n Pull Secret Should Be Installed\n\nSystem Should Not Be Ostree\n [Documentation] Make sure we run on a non-ostree system\n ${is_ostree}= Is System OSTree\n Should Not Be True ${is_ostree}\n\nPull Secret Should Be Installed\n [Documentation] Check that the kickstart file installed a pull secret for us\n # Check that the file exists without actually saving the output so\n # we don't have to clean the logs with the secret.\n ${rc}= SSHLibrary.Execute Command\n ... cat \/etc\/crio\/openshift-pull-secret\n ... sudo=True\n ... return_rc=True\n ... return_stdout=False\n ... return_stderr=False\n Should Be Equal As Integers 0 ${rc}\n\nTeardown\n [Documentation] Test suite teardown\n Logout MicroShift Host\n\nClean Up Test\n [Documentation] Clean up an installed MicroShift instance\n Cleanup MicroShift\n Uninstall MicroShift RPM Packages\n\nInstall Third Party Packages With Warnings\n [Documentation] Install these separately to avoid having warnings\n ... show up in the warning check when installing MicroShift.\n Command Should Work dnf install -y NetworkManager-ovs containers-common\n\nVersion Should Match\n [Documentation] Compare the installed version against expectations\n [Arguments] ${expected}\n ${version}= MicroShift Version\n Should Be Equal As Strings ${version.gitVersion} ${expected}\n\nVerify Service Active Timestamps\n [Documentation] Verify the service timestamps are valid and different\n [Arguments] ${cts1} ${mts1} ${cts2} ${mts2}\n Should Not Be Empty ${cts1}\n Should Not Be Empty ${mts1}\n Should Not Be Empty ${cts2}\n Should Not Be Empty ${mts2}\n # Verify that timestamps exist (services were active)\n Should Not Be Equal As Strings ${cts1} ActiveEnterTimestamp=\n Should Not Be Equal As Strings ${mts1} ActiveEnterTimestamp=\n Should Not Be Equal As Strings ${cts2} ActiveEnterTimestamp=\n Should Not Be Equal As Strings ${mts2} ActiveEnterTimestamp=\n # Verify that timestamps changed (services restarted)\n Should Not Be Equal As Strings ${cts1} ${cts2}\n Should Not Be Equal As Strings ${mts1} ${mts2}\n","name":"\/tmp\/repos\/microshift\/test\/suites\/rpm\/install-and-upgrade-successful.robot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/rpm\/install-and-upgrade-successful.robot","element_type":"test","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Install Source Version\n [Documentation] Install the version built from source\n Install Third Party Packages With Warnings\n Install MicroShift RPM Packages From Repo ${SOURCE_REPO_URL} ${TARGET_VERSION}\n Start MicroShift\n Wait For MicroShift\n [Teardown] Clean Up Test","name":"Install Source Version","imports_file_locations":"{'..\/..\/resources\/microshift-rpm.resource': 'test\/resources\/microshift-rpm.resource', '..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/rpm\/install-and-upgrade-successful.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'SOURCE_REPO_URL': {'text': '${SOURCE_REPO_URL} ${EMPTY}'}, 'TARGET_VERSION': {'text': '${TARGET_VERSION} ${EMPTY}'}}","documentation":""} {"code":"Upgrade From Previous Version\n [Documentation] Install the previous version, then upgrade the package\n ... also verifying that crio and microshift services were restarted\n # Always install from system repo, because the scenario script\n # is enabling all the repositories needed.\n #\n # Ignore warnings when installing the previous version because we\n # know some of our older RPMs generate warnings. We care more\n # about warnings on the new RPM.\n Install MicroShift RPM Packages From System Repo\n ... 4.${PREVIOUS_MINOR_VERSION}.*\n ... check_warnings=False\n # Verify the package version is as expected\n ${version}= MicroShift Version\n Should Be Equal As Integers ${version.minor} ${PREVIOUS_MINOR_VERSION}\n # Start the service and wait until initialized\n Start MicroShift\n Wait For MicroShift\n # Take active timestamps for services\n ${cts1}= Command Should Work systemctl show -p ActiveEnterTimestamp crio\n ${mts1}= Command Should Work systemctl show -p ActiveEnterTimestamp microshift\n # Upgrade the package without explicitly restarting the service\n Install MicroShift RPM Packages From Repo ${SOURCE_REPO_URL} ${TARGET_VERSION}\n Wait For MicroShift\n # Take active timestamps for services\n ${cts2}= Command Should Work systemctl show -p ActiveEnterTimestamp crio\n ${mts2}= Command Should Work systemctl show -p ActiveEnterTimestamp microshift\n # Run the timestamp verification\n Verify Service Active Timestamps\n ... ${cts1} ${mts1}\n ... ${cts2} ${mts2}\n # Restart the host to verify a clean start\n Reboot MicroShift Host\n # Health of the system is implicitly checked by greenboot successful exit\n Wait Until Greenboot Health Check Exited\n [Teardown] Clean Up Test","name":"Upgrade From Previous Version","imports_file_locations":"{'..\/..\/resources\/microshift-rpm.resource': 'test\/resources\/microshift-rpm.resource', '..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource', '..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource', '..\/..\/resources\/ostree-health.resource': 'test\/resources\/ostree-health.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/rpm\/install-and-upgrade-successful.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'SOURCE_REPO_URL': {'text': '${SOURCE_REPO_URL} ${EMPTY}'}, 'TARGET_VERSION': {'text': '${TARGET_VERSION} ${EMPTY}'}}","documentation":""} {"code":"Setup\n [Documentation] Test suite setup\n Check Required Env Variables\n Should Not Be Empty ${SOURCE_REPO_URL} SOURCE_REPO_URL variable is required\n Should Not Be Empty ${TARGET_VERSION} TARGET_VERSION variable is required\n Login MicroShift Host\n System Should Not Be Ostree\n Pull Secret Should Be Installed","name":"Setup","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/rpm\/install-and-upgrade-successful.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'SOURCE_REPO_URL': {'text': '${SOURCE_REPO_URL} ${EMPTY}'}, 'TARGET_VERSION': {'text': '${TARGET_VERSION} ${EMPTY}'}}","documentation":"Check Required Env Variables"} {"code":"System Should Not Be Ostree\n [Documentation] Make sure we run on a non-ostree system\n ${is_ostree}= Is System OSTree\n Should Not Be True ${is_ostree}","name":"System Should Not Be Ostree","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/rpm\/install-and-upgrade-successful.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${is_ostree}= Is System OSTree"} {"code":"Pull Secret Should Be Installed\n [Documentation] Check that the kickstart file installed a pull secret for us\n # Check that the file exists without actually saving the output so\n # we don't have to clean the logs with the secret.\n ${rc}= SSHLibrary.Execute Command\n ... cat \/etc\/crio\/openshift-pull-secret\n ... sudo=True\n ... return_rc=True\n ... return_stdout=False\n ... return_stderr=False\n Should Be Equal As Integers 0 ${rc}","name":"Pull Secret Should Be Installed","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/rpm\/install-and-upgrade-successful.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Check that the kickstart file installed a pull secret for us"} {"code":"Teardown\n [Documentation] Test suite teardown\n Logout MicroShift Host","name":"Teardown","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/rpm\/install-and-upgrade-successful.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Logout MicroShift Host"} {"code":"Clean Up Test\n [Documentation] Clean up an installed MicroShift instance\n Cleanup MicroShift\n Uninstall MicroShift RPM Packages","name":"Clean Up Test","imports_file_locations":"{'..\/..\/resources\/microshift-rpm.resource': 'test\/resources\/microshift-rpm.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/rpm\/install-and-upgrade-successful.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Cleanup MicroShift"} {"code":"Install Third Party Packages With Warnings\n [Documentation] Install these separately to avoid having warnings\n ... show up in the warning check when installing MicroShift.\n Command Should Work dnf install -y NetworkManager-ovs containers-common","name":"Install Third Party Packages With Warnings","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/rpm\/install-and-upgrade-successful.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"show up in the warning check when installing MicroShift."} {"code":"Version Should Match\n [Documentation] Compare the installed version against expectations\n [Arguments] ${expected}\n ${version}= MicroShift Version\n Should Be Equal As Strings ${version.gitVersion} ${expected}","name":"Version Should Match","imports_file_locations":"{'..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/rpm\/install-and-upgrade-successful.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${expected}"} {"code":"Verify Service Active Timestamps\n [Documentation] Verify the service timestamps are valid and different\n [Arguments] ${cts1} ${mts1} ${cts2} ${mts2}\n Should Not Be Empty ${cts1}\n Should Not Be Empty ${mts1}\n Should Not Be Empty ${cts2}\n Should Not Be Empty ${mts2}\n # Verify that timestamps exist (services were active)\n Should Not Be Equal As Strings ${cts1} ActiveEnterTimestamp=\n Should Not Be Equal As Strings ${mts1} ActiveEnterTimestamp=\n Should Not Be Equal As Strings ${cts2} ActiveEnterTimestamp=\n Should Not Be Equal As Strings ${mts2} ActiveEnterTimestamp=\n # Verify that timestamps changed (services restarted)\n Should Not Be Equal As Strings ${cts1} ${cts2}\n Should Not Be Equal As Strings ${mts1} ${mts2}","name":"Verify Service Active Timestamps","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/rpm\/install-and-upgrade-successful.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${cts1} ${mts1} ${cts2} ${mts2}"} {"code":"*** Settings ***\nDocumentation Tests related to upgrading MicroShift\n\nResource ..\/..\/resources\/common.resource\nResource ..\/..\/resources\/selinux.resource\nLibrary Collections\n\nSuite Setup Setup\nSuite Teardown Teardown\n\n\n*** Variables ***\n${USHIFT_HOST} ${EMPTY}\n${USHIFT_USER} ${EMPTY}\n\n\n*** Test Cases ***\nStandard SELinux Validation\n [Documentation] Performs a standard SELinux validation against the host\n Validate SELinux\n\n\n*** Keywords ***\nSetup\n [Documentation] Test suite setup\n Check Required Env Variables\n Login MicroShift Host\n\nTeardown\n [Documentation] Test suite teardown\n Logout MicroShift Host\n","name":"\/tmp\/repos\/microshift\/test\/suites\/selinux\/validate-selinux-policy.robot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/selinux\/validate-selinux-policy.robot","element_type":"test","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Standard SELinux Validation\n [Documentation] Performs a standard SELinux validation against the host\n Validate SELinux","name":"Standard SELinux Validation","imports_file_locations":"{'..\/..\/resources\/selinux.resource': 'test\/resources\/selinux.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/selinux\/validate-selinux-policy.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Setup\n [Documentation] Test suite setup\n Check Required Env Variables\n Login MicroShift Host","name":"Setup","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/selinux\/validate-selinux-policy.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Check Required Env Variables"} {"code":"Teardown\n [Documentation] Test suite teardown\n Logout MicroShift Host","name":"Teardown","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/selinux\/validate-selinux-policy.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Logout MicroShift Host"} {"code":"*** Settings ***\nDocumentation Container policy verification\n\nResource ..\/..\/resources\/microshift-process.resource\nLibrary OperatingSystem\nLibrary Collections\n\nSuite Setup Setup\nSuite Teardown Teardown\n\n\n*** Variables ***\n${POLICY_JSON_PATH} \/etc\/containers\/policy.json\n${IMAGE_SIGSTORE_ENABLED} False\n\n\n*** Test Cases ***\nVerify Policy JSON Contents\n [Documentation] Verify container policy contents\n ${policy_contents}= Command Should Work cat ${POLICY_JSON_PATH}\n ${policy}= Json Parse ${policy_contents}\n\n IF ${IMAGE_SIGSTORE_ENABLED}\n Verify Sigstore Signing Enabled ${policy}\n ELSE\n Verify Sigstore Signing Disabled ${policy}\n END\n\n\n*** Keywords ***\nSetup\n [Documentation] Test suite setup\n Login MicroShift Host\n\nTeardown\n [Documentation] Test suite teardown\n Logout MicroShift Host\n\nVerify Sigstore Signing Enabled # robocop: disable=too-many-calls-in-keyword\n [Documentation] Verify the policy file contents when sigstore signing\n ... verification is enabled\n [Arguments] ${policy}\n\n # This verification should match the policy contents defined in\n # https:\/\/github.com\/openshift\/microshift\/blob\/main\/test\/kickstart-templates\/includes\/post-containers-sigstore.cfg\n\n # Verify default entry\n ${default_type}= Evaluate \"${policy}[default][0][type]\"\n Should Be Equal As Strings ${default_type} reject\n\n # Verify quay.io entry\n ${quay_type}= Evaluate \"${policy}[transports][docker][quay.io\/openshift-release-dev][0][type]\"\n Should Be Equal ${quay_type} sigstoreSigned\n ${quay_key}= Evaluate \"${policy}[transports][docker][quay.io\/openshift-release-dev][0][keyPath]\"\n Should Be Equal ${quay_key} \/etc\/containers\/RedHat_ReleaseKey3.pub\n ${quay_ident}= Evaluate\n ... \"${policy}[transports][docker][quay.io\/openshift-release-dev][0][signedIdentity][type]\"\n Should Be Equal ${quay_ident} matchRepoDigestOrExact\n\n # Verify registry.redhat.io entry\n ${redhat_type}= Evaluate \"${policy}[transports][docker][registry.redhat.io][0][type]\"\n Should Be Equal ${redhat_type} sigstoreSigned\n ${redhat_key}= Evaluate \"${policy}[transports][docker][registry.redhat.io][0][keyPath]\"\n Should Be Equal ${redhat_key} \/etc\/containers\/RedHat_ReleaseKey3.pub\n ${redhat_ident}= Evaluate \"${policy}[transports][docker][registry.redhat.io][0][signedIdentity][type]\"\n Should Be Equal ${redhat_ident} matchRepoDigestOrExact\n\nVerify Sigstore Signing Disabled\n [Documentation] Verify the policy file contents when sigstore signing\n ... verification is disabled\n [Arguments] ${policy}\n # This verification should match the policy contents defined in\n # https:\/\/github.com\/openshift\/microshift\/blob\/main\/test\/kickstart-templates\/includes\/post-containers.cfg\n\n # Verify default entry\n ${default_type}= Evaluate \"${policy}[default][0][type]\"\n Should Be Equal As Strings ${default_type} insecureAcceptAnything\n\n # Verify transports entry\n ${quay_type}= Evaluate '${policy}[transports][docker-daemon][][0][type]'\n Should Be Equal ${quay_type} insecureAcceptAnything\n","name":"\/tmp\/repos\/microshift\/test\/suites\/standard1\/containers-policy.robot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/containers-policy.robot","element_type":"test","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Verify Policy JSON Contents\n [Documentation] Verify container policy contents\n ${policy_contents}= Command Should Work cat ${POLICY_JSON_PATH}\n ${policy}= Json Parse ${policy_contents}\n\n IF ${IMAGE_SIGSTORE_ENABLED}\n Verify Sigstore Signing Enabled ${policy}\n ELSE\n Verify Sigstore Signing Disabled ${policy}\n END","name":"Verify Policy JSON Contents","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/containers-policy.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'POLICY_JSON_PATH': {'text': '${POLICY_JSON_PATH} \/etc\/containers\/policy.json'}, 'IMAGE_SIGSTORE_ENABLED': {'text': '${IMAGE_SIGSTORE_ENABLED} False'}}","documentation":""} {"code":"Setup\n [Documentation] Test suite setup\n Login MicroShift Host","name":"Setup","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/containers-policy.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Login MicroShift Host"} {"code":"Teardown\n [Documentation] Test suite teardown\n Logout MicroShift Host","name":"Teardown","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/containers-policy.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Logout MicroShift Host"} {"code":"Verify Sigstore Signing Enabled # robocop: disable=too-many-calls-in-keyword\n [Documentation] Verify the policy file contents when sigstore signing\n ... verification is enabled\n [Arguments] ${policy}\n\n # This verification should match the policy contents defined in\n # https:\/\/github.com\/openshift\/microshift\/blob\/main\/test\/kickstart-templates\/includes\/post-containers-sigstore.cfg\n\n # Verify default entry\n ${default_type}= Evaluate \"${policy}[default][0][type]\"\n Should Be Equal As Strings ${default_type} reject\n\n # Verify quay.io entry\n ${quay_type}= Evaluate \"${policy}[transports][docker][quay.io\/openshift-release-dev][0][type]\"\n Should Be Equal ${quay_type} sigstoreSigned\n ${quay_key}= Evaluate \"${policy}[transports][docker][quay.io\/openshift-release-dev][0][keyPath]\"\n Should Be Equal ${quay_key} \/etc\/containers\/RedHat_ReleaseKey3.pub\n ${quay_ident}= Evaluate\n ... \"${policy}[transports][docker][quay.io\/openshift-release-dev][0][signedIdentity][type]\"\n Should Be Equal ${quay_ident} matchRepoDigestOrExact\n\n # Verify registry.redhat.io entry\n ${redhat_type}= Evaluate \"${policy}[transports][docker][registry.redhat.io][0][type]\"\n Should Be Equal ${redhat_type} sigstoreSigned\n ${redhat_key}= Evaluate \"${policy}[transports][docker][registry.redhat.io][0][keyPath]\"\n Should Be Equal ${redhat_key} \/etc\/containers\/RedHat_ReleaseKey3.pub\n ${redhat_ident}= Evaluate \"${policy}[transports][docker][registry.redhat.io][0][signedIdentity][type]\"\n Should Be Equal ${redhat_ident} matchRepoDigestOrExact","name":"Verify Sigstore Signing Enabled","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/containers-policy.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"verification is enabled"} {"code":"Verify Sigstore Signing Disabled\n [Documentation] Verify the policy file contents when sigstore signing\n ... verification is disabled\n [Arguments] ${policy}\n # This verification should match the policy contents defined in\n # https:\/\/github.com\/openshift\/microshift\/blob\/main\/test\/kickstart-templates\/includes\/post-containers.cfg\n\n # Verify default entry\n ${default_type}= Evaluate \"${policy}[default][0][type]\"\n Should Be Equal As Strings ${default_type} insecureAcceptAnything\n\n # Verify transports entry\n ${quay_type}= Evaluate '${policy}[transports][docker-daemon][][0][type]'\n Should Be Equal ${quay_type} insecureAcceptAnything","name":"Verify Sigstore Signing Disabled","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/containers-policy.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"verification is disabled"} {"code":"*** Settings ***\nDocumentation Tests related to how etcd is managed\n\nResource ..\/..\/resources\/common.resource\nResource ..\/..\/resources\/systemd.resource\nResource ..\/..\/resources\/microshift-config.resource\nResource ..\/..\/resources\/microshift-process.resource\nLibrary Collections\n\nSuite Setup Setup\nSuite Teardown Teardown\n\nTest Tags configuration etcd restart slow\n\n\n*** Variables ***\n${ETCD_SYSTEMD_UNIT} microshift-etcd.scope\n${MEMLIMIT256} SEPARATOR=\\n\n... ---\n... etcd:\n... \\ \\ memoryLimitMB: 256\n${MEMLIMIT0} SEPARATOR=\\n\n... ---\n... etcd:\n... \\ \\ memoryLimitMB: 0\n\n\n*** Test Cases ***\nSet MemoryHigh Limit Unlimited\n [Documentation] The default configuration should not limit RAM\n ...\n ... Since we cannot assume that the default configuration file is\n ... being used, the test explicitly configures a '0' limit, which\n ... is equivalent to not having any configuration at all.\n [Setup] Setup With Custom Config ${MEMLIMIT0}\n Expect MemoryHigh infinity\n\nSet MemoryHigh Limit 256MB\n [Documentation] Set the memory limit for etcd to 256MB and ensure it takes effect\n [Setup] Setup With Custom Config ${MEMLIMIT256}\n # Expecting the setting to be 256 * 1024 * 1024\n Expect MemoryHigh 268435456\n [Teardown] Restore Default Config\n\n\n*** Keywords ***\nSetup\n [Documentation] Test suite setup\n Check Required Env Variables\n Login MicroShift Host\n Setup Kubeconfig # for readiness checks\n\nTeardown\n [Documentation] Test suite teardown\n Restore Default Config\n Logout MicroShift Host\n Remove Kubeconfig\n\nRestore Default Config\n [Documentation] Remove any custom config and restart MicroShift\n Remove Drop In MicroShift Config 10-etcd\n Restart MicroShift\n\nSetup With Custom Config\n [Documentation] Install a custom config and restart MicroShift\n [Arguments] ${config_content}\n Drop In MicroShift Config ${config_content} 10-etcd\n Restart MicroShift\n\nExpect MemoryHigh\n [Documentation] Verify that the MemoryHigh setting for etcd matches the expected value\n [Arguments] ${expected}\n ${actual}= Get Systemd Setting microshift-etcd.scope MemoryHigh\n # Using integer comparison is complicated here because sometimes\n # the returned or expected value is 'infinity'.\n Should Be Equal ${expected} ${actual}\n","name":"\/tmp\/repos\/microshift\/test\/suites\/standard1\/etcd.robot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/etcd.robot","element_type":"test","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Set MemoryHigh Limit Unlimited\n [Documentation] The default configuration should not limit RAM\n ...\n ... Since we cannot assume that the default configuration file is\n ... being used, the test explicitly configures a '0' limit, which\n ... is equivalent to not having any configuration at all.\n [Setup] Setup With Custom Config ${MEMLIMIT0}\n Expect MemoryHigh infinity","name":"Set MemoryHigh Limit Unlimited","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/etcd.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'MEMLIMIT0': {'text': '${MEMLIMIT0} SEPARATOR=\\\\n\\n... ---\\n... etcd:\\n... \\\\ \\\\ memoryLimitMB: 0'}}","documentation":""} {"code":"Set MemoryHigh Limit 256MB\n [Documentation] Set the memory limit for etcd to 256MB and ensure it takes effect\n [Setup] Setup With Custom Config ${MEMLIMIT256}\n # Expecting the setting to be 256 * 1024 * 1024\n Expect MemoryHigh 268435456\n [Teardown] Restore Default Config","name":"Set MemoryHigh Limit 256MB","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/etcd.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'MEMLIMIT256': {'text': '${MEMLIMIT256} SEPARATOR=\\\\n\\n... ---\\n... etcd:\\n... \\\\ \\\\ memoryLimitMB: 256'}}","documentation":""} {"code":"Setup\n [Documentation] Test suite setup\n Check Required Env Variables\n Login MicroShift Host\n Setup Kubeconfig # for readiness checks","name":"Setup","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/etcd.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Check Required Env Variables"} {"code":"Teardown\n [Documentation] Test suite teardown\n Restore Default Config\n Logout MicroShift Host\n Remove Kubeconfig","name":"Teardown","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/etcd.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Restore Default Config"} {"code":"Restore Default Config\n [Documentation] Remove any custom config and restart MicroShift\n Remove Drop In MicroShift Config 10-etcd\n Restart MicroShift","name":"Restore Default Config","imports_file_locations":"{'..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/etcd.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Remove Drop In MicroShift Config 10-etcd"} {"code":"Setup With Custom Config\n [Documentation] Install a custom config and restart MicroShift\n [Arguments] ${config_content}\n Drop In MicroShift Config ${config_content} 10-etcd\n Restart MicroShift","name":"Setup With Custom Config","imports_file_locations":"{'..\/..\/resources\/microshift-config.resource': 'test\/resources\/microshift-config.resource', '..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/etcd.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${config_content}"} {"code":"Expect MemoryHigh\n [Documentation] Verify that the MemoryHigh setting for etcd matches the expected value\n [Arguments] ${expected}\n ${actual}= Get Systemd Setting microshift-etcd.scope MemoryHigh\n # Using integer comparison is complicated here because sometimes\n # the returned or expected value is 'infinity'.\n Should Be Equal ${expected} ${actual}","name":"Expect MemoryHigh","imports_file_locations":"{'..\/..\/resources\/systemd.resource': 'test\/resources\/systemd.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/etcd.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${expected}"} {"code":"*** Settings ***\nDocumentation Tests verifying hostname resolution\n\nResource ..\/..\/resources\/microshift-process.resource\nResource ..\/..\/resources\/microshift-host.resource\nResource ..\/..\/resources\/oc.resource\nResource ..\/..\/resources\/ostree-health.resource\n\nSuite Setup Setup\nSuite Teardown Teardown\n\nTest Tags restart slow\n\n\n*** Variables ***\n${NEW_HOSTNAME} microshift.local\n${OLD_HOSTNAME} ${EMPTY}\n\n\n*** Test Cases ***\nVerify local name resolution\n [Documentation] Verify correct name resolution through mDNS\n [Setup] Configure New Hostname\n\n Named Deployment Should Be Available router-default timeout=120s ns=openshift-ingress\n Oc Logs namespace=\"openshift-ingress\" opts=\"deployment\/router-default\"\n\n [Teardown] Restore Old Hostname\n\n\n*** Keywords ***\nSetup\n [Documentation] Set up all of the tests in this suite\n Check Required Env Variables\n Login MicroShift Host\n Setup Kubeconfig\n\nTeardown\n [Documentation] Test suite teardown\n Remove Kubeconfig\n Logout MicroShift Host\n\nConfigure New Hostname\n [Documentation] Configures ${NEW_HOSTNAME} in the MicroShift host.\n ${old}= Setup Hostname ${NEW_HOSTNAME}\n Set Suite Variable \\${OLD_HOSTNAME} ${old}\n\nRestore Old Hostname\n [Documentation] Configure old hostname again in the MicroShift host.\n Setup Hostname ${OLD_HOSTNAME}\n\nSetup Hostname\n [Documentation] Setup a new hostname and return the old one.\n [Arguments] ${hostname}\n IF \"${hostname}\"==\"${EMPTY}\" RETURN\n ${old}= Change Hostname ${hostname}\n Cleanup MicroShift --all --keep-images\n Start MicroShift\n Restart Greenboot And Wait For Success\n RETURN ${old}\n","name":"\/tmp\/repos\/microshift\/test\/suites\/standard1\/hostname.robot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/hostname.robot","element_type":"test","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Verify local name resolution\n [Documentation] Verify correct name resolution through mDNS\n [Setup] Configure New Hostname\n\n Named Deployment Should Be Available router-default timeout=120s ns=openshift-ingress\n Oc Logs namespace=\"openshift-ingress\" opts=\"deployment\/router-default\"\n\n [Teardown] Restore Old Hostname","name":"Verify local name resolution","imports_file_locations":"{'..\/..\/resources\/oc.resource': 'test\/resources\/oc.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/hostname.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Setup\n [Documentation] Set up all of the tests in this suite\n Check Required Env Variables\n Login MicroShift Host\n Setup Kubeconfig","name":"Setup","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/hostname.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Check Required Env Variables"} {"code":"Teardown\n [Documentation] Test suite teardown\n Remove Kubeconfig\n Logout MicroShift Host","name":"Teardown","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/hostname.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Remove Kubeconfig"} {"code":"Configure New Hostname\n [Documentation] Configures ${NEW_HOSTNAME} in the MicroShift host.\n ${old}= Setup Hostname ${NEW_HOSTNAME}\n Set Suite Variable \\${OLD_HOSTNAME} ${old}","name":"Configure New Hostname","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/hostname.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'NEW_HOSTNAME': {'text': '${NEW_HOSTNAME} microshift.local'}, 'OLD_HOSTNAME': {'text': '${OLD_HOSTNAME} ${EMPTY}'}}","documentation":"${old}= Setup Hostname ${NEW_HOSTNAME}"} {"code":"Restore Old Hostname\n [Documentation] Configure old hostname again in the MicroShift host.\n Setup Hostname ${OLD_HOSTNAME}","name":"Restore Old Hostname","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/hostname.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'OLD_HOSTNAME': {'text': '${OLD_HOSTNAME} ${EMPTY}'}}","documentation":"Setup Hostname ${OLD_HOSTNAME}"} {"code":"Setup Hostname\n [Documentation] Setup a new hostname and return the old one.\n [Arguments] ${hostname}\n IF \"${hostname}\"==\"${EMPTY}\" RETURN\n ${old}= Change Hostname ${hostname}\n Cleanup MicroShift --all --keep-images\n Start MicroShift\n Restart Greenboot And Wait For Success\n RETURN ${old}","name":"Setup Hostname","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource', '..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource', '..\/..\/resources\/ostree-health.resource': 'test\/resources\/ostree-health.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/hostname.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${hostname}"} {"code":"*** Settings ***\nDocumentation Tests for applying manifests automatically via the kustomize controller\n\nLibrary Collections\nLibrary ..\/..\/resources\/journalctl.py\nResource ..\/..\/resources\/common.resource\nResource ..\/..\/resources\/systemd.resource\nResource ..\/..\/resources\/microshift-config.resource\nResource ..\/..\/resources\/microshift-process.resource\nResource ..\/..\/resources\/ostree.resource\nResource ..\/..\/resources\/ostree-health.resource\n\nSuite Setup Setup Suite\nSuite Teardown Teardown Suite\n\nTest Tags restart slow\n\n\n*** Variables ***\n${CONFIGMAP_NAME} test-configmap\n${NON_DEFAULT_DIR} \/home\/${USHIFT_USER}\/test-manifests\n${UNCONFIGURED_DIR} \/home\/${USHIFT_USER}\/test-manifests.d\/unconfigured\n${YAML_PATH} \/etc\/microshift\/manifests.d\/yaml-ext\n${YML_PATH} \/etc\/microshift\/manifests.d\/yml-ext\n${NOEXT_PATH} \/etc\/microshift\/manifests.d\/no-ext\n@{TO_DELETE} @{EMPTY}\n\n\n*** Test Cases ***\nLoad From \/etc\/microshift\/manifests\n [Documentation] \/etc\/microshift\/manifests\n ConfigMap Path Should Match ${ETC_NAMESPACE} \/etc\/microshift\/manifests\n\nLoad From \/etc\/microshift\/manifestsd\n # Keyword names cannot have '.' in them\n [Documentation] Subdir of \/etc\/microshift\/manifests.d\n ConfigMap Path Should Match ${ETC_SUBDIR_NAMESPACE} ${ETC_SUBDIR}\n\nDelete From \/etc\/microshift\/manifestsd\n # Keyword names cannot have '.' in them\n [Documentation] Delete manifest in \/etc\/microshift\/manifests.d\/delete\/\n Verify Manifest Deletion ${DELETE_ETC_SUBDIR_NAMESPACE} ${DELETE_ETC_SUBDIR}\n\nDelete From \/usr\/lib\/microshift\/manifestsd\n # Keyword names cannot have '.' in them\n [Documentation] Delete manifest in \/usr\/lib\/microshift\/manifests.d\/delete\/\n Verify Manifest Deletion ${DELETE_USR_SUBDIR_NAMESPACE} ${DELETE_USR_SUBDIR}\n\nLoad From \/usr\/lib\/microshift\/manifests\n [Documentation] \/usr\/lib\/microshift\/manifests\n ConfigMap Path Should Match ${USR_NAMESPACE} \/usr\/lib\/microshift\/manifests\n\nLoad From \/usr\/lib\/microshift\/manifestsd\n # Keyword names cannot have '.' in them\n [Documentation] Subdir of \/usr\/lib\/microshift\/manifests.d\n ConfigMap Path Should Match ${USR_SUBDIR_NAMESPACE} ${USR_SUBDIR}\n\nLoad From Configured Dir\n [Documentation] Non-default directory\n ConfigMap Path Should Match ${NON_DEFAULT_NAMESPACE} ${NON_DEFAULT_DIR}\n\nDo Not Load From Unconfigured Dir\n [Documentation] Manifests from a directory not in the config should not be loaded\n ConfigMap Should Be Missing ${UNCONFIGURED_NAMESPACE}\n\nYaml Extension\n [Documentation] Root file kustomization.yaml\n ConfigMap Path Should Match ${YAML_NAMESPACE} ${YAML_PATH}\n\nYml Extension\n [Documentation] Root file kustomization.yml\n ConfigMap Path Should Match ${YML_NAMESPACE} ${YML_PATH}\n\nNo Extension\n [Documentation] Root file Kustomization\n ConfigMap Path Should Match ${NOEXT_NAMESPACE} ${NOEXT_PATH}\n\n\n*** Keywords ***\nSetup Suite # robocop: disable=too-long-keyword\n [Documentation] Set up all of the tests in this suite\n Check Required Env Variables\n Login MicroShift Host\n Setup Kubeconfig # for readiness checks\n Make Usr Writable If OSTree System\n\n # Used by \"Load From \/etc\/microshift\/manifests\"\n ${ns}= Generate Manifests \/etc\/microshift\/manifests\n Set Suite Variable \\${ETC_NAMESPACE} ${ns}\n\n # Used by \"Load From \/etc\/microshift\/manifestsd\"\n ${rand}= Generate Random String\n Set Suite Variable \\${ETC_SUBDIR} \/etc\/microshift\/manifests.d\/${rand}\n ${ns}= Generate Manifests ${ETC_SUBDIR}\n Set Suite Variable \\${ETC_SUBDIR_NAMESPACE} ${ns}\n\n # Used by \"Delete from \/etc\/microshift\/manifestsd\"\n ${rand}= Generate Random String\n Set Suite Variable \\${DELETE_ETC_SUBDIR} \/etc\/microshift\/manifests.d\/${rand}\n ${ns}= Generate Manifests ${DELETE_ETC_SUBDIR}\n Set Suite Variable \\${DELETE_ETC_SUBDIR_NAMESPACE} ${ns}\n\n # Used by \"Load From \/usr\/lib\/microshift\/manifests\"\n ${ns}= Generate Manifests \/usr\/lib\/microshift\/manifests\n Set Suite Variable \\${USR_NAMESPACE} ${ns}\n\n # Used by \"Load From \/usr\/lib\/microshift\/manifestsd\"\n ${rand}= Generate Random String\n Set Suite Variable \\${USR_SUBDIR} \/usr\/lib\/microshift\/manifests.d\/${rand}\n ${ns}= Generate Manifests ${USR_SUBDIR}\n Set Suite Variable \\${USR_SUBDIR_NAMESPACE} ${ns}\n\n # Used by \"Delete from \/usr\/lib\/microshift\/manifestsd\"\n ${rand}= Generate Random String\n Set Suite Variable \\${DELETE_USR_SUBDIR} \/usr\/lib\/microshift\/manifests.d\/${rand}\n ${ns}= Generate Manifests ${DELETE_USR_SUBDIR}\n Set Suite Variable \\${DELETE_USR_SUBDIR_NAMESPACE} ${ns}\n\n # Used by \"Load From Configured Dir\"\n ${ns}= Generate Manifests ${NON_DEFAULT_DIR}\n Set Suite Variable \\${NON_DEFAULT_NAMESPACE} ${ns}\n\n # Used by \"Do Not Load From Unconfigured Dir\"\n ${ns}= Generate Manifests ${UNCONFIGURED_DIR}\n Set Suite Variable \\${UNCONFIGURED_NAMESPACE} ${ns}\n\n # Used by \"Yaml Extension\"\n ${ns}= Generate Manifests ${YAML_PATH} kustomization.yaml\n Set Suite Variable \\${YAML_NAMESPACE} ${ns}\n\n # Used by \"Yml Extension\"\n ${ns}= Generate Manifests ${YML_PATH} kustomization.yml\n Set Suite Variable \\${YML_NAMESPACE} ${ns}\n\n # Used by \"No Extension\"\n ${ns}= Generate Manifests ${NOEXT_PATH} Kustomization\n Set Suite Variable \\${NOEXT_NAMESPACE} ${ns}\n\n # Extend the configuration setting to add the unique path to the defaults\n ${config_content}= Catenate SEPARATOR=\\n\n ... manifests:\n ... \\ \\ kustomizePaths:\n ... \\ \\ \\ \\ - \/etc\/microshift\/manifests\n ... \\ \\ \\ \\ - \/etc\/microshift\/manifests.d\/*\n ... \\ \\ \\ \\ - \/usr\/lib\/microshift\/manifests\n ... \\ \\ \\ \\ - \/usr\/lib\/microshift\/manifests.d\/*\n ... \\ \\ \\ \\ - ${NON_DEFAULT_DIR}\n ... \\ \\ \\ \\ # Add a directory _without_ the glob for unconfigured test\n ... \\ \\ \\ \\ - \/home\/${USHIFT_USER}\/test-manifests.d\n Drop In MicroShift Config ${config_content} 10-kustomize\n\n Restart MicroShift\n\nTeardown Suite # robocop: disable=too-many-calls-in-keyword\n [Documentation] Clean up all of the tests in this suite\n\n Clear Manifest Directory \/etc\/microshift\/manifests\n Remove Manifest Directory ${ETC_SUBDIR}\n Clear Manifest Directory \/usr\/lib\/microshift\/manifests\n Remove Manifest Directory ${USR_SUBDIR}\n Remove Manifest Directory ${NON_DEFAULT_DIR}\n Remove Manifest Directory ${UNCONFIGURED_DIR}\n Remove Manifest Directory ${YAML_PATH}\n Remove Manifest Directory ${YML_PATH}\n Remove Manifest Directory ${NOEXT_PATH}\n FOR ${path} IN @{TO_DELETE}\n Remove Manifest Directory ${path}\n END\n\n Run With Kubeconfig oc delete namespace ${ETC_NAMESPACE} allow_fail=True\n Run With Kubeconfig oc delete namespace ${ETC_SUBDIR_NAMESPACE} allow_fail=True\n Run With Kubeconfig oc delete namespace ${USR_NAMESPACE} allow_fail=True\n Run With Kubeconfig oc delete namespace ${USR_SUBDIR_NAMESPACE} allow_fail=True\n Run With Kubeconfig oc delete namespace ${NON_DEFAULT_NAMESPACE} allow_fail=True\n Run With Kubeconfig oc delete namespace ${UNCONFIGURED_NAMESPACE} allow_fail=True\n Run With Kubeconfig oc delete namespace ${YAML_NAMESPACE} allow_fail=True\n Run With Kubeconfig oc delete namespace ${YML_NAMESPACE} allow_fail=True\n Run With Kubeconfig oc delete namespace ${NOEXT_NAMESPACE} allow_fail=True\n\n Restore Default Config\n Logout MicroShift Host\n Remove Kubeconfig\n\nMake Usr Writable If OSTree System\n [Documentation] Makes \/usr directory writable if host is an OSTree system.\n ${is_ostree}= Is System OSTree\n IF ${is_ostree} Create Usr Directory Overlay\n\nGenerate Manifests\n [Documentation] Create a namespace and the manifests in the given path.\n ... Return the namespace.\n [Arguments] ${manifest_dir} ${kfile}=kustomization.yaml\n ${ns}= Create Random Namespace\n Clear Manifest Directory ${manifest_dir}\n Write Manifests ${manifest_dir} ${ns} ${kfile}\n RETURN ${ns}\n\nWrite Manifests\n [Documentation] Install manifests\n [Arguments] ${manifest_dir} ${namespace} ${kfile}\n # Make sure the manifest directory exists\n ${stdout} ${rc}= Execute Command\n ... mkdir -p ${manifest_dir}\n ... sudo=True return_rc=True\n Should Be Equal As Integers 0 ${rc}\n # Configure kustomization to use the namespace created in Setup\n ${kustomization}= Catenate SEPARATOR=\\n\n ... resources:\n ... - configmap.yaml\n ... namespace: ${namespace}\n ...\n Upload String To File ${kustomization} ${manifest_dir}\/${kfile}\n # Build a configmap with unique data for this scenario\n ${configmap}= Catenate SEPARATOR=\\n\n ... apiVersion: v1\n ... kind: ConfigMap\n ... metadata:\n ... \\ \\ name: ${CONFIGMAP_NAME}\n ... data:\n ... \\ \\ path: ${manifest_dir}\n ...\n Upload String To File ${configmap} ${manifest_dir}\/configmap.yaml\n\nConfigMap Path Should Match\n [Documentation] Ensure the config map path value matches the manifest dir\n [Arguments] ${namespace} ${manifest_dir}\n ${configmap}= Oc Get configmap ${namespace} ${CONFIGMAP_NAME}\n Should Be Equal ${manifest_dir} ${configmap.data.path}\n\nConfigMap Should Be Missing\n [Documentation] Ensure the config map was not created\n [Arguments] ${namespace}\n ${result}= Run Process oc get configmap -n ${namespace} ${CONFIGMAP_NAME}\n ... env:KUBECONFIG=${KUBECONFIG}\n ... stderr=STDOUT\n ... shell=True\n Should Be Equal As Integers ${result.rc} 1\n\nClear Manifest Directory\n [Documentation] Remove the contents of the manifest directory\n [Arguments] ${manifest_dir}\n ${stdout} ${rc}= Execute Command\n ... rm -rf ${manifest_dir}\/*\n ... sudo=True return_rc=True\n Should Be Equal As Integers 0 ${rc}\n\nRemove Manifest Directory\n [Documentation] Completely remove the directory\n [Arguments] ${manifest_dir}\n ${stdout} ${rc}= Execute Command\n ... rm -rf ${manifest_dir}\n ... sudo=True return_rc=True\n Should Be Equal As Integers 0 ${rc}\n\nRestore Default Config\n [Documentation] Remove any custom config and restart MicroShift\n Remove Drop In MicroShift Config 10-kustomize\n\n # When restoring, we check if ostree is active, if so we reboot\n # to convert everything back to normal, MicroShift restart should not\n # be needed in that instance\n ${is_ostree}= Is System OSTree\n IF ${is_ostree}\n Reboot MicroShift Host\n Wait Until Greenboot Health Check Exited\n ELSE\n Restart MicroShift\n Sleep 10 seconds # Wait for systemd to catch up\n END\n\nVerify Manifest Deletion\n [Documentation] Verify that manifest deletion works as expected.\n [Arguments] ${ns} ${manifest_path}\n ConfigMap Path Should Match ${ns} ${manifest_path}\n ${delete_base_dir} ${delete_manifest_path}= Get Manifest Deletion Paths ${manifest_path}\n Append To List ${TO_DELETE} ${delete_base_dir}\n Command Should Work mkdir -p ${delete_base_dir}\n Command Should Work mv ${manifest_path} ${delete_manifest_path}\n ${cursor}= Get Journal Cursor\n Restart MicroShift\n ConfigMap Should Be Missing ${ns}\n Pattern Should Appear In Log Output\n ... ${cursor}\n ... Deleting kustomization at ${delete_manifest_path} was successful.\n\nGet Manifest Deletion Paths\n [Documentation] For given manifest path, get path to 'delete' subdir and destination dir for manifest to be deleted.\n [Arguments] ${manifest_path}\n ${path_list}= Split String ${manifest_path} \/\n ${manifest_dirname}= Set Variable ${path_list}[-1]\n ${delete_base_dir}= Evaluate \"\/\".join(${path_list}[:-1]+[\"delete\"])\n ${delete_manifest_path}= Catenate SEPARATOR=\/ ${delete_base_dir} ${manifest_dirname}\n RETURN ${delete_base_dir} ${delete_manifest_path}\n","name":"\/tmp\/repos\/microshift\/test\/suites\/standard1\/kustomize.robot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/kustomize.robot","element_type":"test","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Load From \/etc\/microshift\/manifests\n [Documentation] \/etc\/microshift\/manifests\n ConfigMap Path Should Match ${ETC_NAMESPACE} \/etc\/microshift\/manifests","name":"Load From \/etc\/microshift\/manifests","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/kustomize.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Load From \/etc\/microshift\/manifestsd\n # Keyword names cannot have '.' in them\n [Documentation] Subdir of \/etc\/microshift\/manifests.d\n ConfigMap Path Should Match ${ETC_SUBDIR_NAMESPACE} ${ETC_SUBDIR}","name":"Load From \/etc\/microshift\/manifestsd","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/kustomize.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Delete From \/etc\/microshift\/manifestsd\n # Keyword names cannot have '.' in them\n [Documentation] Delete manifest in \/etc\/microshift\/manifests.d\/delete\/\n Verify Manifest Deletion ${DELETE_ETC_SUBDIR_NAMESPACE} ${DELETE_ETC_SUBDIR}","name":"Delete From \/etc\/microshift\/manifestsd","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/kustomize.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Delete From \/usr\/lib\/microshift\/manifestsd\n # Keyword names cannot have '.' in them\n [Documentation] Delete manifest in \/usr\/lib\/microshift\/manifests.d\/delete\/\n Verify Manifest Deletion ${DELETE_USR_SUBDIR_NAMESPACE} ${DELETE_USR_SUBDIR}","name":"Delete From \/usr\/lib\/microshift\/manifestsd","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/kustomize.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Load From \/usr\/lib\/microshift\/manifests\n [Documentation] \/usr\/lib\/microshift\/manifests\n ConfigMap Path Should Match ${USR_NAMESPACE} \/usr\/lib\/microshift\/manifests","name":"Load From \/usr\/lib\/microshift\/manifests","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/kustomize.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Load From \/usr\/lib\/microshift\/manifestsd\n # Keyword names cannot have '.' in them\n [Documentation] Subdir of \/usr\/lib\/microshift\/manifests.d\n ConfigMap Path Should Match ${USR_SUBDIR_NAMESPACE} ${USR_SUBDIR}","name":"Load From \/usr\/lib\/microshift\/manifestsd","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/kustomize.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Load From Configured Dir\n [Documentation] Non-default directory\n ConfigMap Path Should Match ${NON_DEFAULT_NAMESPACE} ${NON_DEFAULT_DIR}","name":"Load From Configured Dir","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/kustomize.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'NON_DEFAULT_DIR': {'text': '${NON_DEFAULT_DIR} \/home\/${USHIFT_USER}\/test-manifests'}}","documentation":""} {"code":"Do Not Load From Unconfigured Dir\n [Documentation] Manifests from a directory not in the config should not be loaded\n ConfigMap Should Be Missing ${UNCONFIGURED_NAMESPACE}","name":"Do Not Load From Unconfigured Dir","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/kustomize.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Yaml Extension\n [Documentation] Root file kustomization.yaml\n ConfigMap Path Should Match ${YAML_NAMESPACE} ${YAML_PATH}","name":"Yaml Extension","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/kustomize.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'YAML_PATH': {'text': '${YAML_PATH} \/etc\/microshift\/manifests.d\/yaml-ext'}}","documentation":""} {"code":"Yml Extension\n [Documentation] Root file kustomization.yml\n ConfigMap Path Should Match ${YML_NAMESPACE} ${YML_PATH}","name":"Yml Extension","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/kustomize.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'YML_PATH': {'text': '${YML_PATH} \/etc\/microshift\/manifests.d\/yml-ext'}}","documentation":""} {"code":"No Extension\n [Documentation] Root file Kustomization\n ConfigMap Path Should Match ${NOEXT_NAMESPACE} ${NOEXT_PATH}","name":"No Extension","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/kustomize.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'NOEXT_PATH': {'text': '${NOEXT_PATH} \/etc\/microshift\/manifests.d\/no-ext'}}","documentation":""} {"code":"Setup Suite # robocop: disable=too-long-keyword\n [Documentation] Set up all of the tests in this suite\n Check Required Env Variables\n Login MicroShift Host\n Setup Kubeconfig # for readiness checks\n Make Usr Writable If OSTree System\n\n # Used by \"Load From \/etc\/microshift\/manifests\"\n ${ns}= Generate Manifests \/etc\/microshift\/manifests\n Set Suite Variable \\${ETC_NAMESPACE} ${ns}\n\n # Used by \"Load From \/etc\/microshift\/manifestsd\"\n ${rand}= Generate Random String\n Set Suite Variable \\${ETC_SUBDIR} \/etc\/microshift\/manifests.d\/${rand}\n ${ns}= Generate Manifests ${ETC_SUBDIR}\n Set Suite Variable \\${ETC_SUBDIR_NAMESPACE} ${ns}\n\n # Used by \"Delete from \/etc\/microshift\/manifestsd\"\n ${rand}= Generate Random String\n Set Suite Variable \\${DELETE_ETC_SUBDIR} \/etc\/microshift\/manifests.d\/${rand}\n ${ns}= Generate Manifests ${DELETE_ETC_SUBDIR}\n Set Suite Variable \\${DELETE_ETC_SUBDIR_NAMESPACE} ${ns}\n\n # Used by \"Load From \/usr\/lib\/microshift\/manifests\"\n ${ns}= Generate Manifests \/usr\/lib\/microshift\/manifests\n Set Suite Variable \\${USR_NAMESPACE} ${ns}\n\n # Used by \"Load From \/usr\/lib\/microshift\/manifestsd\"\n ${rand}= Generate Random String\n Set Suite Variable \\${USR_SUBDIR} \/usr\/lib\/microshift\/manifests.d\/${rand}\n ${ns}= Generate Manifests ${USR_SUBDIR}\n Set Suite Variable \\${USR_SUBDIR_NAMESPACE} ${ns}\n\n # Used by \"Delete from \/usr\/lib\/microshift\/manifestsd\"\n ${rand}= Generate Random String\n Set Suite Variable \\${DELETE_USR_SUBDIR} \/usr\/lib\/microshift\/manifests.d\/${rand}\n ${ns}= Generate Manifests ${DELETE_USR_SUBDIR}\n Set Suite Variable \\${DELETE_USR_SUBDIR_NAMESPACE} ${ns}\n\n # Used by \"Load From Configured Dir\"\n ${ns}= Generate Manifests ${NON_DEFAULT_DIR}\n Set Suite Variable \\${NON_DEFAULT_NAMESPACE} ${ns}\n\n # Used by \"Do Not Load From Unconfigured Dir\"\n ${ns}= Generate Manifests ${UNCONFIGURED_DIR}\n Set Suite Variable \\${UNCONFIGURED_NAMESPACE} ${ns}\n\n # Used by \"Yaml Extension\"\n ${ns}= Generate Manifests ${YAML_PATH} kustomization.yaml\n Set Suite Variable \\${YAML_NAMESPACE} ${ns}\n\n # Used by \"Yml Extension\"\n ${ns}= Generate Manifests ${YML_PATH} kustomization.yml\n Set Suite Variable \\${YML_NAMESPACE} ${ns}\n\n # Used by \"No Extension\"\n ${ns}= Generate Manifests ${NOEXT_PATH} Kustomization\n Set Suite Variable \\${NOEXT_NAMESPACE} ${ns}\n\n # Extend the configuration setting to add the unique path to the defaults\n ${config_content}= Catenate SEPARATOR=\\n\n ... manifests:\n ... \\ \\ kustomizePaths:\n ... \\ \\ \\ \\ - \/etc\/microshift\/manifests\n ... \\ \\ \\ \\ - \/etc\/microshift\/manifests.d\/*\n ... \\ \\ \\ \\ - \/usr\/lib\/microshift\/manifests\n ... \\ \\ \\ \\ - \/usr\/lib\/microshift\/manifests.d\/*\n ... \\ \\ \\ \\ - ${NON_DEFAULT_DIR}\n ... \\ \\ \\ \\ # Add a directory _without_ the glob for unconfigured test\n ... \\ \\ \\ \\ - \/home\/${USHIFT_USER}\/test-manifests.d\n Drop In MicroShift Config ${config_content} 10-kustomize\n\n Restart MicroShift","name":"Setup Suite","imports_file_locations":"{'..\/..\/resources\/microshift-config.resource': 'test\/resources\/microshift-config.resource', '..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/kustomize.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'NON_DEFAULT_DIR': {'text': '${NON_DEFAULT_DIR} \/home\/${USHIFT_USER}\/test-manifests'}, 'UNCONFIGURED_DIR': {'text': '${UNCONFIGURED_DIR} \/home\/${USHIFT_USER}\/test-manifests.d\/unconfigured'}, 'YAML_PATH': {'text': '${YAML_PATH} \/etc\/microshift\/manifests.d\/yaml-ext'}, 'YML_PATH': {'text': '${YML_PATH} \/etc\/microshift\/manifests.d\/yml-ext'}, 'NOEXT_PATH': {'text': '${NOEXT_PATH} \/etc\/microshift\/manifests.d\/no-ext'}}","documentation":"Check Required Env Variables"} {"code":"Teardown Suite # robocop: disable=too-many-calls-in-keyword\n [Documentation] Clean up all of the tests in this suite\n\n Clear Manifest Directory \/etc\/microshift\/manifests\n Remove Manifest Directory ${ETC_SUBDIR}\n Clear Manifest Directory \/usr\/lib\/microshift\/manifests\n Remove Manifest Directory ${USR_SUBDIR}\n Remove Manifest Directory ${NON_DEFAULT_DIR}\n Remove Manifest Directory ${UNCONFIGURED_DIR}\n Remove Manifest Directory ${YAML_PATH}\n Remove Manifest Directory ${YML_PATH}\n Remove Manifest Directory ${NOEXT_PATH}\n FOR ${path} IN @{TO_DELETE}\n Remove Manifest Directory ${path}\n END\n\n Run With Kubeconfig oc delete namespace ${ETC_NAMESPACE} allow_fail=True\n Run With Kubeconfig oc delete namespace ${ETC_SUBDIR_NAMESPACE} allow_fail=True\n Run With Kubeconfig oc delete namespace ${USR_NAMESPACE} allow_fail=True\n Run With Kubeconfig oc delete namespace ${USR_SUBDIR_NAMESPACE} allow_fail=True\n Run With Kubeconfig oc delete namespace ${NON_DEFAULT_NAMESPACE} allow_fail=True\n Run With Kubeconfig oc delete namespace ${UNCONFIGURED_NAMESPACE} allow_fail=True\n Run With Kubeconfig oc delete namespace ${YAML_NAMESPACE} allow_fail=True\n Run With Kubeconfig oc delete namespace ${YML_NAMESPACE} allow_fail=True\n Run With Kubeconfig oc delete namespace ${NOEXT_NAMESPACE} allow_fail=True\n\n Restore Default Config\n Logout MicroShift Host\n Remove Kubeconfig","name":"Teardown Suite","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/kustomize.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'NON_DEFAULT_DIR': {'text': '${NON_DEFAULT_DIR} \/home\/${USHIFT_USER}\/test-manifests'}, 'UNCONFIGURED_DIR': {'text': '${UNCONFIGURED_DIR} \/home\/${USHIFT_USER}\/test-manifests.d\/unconfigured'}, 'YAML_PATH': {'text': '${YAML_PATH} \/etc\/microshift\/manifests.d\/yaml-ext'}, 'YML_PATH': {'text': '${YML_PATH} \/etc\/microshift\/manifests.d\/yml-ext'}, 'NOEXT_PATH': {'text': '${NOEXT_PATH} \/etc\/microshift\/manifests.d\/no-ext'}, 'TO_DELETE': {'text': '@{TO_DELETE} @{EMPTY}'}}","documentation":"Clear Manifest Directory \/etc\/microshift\/manifests"} {"code":"Make Usr Writable If OSTree System\n [Documentation] Makes \/usr directory writable if host is an OSTree system.\n ${is_ostree}= Is System OSTree\n IF ${is_ostree} Create Usr Directory Overlay","name":"Make Usr Writable If OSTree System","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/kustomize.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${is_ostree}= Is System OSTree"} {"code":"Generate Manifests\n [Documentation] Create a namespace and the manifests in the given path.\n ... Return the namespace.\n [Arguments] ${manifest_dir} ${kfile}=kustomization.yaml\n ${ns}= Create Random Namespace\n Clear Manifest Directory ${manifest_dir}\n Write Manifests ${manifest_dir} ${ns} ${kfile}\n RETURN ${ns}","name":"Generate Manifests","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/kustomize.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${manifest_dir} ${kfile}=kustomization.yaml"} {"code":"Write Manifests\n [Documentation] Install manifests\n [Arguments] ${manifest_dir} ${namespace} ${kfile}\n # Make sure the manifest directory exists\n ${stdout} ${rc}= Execute Command\n ... mkdir -p ${manifest_dir}\n ... sudo=True return_rc=True\n Should Be Equal As Integers 0 ${rc}\n # Configure kustomization to use the namespace created in Setup\n ${kustomization}= Catenate SEPARATOR=\\n\n ... resources:\n ... - configmap.yaml\n ... namespace: ${namespace}\n ...\n Upload String To File ${kustomization} ${manifest_dir}\/${kfile}\n # Build a configmap with unique data for this scenario\n ${configmap}= Catenate SEPARATOR=\\n\n ... apiVersion: v1\n ... kind: ConfigMap\n ... metadata:\n ... \\ \\ name: ${CONFIGMAP_NAME}\n ... data:\n ... \\ \\ path: ${manifest_dir}\n ...\n Upload String To File ${configmap} ${manifest_dir}\/configmap.yaml","name":"Write Manifests","imports_file_locations":"{'..\/..\/resources\/common.resource': 'test\/resources\/common.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/kustomize.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'CONFIGMAP_NAME': {'text': '${CONFIGMAP_NAME} test-configmap'}}","documentation":"[Arguments] ${manifest_dir} ${namespace} ${kfile}"} {"code":"ConfigMap Path Should Match\n [Documentation] Ensure the config map path value matches the manifest dir\n [Arguments] ${namespace} ${manifest_dir}\n ${configmap}= Oc Get configmap ${namespace} ${CONFIGMAP_NAME}\n Should Be Equal ${manifest_dir} ${configmap.data.path}","name":"ConfigMap Path Should Match","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/kustomize.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'CONFIGMAP_NAME': {'text': '${CONFIGMAP_NAME} test-configmap'}}","documentation":"[Arguments] ${namespace} ${manifest_dir}"} {"code":"ConfigMap Should Be Missing\n [Documentation] Ensure the config map was not created\n [Arguments] ${namespace}\n ${result}= Run Process oc get configmap -n ${namespace} ${CONFIGMAP_NAME}\n ... env:KUBECONFIG=${KUBECONFIG}\n ... stderr=STDOUT\n ... shell=True\n Should Be Equal As Integers ${result.rc} 1","name":"ConfigMap Should Be Missing","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/kustomize.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'CONFIGMAP_NAME': {'text': '${CONFIGMAP_NAME} test-configmap'}}","documentation":"[Arguments] ${namespace}"} {"code":"Clear Manifest Directory\n [Documentation] Remove the contents of the manifest directory\n [Arguments] ${manifest_dir}\n ${stdout} ${rc}= Execute Command\n ... rm -rf ${manifest_dir}\/*\n ... sudo=True return_rc=True\n Should Be Equal As Integers 0 ${rc}","name":"Clear Manifest Directory","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/kustomize.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${manifest_dir}"} {"code":"Remove Manifest Directory\n [Documentation] Completely remove the directory\n [Arguments] ${manifest_dir}\n ${stdout} ${rc}= Execute Command\n ... rm -rf ${manifest_dir}\n ... sudo=True return_rc=True\n Should Be Equal As Integers 0 ${rc}","name":"Remove Manifest Directory","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/kustomize.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${manifest_dir}"} {"code":"Restore Default Config\n [Documentation] Remove any custom config and restart MicroShift\n Remove Drop In MicroShift Config 10-kustomize\n\n # When restoring, we check if ostree is active, if so we reboot\n # to convert everything back to normal, MicroShift restart should not\n # be needed in that instance\n ${is_ostree}= Is System OSTree\n IF ${is_ostree}\n Reboot MicroShift Host\n Wait Until Greenboot Health Check Exited\n ELSE\n Restart MicroShift\n Sleep 10 seconds # Wait for systemd to catch up\n END","name":"Restore Default Config","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/kustomize.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Remove Drop In MicroShift Config 10-kustomize"} {"code":"Verify Manifest Deletion\n [Documentation] Verify that manifest deletion works as expected.\n [Arguments] ${ns} ${manifest_path}\n ConfigMap Path Should Match ${ns} ${manifest_path}\n ${delete_base_dir} ${delete_manifest_path}= Get Manifest Deletion Paths ${manifest_path}\n Append To List ${TO_DELETE} ${delete_base_dir}\n Command Should Work mkdir -p ${delete_base_dir}\n Command Should Work mv ${manifest_path} ${delete_manifest_path}\n ${cursor}= Get Journal Cursor\n Restart MicroShift\n ConfigMap Should Be Missing ${ns}\n Pattern Should Appear In Log Output\n ... ${cursor}\n ... Deleting kustomization at ${delete_manifest_path} was successful.","name":"Verify Manifest Deletion","imports_file_locations":"{'..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/kustomize.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'TO_DELETE': {'text': '@{TO_DELETE} @{EMPTY}'}}","documentation":"[Arguments] ${ns} ${manifest_path}"} {"code":"Get Manifest Deletion Paths\n [Documentation] For given manifest path, get path to 'delete' subdir and destination dir for manifest to be deleted.\n [Arguments] ${manifest_path}\n ${path_list}= Split String ${manifest_path} \/\n ${manifest_dirname}= Set Variable ${path_list}[-1]\n ${delete_base_dir}= Evaluate \"\/\".join(${path_list}[:-1]+[\"delete\"])\n ${delete_manifest_path}= Catenate SEPARATOR=\/ ${delete_base_dir} ${manifest_dirname}\n RETURN ${delete_base_dir} ${delete_manifest_path}","name":"Get Manifest Deletion Paths","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/kustomize.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${manifest_path}"} {"code":"*** Settings ***\nDocumentation Networking smoke tests\n\nResource ..\/..\/resources\/common.resource\nResource ..\/..\/resources\/oc.resource\nResource ..\/..\/resources\/ostree-health.resource\nResource ..\/..\/resources\/microshift-network.resource\n\nSuite Setup Setup Suite With Namespace\nSuite Teardown Teardown Suite With Namespace\n\nTest Tags slow\n\n\n*** Variables ***\n${HELLO_USHIFT_INGRESS} .\/assets\/hello\/hello-microshift-ingress.yaml\n${HOSTNAME} hello-microshift.cluster.local\n\n\n*** Test Cases ***\nRouter Smoke Test\n [Documentation] Run a router smoke test\n [Setup] Run Keywords\n ... Create Hello MicroShift Pod\n ... Expose Hello MicroShift Service Via Route\n ... Restart Router\n\n Wait Until Keyword Succeeds 10x 6s\n ... Access Hello Microshift Success ${HTTP_PORT}\n\n DNS Entry For Route Should Resolve\n\n [Teardown] Run Keywords\n ... Delete Hello MicroShift Route\n ... Delete Hello MicroShift Pod And Service\n ... Wait For Service Deletion With Timeout\n\nLoad Balancer Smoke Test\n [Documentation] Verify that Load Balancer correctly exposes HTTP service\n Verify Hello MicroShift LB\n\nIngress Smoke Test\n [Documentation] Verify a simple ingress rule correctly exposes HTTP service\n [Setup] Run Keywords\n ... Create Hello MicroShift Pod\n ... Expose Hello MicroShift\n ... Create Hello MicroShift Ingress\n ... Restart Router\n\n Wait Until Keyword Succeeds 10x 6s\n ... Access Hello Microshift Success ${HTTP_PORT} path=\/principal\n\n [Teardown] Run Keywords\n ... Delete Hello MicroShift Ingress\n ... Delete Hello MicroShift Pod And Service\n ... Wait For Service Deletion With Timeout\n\n\n*** Keywords ***\nExpose Hello MicroShift Service Via Route\n [Documentation] Expose the \"hello microshift\" application through the Route\n Oc Expose pod hello-microshift -n ${NAMESPACE}\n Oc Expose svc hello-microshift --hostname hello-microshift.cluster.local -n ${NAMESPACE}\n\nDelete Hello MicroShift Route\n [Documentation] Delete route for cleanup.\n Oc Delete route\/hello-microshift -n ${NAMESPACE}\n\nWait For Service Deletion With Timeout\n [Documentation] Polls for service and endpoint by \"app=hello-microshift\" label. Fails if timeout\n ... expires. This check is unique to this test suite because each test here reuses the same namespace. Since\n ... the tests reuse the service name, a small race window exists between the teardown of one test and the setup\n ... of the next. This produces flakey failures when the service or endpoint names collide.\n Wait Until Keyword Succeeds 30s 1s\n ... Network APIs With Test Label Are Gone\n\nRestart Router\n [Documentation] Restart the router and wait for readiness again. The router is sensitive to apiserver\n ... downtime and might need a restart (after the apiserver is ready) to resync all the routes.\n Run With Kubeconfig oc rollout restart deployment router-default -n openshift-ingress\n Named Deployment Should Be Available router-default openshift-ingress 5m\n\nNetwork APIs With Test Label Are Gone\n [Documentation] Check for service and endpoint by \"app=hello-microshift\" label. Succeeds if response matches\n ... \"No resources found in namespace.\" Fail if not.\n ${match_string}= Catenate No resources found in ${NAMESPACE} namespace.\n ${match_string}= Remove String ${match_string} \"\n ${response}= Run With Kubeconfig oc get svc,ep -l app\\=hello-microshift -n ${NAMESPACE}\n Should Be Equal As Strings ${match_string} ${response} strip_spaces=True\n\nCreate Hello MicroShift Ingress\n [Documentation] Create ingress rule.\n Oc Create -f ${HELLO_USHIFT_INGRESS} -n ${NAMESPACE}\n\nDelete Hello MicroShift Ingress\n [Documentation] Delete ingress for cleanup.\n Oc Delete -f ${HELLO_USHIFT_INGRESS} -n ${NAMESPACE}\n\nDNS Entry For Route Should Resolve\n [Documentation] Resolve hello-microshift route via mDNS from the hypervisor\/RF runner.\n ... Expects RF runner host has opened port 5353 for libvirt zone.\n\n ${result}= Run Process\n ... avahi-resolve-host-name ${HOSTNAME}\n ... shell=True\n ... timeout=15s\n Log Many ${result.stdout} ${result.stderr}\n\n # avahi-resolve-host-name always returns rc=0, even if it failed to resolve.\n # In case of failure, stdout will be empty and stderr will contain error.\n # Expected success stdout:\n # > hello-microshift.cluster.local 192.168.124.5\n # Possible stderr:\n # > Failed to resolve host name 'hello-microshift.cluster.local': Timeout reached\n Should Not Be Empty ${result.stdout}\n Should Be Empty ${result.stderr}\n","name":"\/tmp\/repos\/microshift\/test\/suites\/standard1\/networking-smoke.robot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/networking-smoke.robot","element_type":"test","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Router Smoke Test\n [Documentation] Run a router smoke test\n [Setup] Run Keywords\n ... Create Hello MicroShift Pod\n ... Expose Hello MicroShift Service Via Route\n ... Restart Router\n\n Wait Until Keyword Succeeds 10x 6s\n ... Access Hello Microshift Success ${HTTP_PORT}\n\n DNS Entry For Route Should Resolve\n\n [Teardown] Run Keywords\n ... Delete Hello MicroShift Route\n ... Delete Hello MicroShift Pod And Service\n ... Wait For Service Deletion With Timeout","name":"Router Smoke Test","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/networking-smoke.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Load Balancer Smoke Test\n [Documentation] Verify that Load Balancer correctly exposes HTTP service\n Verify Hello MicroShift LB","name":"Load Balancer Smoke Test","imports_file_locations":"{'..\/..\/resources\/microshift-network.resource': 'test\/resources\/microshift-network.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/networking-smoke.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Ingress Smoke Test\n [Documentation] Verify a simple ingress rule correctly exposes HTTP service\n [Setup] Run Keywords\n ... Create Hello MicroShift Pod\n ... Expose Hello MicroShift\n ... Create Hello MicroShift Ingress\n ... Restart Router\n\n Wait Until Keyword Succeeds 10x 6s\n ... Access Hello Microshift Success ${HTTP_PORT} path=\/principal\n\n [Teardown] Run Keywords\n ... Delete Hello MicroShift Ingress\n ... Delete Hello MicroShift Pod And Service\n ... Wait For Service Deletion With Timeout","name":"Ingress Smoke Test","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/networking-smoke.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Expose Hello MicroShift Service Via Route\n [Documentation] Expose the \"hello microshift\" application through the Route\n Oc Expose pod hello-microshift -n ${NAMESPACE}\n Oc Expose svc hello-microshift --hostname hello-microshift.cluster.local -n ${NAMESPACE}","name":"Expose Hello MicroShift Service Via Route","imports_file_locations":"{'..\/..\/resources\/oc.resource': 'test\/resources\/oc.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/networking-smoke.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Oc Expose pod hello-microshift -n ${NAMESPACE}"} {"code":"Delete Hello MicroShift Route\n [Documentation] Delete route for cleanup.\n Oc Delete route\/hello-microshift -n ${NAMESPACE}","name":"Delete Hello MicroShift Route","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/networking-smoke.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Oc Delete route\/hello-microshift -n ${NAMESPACE}"} {"code":"Wait For Service Deletion With Timeout\n [Documentation] Polls for service and endpoint by \"app=hello-microshift\" label. Fails if timeout\n ... expires. This check is unique to this test suite because each test here reuses the same namespace. Since\n ... the tests reuse the service name, a small race window exists between the teardown of one test and the setup\n ... of the next. This produces flakey failures when the service or endpoint names collide.\n Wait Until Keyword Succeeds 30s 1s\n ... Network APIs With Test Label Are Gone","name":"Wait For Service Deletion With Timeout","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/networking-smoke.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"the tests reuse the service name, a small race window exists between the teardown of one test and the setup\n ... of the next. This produces flakey failures when the service or endpoint names collide."} {"code":"Restart Router\n [Documentation] Restart the router and wait for readiness again. The router is sensitive to apiserver\n ... downtime and might need a restart (after the apiserver is ready) to resync all the routes.\n Run With Kubeconfig oc rollout restart deployment router-default -n openshift-ingress\n Named Deployment Should Be Available router-default openshift-ingress 5m","name":"Restart Router","imports_file_locations":"{'..\/..\/resources\/oc.resource': 'test\/resources\/oc.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/networking-smoke.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"downtime and might need a restart (after the apiserver is ready) to resync all the routes."} {"code":"Network APIs With Test Label Are Gone\n [Documentation] Check for service and endpoint by \"app=hello-microshift\" label. Succeeds if response matches\n ... \"No resources found in namespace.\" Fail if not.\n ${match_string}= Catenate No resources found in ${NAMESPACE} namespace.\n ${match_string}= Remove String ${match_string} \"\n ${response}= Run With Kubeconfig oc get svc,ep -l app\\=hello-microshift -n ${NAMESPACE}\n Should Be Equal As Strings ${match_string} ${response} strip_spaces=True","name":"Network APIs With Test Label Are Gone","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/networking-smoke.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"\"No resources found in namespace.\" Fail if not."} {"code":"Create Hello MicroShift Ingress\n [Documentation] Create ingress rule.\n Oc Create -f ${HELLO_USHIFT_INGRESS} -n ${NAMESPACE}","name":"Create Hello MicroShift Ingress","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/networking-smoke.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'HELLO_USHIFT_INGRESS': {'text': '${HELLO_USHIFT_INGRESS} .\/assets\/hello\/hello-microshift-ingress.yaml'}}","documentation":"Oc Create -f ${HELLO_USHIFT_INGRESS} -n ${NAMESPACE}"} {"code":"Delete Hello MicroShift Ingress\n [Documentation] Delete ingress for cleanup.\n Oc Delete -f ${HELLO_USHIFT_INGRESS} -n ${NAMESPACE}","name":"Delete Hello MicroShift Ingress","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/networking-smoke.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'HELLO_USHIFT_INGRESS': {'text': '${HELLO_USHIFT_INGRESS} .\/assets\/hello\/hello-microshift-ingress.yaml'}}","documentation":"Oc Delete -f ${HELLO_USHIFT_INGRESS} -n ${NAMESPACE}"} {"code":"DNS Entry For Route Should Resolve\n [Documentation] Resolve hello-microshift route via mDNS from the hypervisor\/RF runner.\n ... Expects RF runner host has opened port 5353 for libvirt zone.\n\n ${result}= Run Process\n ... avahi-resolve-host-name ${HOSTNAME}\n ... shell=True\n ... timeout=15s\n Log Many ${result.stdout} ${result.stderr}\n\n # avahi-resolve-host-name always returns rc=0, even if it failed to resolve.\n # In case of failure, stdout will be empty and stderr will contain error.\n # Expected success stdout:\n # > hello-microshift.cluster.local 192.168.124.5\n # Possible stderr:\n # > Failed to resolve host name 'hello-microshift.cluster.local': Timeout reached\n Should Not Be Empty ${result.stdout}\n Should Be Empty ${result.stderr}","name":"DNS Entry For Route Should Resolve","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/networking-smoke.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'HOSTNAME': {'text': '${HOSTNAME} hello-microshift.cluster.local'}}","documentation":"Expects RF runner host has opened port 5353 for libvirt zone."} {"code":"*** Settings ***\nDocumentation Router tests\n\nResource ..\/..\/resources\/common.resource\nResource ..\/..\/resources\/oc.resource\nResource ..\/..\/resources\/ostree-health.resource\nResource ..\/..\/resources\/microshift-network.resource\nResource ..\/..\/resources\/microshift-config.resource\n\nSuite Setup Setup\nSuite Teardown Teardown\n\nTest Tags restart slow\n\n\n*** Variables ***\n${NS_OWNERSHIP_1} ${EMPTY}\n${NS_OWNERSHIP_2} ${EMPTY}\n${ALTERNATIVE_HTTP_PORT} 8000\n${ALTERNATIVE_HTTPS_PORT} 8001\n${HOSTNAME} hello-microshift.cluster.local\n${FAKE_LISTEN_IP} 99.99.99.99\n${ROUTER_REMOVED} SEPARATOR=\\n\n... ---\n... ingress:\n... \\ \\ status: Removed\n${OWNERSHIP_ALLOW} SEPARATOR=\\n\n... ---\n... ingress:\n... \\ \\ status: Managed\n... \\ \\ routeAdmissionPolicy:\n... \\ \\ \\ \\ namespaceOwnership: InterNamespaceAllowed\n${OWNERSHIP_STRICT} SEPARATOR=\\n\n... ---\n... ingress:\n... \\ \\ status: Managed\n... \\ \\ routeAdmissionPolicy:\n... \\ \\ \\ \\ namespaceOwnership: Strict\n${ROUTER_EXPOSE_FULL} SEPARATOR=\\n\n... ---\n... ingress:\n... \\ \\ status: Managed\n... \\ \\ ports:\n... \\ \\ \\ \\ http: ${ALTERNATIVE_HTTP_PORT}\n... \\ \\ \\ \\ https: ${ALTERNATIVE_HTTPS_PORT}\n... \\ \\ listenAddress:\n... \\ \\ - br-ex\n${ROUTER_TUNING_CONFIG} SEPARATOR=\\n\n... ---\n... ingress:\n... \\ \\ defaultHTTPVersion: 2\n... \\ \\ forwardedHeaderPolicy: Never\n... \\ \\ httpEmptyRequestsPolicy: Ignore\n... \\ \\ logEmptyRequests: Ignore\n... \\ \\ httpCompression:\n... \\ \\ \\ \\ mimeTypes:\n... \\ \\ \\ \\ - \"text\/html\"\n... \\ \\ \\ \\ - \"application\/*\"\n... \\ \\ tuningOptions:\n... \\ \\ \\ \\ headerBufferBytes: 5556\n... \\ \\ \\ \\ headerBufferMaxRewriteBytes: 8000\n... \\ \\ \\ \\ healthCheckInterval: 4s\n... \\ \\ \\ \\ clientTimeout: 20s\n... \\ \\ \\ \\ clientFinTimeout: 1.5s\n... \\ \\ \\ \\ serverTimeout: 40s\n... \\ \\ \\ \\ serverFinTimeout: 2s\n... \\ \\ \\ \\ tunnelTimeout: 1h30m0s\n... \\ \\ \\ \\ tlsInspectDelay: 6s\n... \\ \\ \\ \\ threadCount: 3\n... \\ \\ \\ \\ maxConnections: 60000\n${ROUTER_SECURITY_CONFIG} SEPARATOR=\\n\n... ---\n... ingress:\n... \\ \\ certificateSecret: router-certs-custom\n... \\ \\ routeAdmissionPolicy:\n... \\ \\ \\ \\ wildcardPolicy: WildcardsAllowed\n... \\ \\ clientTLS:\n... \\ \\ \\ \\ allowedSubjectPatterns: [\"route-custom.apps.example.com\"]\n... \\ \\ \\ \\ clientCertificatePolicy: Required\n... \\ \\ \\ \\ clientCA:\n... \\ \\ \\ \\ \\ \\ name: router-ca-certs-custom\n... \\ \\ tlsSecurityProfile:\n... \\ \\ \\ \\ type: Custom\n... \\ \\ \\ \\ custom:\n... \\ \\ \\ \\ \\ \\ Ciphers:\n... \\ \\ \\ \\ \\ \\ - ECDHE-RSA-AES256-GCM-SHA384\n... \\ \\ \\ \\ \\ \\ - DHE-RSA-AES256-GCM-SHA384\n... \\ \\ \\ \\ \\ \\ - TLS_CHACHA20_POLY1305_SHA256\n... \\ \\ \\ \\ \\ \\ MinTLSVersion: VersionTLS13\n\n\n*** Test Cases ***\nRouter Namespace Ownership\n [Documentation] Test InterNamespaceAllow configuration options in\n ... Router admission policy.\n [Setup] Run Keywords\n ... Setup Namespaces\n ... Setup Hello MicroShift Pods In Multiple Namespaces\n\n Configure Namespace Ownership Strict\n Wait For Router Ready\n Wait Until Keyword Succeeds 60x 1s\n ... Http Port Should Be Open ${HTTP_PORT}\n ${result_1}= Run Keyword And Return Status\n ... Access Hello Microshift Success ${HTTP_PORT} path=\/${NS_OWNERSHIP_1}\n ${result_2}= Run Keyword And Return Status\n ... Access Hello Microshift Success ${HTTP_PORT} path=\/${NS_OWNERSHIP_2}\n IF (${result_1}==True and ${result_2}==True) or (${result_1}==False and ${result_2}==False)\n Fail\n END\n\n Configure Namespace Ownership Allowed\n Wait For Router Ready\n Wait Until Keyword Succeeds 60x 1s\n ... Http Port Should Be Open ${HTTP_PORT}\n Wait Until Keyword Succeeds 60x 2s\n ... Access Hello Microshift Success ${HTTP_PORT} path=\/${NS_OWNERSHIP_1}\n Wait Until Keyword Succeeds 60x 2s\n ... Access Hello Microshift Success ${HTTP_PORT} path=\/${NS_OWNERSHIP_2}\n\n [Teardown] Run Keywords\n ... Delete Namespaces\n\nRouter Disabled\n [Documentation] Disable the router and check the namespace does not exist.\n [Setup] Run Keywords\n ... Disable Router\n\n Oc Wait namespace\/openshift-ingress --for=delete --timeout=300s\n\nRouter Exposure Configuration\n [Documentation] Test custom ports and custom listening addresses.\n [Setup] Run Keywords\n ... Configure Router Exposure\n ... Add Fake IP To NIC\n\n Wait Until Keyword Succeeds 60x 2s\n ... Internal Router Port Should Be Open 10.44.0.0 ${ALTERNATIVE_HTTP_PORT} http\n Wait Until Keyword Succeeds 60x 2s\n ... Internal Router Port Should Be Open 10.44.0.0 ${ALTERNATIVE_HTTPS_PORT} https\n # The link in which this IP was added was configured in MicroShift. Note the IP was\n # added after MicroShift started, therefore it must pick it up dynamically.\n Wait Until Keyword Succeeds 60x 2s\n ... Internal Router Port Should Be Open ${FAKE_LISTEN_IP} ${ALTERNATIVE_HTTP_PORT} http\n\n [Teardown] Run Keywords\n ... Remove Fake IP From NIC\n\nRouter Verify Tuning Configuration\n [Documentation] Test ingress tuning configuration.\n [Setup] Setup With Custom Config ${ROUTER_TUNING_CONFIG}\n Wait For Router Ready\n Pod Environment Should Match Value openshift-ingress ROUTER_BUF_SIZE 5556\n Pod Environment Should Match Value openshift-ingress ROUTER_MAX_REWRITE_SIZE 8000\n Pod Environment Should Match Value openshift-ingress ROUTER_BACKEND_CHECK_INTERVAL 4s\n Pod Environment Should Match Value openshift-ingress ROUTER_DEFAULT_CLIENT_TIMEOUT 20s\n Pod Environment Should Match Value openshift-ingress ROUTER_CLIENT_FIN_TIMEOUT 1500ms\n Pod Environment Should Match Value openshift-ingress ROUTER_DEFAULT_SERVER_TIMEOUT 40s\n Pod Environment Should Match Value openshift-ingress ROUTER_DEFAULT_SERVER_FIN_TIMEOUT 2s\n Pod Environment Should Match Value openshift-ingress ROUTER_DEFAULT_TUNNEL_TIMEOUT 90m\n Pod Environment Should Match Value openshift-ingress ROUTER_INSPECT_DELAY 6s\n Pod Environment Should Match Value openshift-ingress ROUTER_THREADS 3\n Pod Environment Should Match Value openshift-ingress ROUTER_MAX_CONNECTIONS 60000\n Pod Environment Should Match Value openshift-ingress ROUTER_SET_FORWARDED_HEADERS Never\n Pod Environment Should Match Value openshift-ingress ROUTER_HTTP_IGNORE_PROBES true\n Pod Environment Should Match Value openshift-ingress ROUTER_DONT_LOG_NULL true\n Pod Environment Should Match Value openshift-ingress ROUTER_ENABLE_COMPRESSION true\n Pod Environment Should Match Value openshift-ingress ROUTER_COMPRESSION_MIME text\/html application\/*\n Pod Environment Should Match Value openshift-ingress ROUTER_DISABLE_HTTP2 false\n\nRouter Verify Security Configuration\n [Documentation] Test ingress security configuration.\n [Tags] robot:exclude\n [Setup] Run Keywords\n ... Setup With Custom Config ${ROUTER_SECURITY_CONFIG}\n ... AND\n ... Create Custom Resources\n Wait For Router Ready\n Pod Environment Should Match Value openshift-ingress ROUTER_ALLOW_WILDCARD_ROUTES true\n Pod Environment Should Match Value openshift-ingress ROUTER_MUTUAL_TLS_AUTH required\n Pod Environment Should Match Value\n ... openshift-ingress\n ... ROUTER_MUTUAL_TLS_AUTH_CA\n ... \/etc\/pki\/tls\/client-ca\/ca-bundle.pem\n Pod Environment Should Match Value\n ... openshift-ingress\n ... ROUTER_CIPHERS\n ... ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384\n Pod Environment Should Match Value openshift-ingress ROUTER_CIPHERSUITES TLS_CHACHA20_POLY1305_SHA256\n Pod Environment Should Match Value openshift-ingress SSL_MIN_VERSION TLSv1.3\n Pod Environment Should Match Value\n ... openshift-ingress\n ... ROUTER_MUTUAL_TLS_AUTH_FILTER\n ... (?:route-custom.apps.example.com)\n Pod Volume Should Contain Secret openshift-ingress default-certificate router-certs-custom\n [Teardown] Delete Custom CA Secret\n\n\n*** Keywords ***\nSetup\n [Documentation] Special setup for the suite. As every test case configures MicroShift in\n ... different ways there is no need to restart before\/after each one of them. Instead, store\n ... the original configuration here to restore it at the end.\n Setup Suite With Namespace\n\nTeardown\n [Documentation] Special teardown for the suite, will finish off by restoring the original\n ... configuration and restarting MicroShift.\n Remove Drop In MicroShift Config 10-ingress\n Restart MicroShift\n Teardown Suite With Namespace\n\nConfigure Namespace Ownership Allowed\n [Documentation] Configure MicroShift to use InterNamespaceAllowed namespace ownership.\n Setup With Custom Config ${OWNERSHIP_ALLOW}\n\nConfigure Namespace Ownership Strict\n [Documentation] Configure MicroShift to use Strict namespace ownership.\n Setup With Custom Config ${OWNERSHIP_STRICT}\n\nConfigure Router Exposure\n [Documentation] Configure MicroShift to use Strict namespace ownership.\n Setup With Custom Config ${ROUTER_EXPOSE_FULL}\n\nDisable Router\n [Documentation] Disable router.\n Setup With Custom Config ${ROUTER_REMOVED}\n\nWait For Router Ready\n [Documentation] Wait for the default router to be ready.\n # Wait for the namespace to be ready, as sometimes apiserver may signal readiness before all\n # the manifests have been applied.\n Oc Wait namespace\/openshift-ingress --for jsonpath='{.status.phase}=Active' --timeout=5m\n Named Deployment Should Be Available router-default openshift-ingress 5m\n\nSetup With Custom Config\n [Documentation] Install a custom config and restart MicroShift.\n [Arguments] ${config_content}\n Drop In MicroShift Config ${config_content} 10-ingress\n Restart MicroShift\n\nSetup Namespaces\n [Documentation] Configure the required namespaces for namespace ownership tests.\n Set Suite Variable \\${NS_OWNERSHIP_1} ${NAMESPACE}-ownership-1\n Set Suite Variable \\${NS_OWNERSHIP_2} ${NAMESPACE}-ownership-2\n Create Namespace ${NS_OWNERSHIP_1}\n Create Namespace ${NS_OWNERSHIP_2}\n\nDelete Namespaces\n [Documentation] Remove namespace ownership namespaces.\n Remove Namespace ${NS_OWNERSHIP_1}\n Remove Namespace ${NS_OWNERSHIP_2}\n\nSetup Hello MicroShift Pods In Multiple Namespaces\n [Documentation] Create and expose hello microshift pods in two namespaces.\n Create Hello MicroShift Pod ns=${NS_OWNERSHIP_1}\n Create Hello MicroShift Pod ns=${NS_OWNERSHIP_2}\n Expose Hello MicroShift ${NS_OWNERSHIP_1}\n Expose Hello MicroShift ${NS_OWNERSHIP_2}\n Oc Expose svc hello-microshift --hostname ${HOSTNAME} --path \/${NS_OWNERSHIP_1} -n ${NS_OWNERSHIP_1}\n Oc Expose svc hello-microshift --hostname ${HOSTNAME} --path \/${NS_OWNERSHIP_2} -n ${NS_OWNERSHIP_2}\n\nHttp Port Should Be Open\n [Documentation] Connect to the router and expect a response using http. A 503 response means the router\n ... is up but no routes are configured for the requested path.\n [Arguments] ${port}\n Access Hello MicroShift No Route ${port}\n\nPort Should Be Closed\n [Documentation] Try to connect to the router and expect a failure when connecting.\n [Arguments] ${port}\n ${rc} ${ignore_out} ${ignore_err}= Access Hello MicroShift ${port}\n # 7 is the error code for connection refused when using curl.\n Should Be Equal As Integers ${rc} 7\n\nInternal Router Port Should Be Open\n [Documentation] Test whether the given router port is open from within MicroShift's host\n ... using the given IP address.\n [Arguments] ${router_ip} ${port} ${scheme}=http\n ${stdout} ${stderr} ${rc}= SSHLibrary.Execute Command\n ... curl -I -k ${scheme}:\/\/${router_ip}:${port}\n ... sudo=False return_rc=True return_stderr=True return_stdout=True\n Log Many ${stdout} ${stderr}\n Should Be Equal As Integers 0 ${rc}\n Should Match Regexp ${stdout} HTTP.*503\n\nAdd Fake IP To NIC\n [Documentation] Add the given IP to the given NIC temporarily.\n [Arguments] ${ip_address}=${FAKE_LISTEN_IP} ${nic_name}=br-ex\n ${stdout} ${stderr} ${rc}= SSHLibrary.Execute Command\n ... ip address add ${ip_address}\/32 dev ${nic_name}\n ... sudo=True return_rc=True return_stderr=True return_stdout=True\n Log Many ${stdout} ${stderr}\n Should Be Equal As Integers 0 ${rc}\n\nRemove Fake IP From NIC\n [Documentation] Remove the given IP from the given NIC.\n [Arguments] ${ip_address}=${FAKE_LISTEN_IP} ${nic_name}=br-ex\n ${stdout} ${stderr} ${rc}= SSHLibrary.Execute Command\n ... ip address delete ${ip_address}\/32 dev ${nic_name}\n ... sudo=True return_rc=True return_stderr=True return_stdout=True\n Log Many ${stdout} ${stderr}\n Should Be Equal As Integers 0 ${rc}\n\nPod Environment Should Match Value\n [Documentation] Check if config is Matching\n [Arguments] ${name_space} ${env_name} ${expected_value}\n ${is}= Oc Get JsonPath\n ... pod\n ... ${name_space}\n ... ${EMPTY}\n ... .items[*].spec.containers[*].env[?(@.name==\"${env_name}\")].value\n Should Be Equal As Strings ${is} ${expected_value}\n\nPod Volume Should Contain Secret\n [Documentation] Check if pod volume exists by Name\n [Arguments] ${name_space} ${volume_name} ${expected_value}\n ${is}= Oc Get JsonPath\n ... pod\n ... ${name_space}\n ... ${EMPTY}\n ... .items[*].spec.volumes[?(@.name==\"${volume_name}\")].secret.secretName\n Should Be Equal As Strings ${is} ${expected_value}\n\nCreate Custom Resources\n [Documentation] Copy Default certs to custom\n Run With Kubeconfig\n ... oc get secret router-certs-default -n openshift-ingress -oyaml | sed 's\/name: .*\/name: router-certs-custom\/' | oc create -f - -oyaml | true\n Run With Kubeconfig oc extract configmap\/openshift-service-ca.crt --to=\/tmp\/ --confirm\n Run With Kubeconfig\n ... oc create configmap router-ca-certs-custom -n openshift-ingress --from-file=ca-bundle.pem=\/tmp\/service-ca.crt --dry-run -o yaml | oc apply -f -\n\nDelete Custom CA Secret\n [Documentation] Copy Default certs to custom\n Oc Delete secret\/router-certs-custom -n openshift-ingress\n Oc Delete configmap\/router-ca-certs-custom -n openshift-ingress\n","name":"\/tmp\/repos\/microshift\/test\/suites\/standard1\/router.robot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/router.robot","element_type":"test","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Router Namespace Ownership\n [Documentation] Test InterNamespaceAllow configuration options in\n ... Router admission policy.\n [Setup] Run Keywords\n ... Setup Namespaces\n ... Setup Hello MicroShift Pods In Multiple Namespaces\n\n Configure Namespace Ownership Strict\n Wait For Router Ready\n Wait Until Keyword Succeeds 60x 1s\n ... Http Port Should Be Open ${HTTP_PORT}\n ${result_1}= Run Keyword And Return Status\n ... Access Hello Microshift Success ${HTTP_PORT} path=\/${NS_OWNERSHIP_1}\n ${result_2}= Run Keyword And Return Status\n ... Access Hello Microshift Success ${HTTP_PORT} path=\/${NS_OWNERSHIP_2}\n IF (${result_1}==True and ${result_2}==True) or (${result_1}==False and ${result_2}==False)\n Fail\n END\n\n Configure Namespace Ownership Allowed\n Wait For Router Ready\n Wait Until Keyword Succeeds 60x 1s\n ... Http Port Should Be Open ${HTTP_PORT}\n Wait Until Keyword Succeeds 60x 2s\n ... Access Hello Microshift Success ${HTTP_PORT} path=\/${NS_OWNERSHIP_1}\n Wait Until Keyword Succeeds 60x 2s\n ... Access Hello Microshift Success ${HTTP_PORT} path=\/${NS_OWNERSHIP_2}\n\n [Teardown] Run Keywords\n ... Delete Namespaces","name":"Router Namespace Ownership","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/router.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'NS_OWNERSHIP_1': {'text': '${NS_OWNERSHIP_1} ${EMPTY}'}, 'NS_OWNERSHIP_2': {'text': '${NS_OWNERSHIP_2} ${EMPTY}'}}","documentation":""} {"code":"Router Disabled\n [Documentation] Disable the router and check the namespace does not exist.\n [Setup] Run Keywords\n ... Disable Router\n\n Oc Wait namespace\/openshift-ingress --for=delete --timeout=300s","name":"Router Disabled","imports_file_locations":"{'..\/..\/resources\/oc.resource': 'test\/resources\/oc.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/router.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Router Exposure Configuration\n [Documentation] Test custom ports and custom listening addresses.\n [Setup] Run Keywords\n ... Configure Router Exposure\n ... Add Fake IP To NIC\n\n Wait Until Keyword Succeeds 60x 2s\n ... Internal Router Port Should Be Open 10.44.0.0 ${ALTERNATIVE_HTTP_PORT} http\n Wait Until Keyword Succeeds 60x 2s\n ... Internal Router Port Should Be Open 10.44.0.0 ${ALTERNATIVE_HTTPS_PORT} https\n # The link in which this IP was added was configured in MicroShift. Note the IP was\n # added after MicroShift started, therefore it must pick it up dynamically.\n Wait Until Keyword Succeeds 60x 2s\n ... Internal Router Port Should Be Open ${FAKE_LISTEN_IP} ${ALTERNATIVE_HTTP_PORT} http\n\n [Teardown] Run Keywords\n ... Remove Fake IP From NIC","name":"Router Exposure Configuration","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/router.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'ALTERNATIVE_HTTP_PORT': {'text': '${ALTERNATIVE_HTTP_PORT} 8000'}, 'ALTERNATIVE_HTTPS_PORT': {'text': '${ALTERNATIVE_HTTPS_PORT} 8001'}, 'FAKE_LISTEN_IP': {'text': '${FAKE_LISTEN_IP} 99.99.99.99'}}","documentation":""} {"code":"Router Verify Tuning Configuration\n [Documentation] Test ingress tuning configuration.\n [Setup] Setup With Custom Config ${ROUTER_TUNING_CONFIG}\n Wait For Router Ready\n Pod Environment Should Match Value openshift-ingress ROUTER_BUF_SIZE 5556\n Pod Environment Should Match Value openshift-ingress ROUTER_MAX_REWRITE_SIZE 8000\n Pod Environment Should Match Value openshift-ingress ROUTER_BACKEND_CHECK_INTERVAL 4s\n Pod Environment Should Match Value openshift-ingress ROUTER_DEFAULT_CLIENT_TIMEOUT 20s\n Pod Environment Should Match Value openshift-ingress ROUTER_CLIENT_FIN_TIMEOUT 1500ms\n Pod Environment Should Match Value openshift-ingress ROUTER_DEFAULT_SERVER_TIMEOUT 40s\n Pod Environment Should Match Value openshift-ingress ROUTER_DEFAULT_SERVER_FIN_TIMEOUT 2s\n Pod Environment Should Match Value openshift-ingress ROUTER_DEFAULT_TUNNEL_TIMEOUT 90m\n Pod Environment Should Match Value openshift-ingress ROUTER_INSPECT_DELAY 6s\n Pod Environment Should Match Value openshift-ingress ROUTER_THREADS 3\n Pod Environment Should Match Value openshift-ingress ROUTER_MAX_CONNECTIONS 60000\n Pod Environment Should Match Value openshift-ingress ROUTER_SET_FORWARDED_HEADERS Never\n Pod Environment Should Match Value openshift-ingress ROUTER_HTTP_IGNORE_PROBES true\n Pod Environment Should Match Value openshift-ingress ROUTER_DONT_LOG_NULL true\n Pod Environment Should Match Value openshift-ingress ROUTER_ENABLE_COMPRESSION true\n Pod Environment Should Match Value openshift-ingress ROUTER_COMPRESSION_MIME text\/html application\/*\n Pod Environment Should Match Value openshift-ingress ROUTER_DISABLE_HTTP2 false","name":"Router Verify Tuning Configuration","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/router.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'ROUTER_TUNING_CONFIG': {'text': '${ROUTER_TUNING_CONFIG} SEPARATOR=\\\\n\\n... ---\\n... ingress:\\n... \\\\ \\\\ defaultHTTPVersion: 2\\n... \\\\ \\\\ forwardedHeaderPolicy: Never\\n... \\\\ \\\\ httpEmptyRequestsPolicy: Ignore\\n... \\\\ \\\\ logEmptyRequests: Ignore\\n... \\\\ \\\\ httpCompression:\\n... \\\\ \\\\ \\\\ \\\\ mimeTypes:\\n... \\\\ \\\\ \\\\ \\\\ - \"text\/html\"\\n... \\\\ \\\\ \\\\ \\\\ - \"application\/*\"\\n... \\\\ \\\\ tuningOptions:\\n... \\\\ \\\\ \\\\ \\\\ headerBufferBytes: 5556\\n... \\\\ \\\\ \\\\ \\\\ headerBufferMaxRewriteBytes: 8000\\n... \\\\ \\\\ \\\\ \\\\ healthCheckInterval: 4s\\n... \\\\ \\\\ \\\\ \\\\ clientTimeout: 20s\\n... \\\\ \\\\ \\\\ \\\\ clientFinTimeout: 1.5s\\n... \\\\ \\\\ \\\\ \\\\ serverTimeout: 40s\\n... \\\\ \\\\ \\\\ \\\\ serverFinTimeout: 2s\\n... \\\\ \\\\ \\\\ \\\\ tunnelTimeout: 1h30m0s\\n... \\\\ \\\\ \\\\ \\\\ tlsInspectDelay: 6s\\n... \\\\ \\\\ \\\\ \\\\ threadCount: 3\\n... \\\\ \\\\ \\\\ \\\\ maxConnections: 60000'}}","documentation":""} {"code":"Router Verify Security Configuration\n [Documentation] Test ingress security configuration.\n [Tags] robot:exclude\n [Setup] Run Keywords\n ... Setup With Custom Config ${ROUTER_SECURITY_CONFIG}\n ... AND\n ... Create Custom Resources\n Wait For Router Ready\n Pod Environment Should Match Value openshift-ingress ROUTER_ALLOW_WILDCARD_ROUTES true\n Pod Environment Should Match Value openshift-ingress ROUTER_MUTUAL_TLS_AUTH required\n Pod Environment Should Match Value\n ... openshift-ingress\n ... ROUTER_MUTUAL_TLS_AUTH_CA\n ... \/etc\/pki\/tls\/client-ca\/ca-bundle.pem\n Pod Environment Should Match Value\n ... openshift-ingress\n ... ROUTER_CIPHERS\n ... ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384\n Pod Environment Should Match Value openshift-ingress ROUTER_CIPHERSUITES TLS_CHACHA20_POLY1305_SHA256\n Pod Environment Should Match Value openshift-ingress SSL_MIN_VERSION TLSv1.3\n Pod Environment Should Match Value\n ... openshift-ingress\n ... ROUTER_MUTUAL_TLS_AUTH_FILTER\n ... (?:route-custom.apps.example.com)\n Pod Volume Should Contain Secret openshift-ingress default-certificate router-certs-custom\n [Teardown] Delete Custom CA Secret","name":"Router Verify Security Configuration","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/router.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'ROUTER_SECURITY_CONFIG': {'text': '${ROUTER_SECURITY_CONFIG} SEPARATOR=\\\\n\\n... ---\\n... ingress:\\n... \\\\ \\\\ certificateSecret: router-certs-custom\\n... \\\\ \\\\ routeAdmissionPolicy:\\n... \\\\ \\\\ \\\\ \\\\ wildcardPolicy: WildcardsAllowed\\n... \\\\ \\\\ clientTLS:\\n... \\\\ \\\\ \\\\ \\\\ allowedSubjectPatterns: [\"route-custom.apps.example.com\"]\\n... \\\\ \\\\ \\\\ \\\\ clientCertificatePolicy: Required\\n... \\\\ \\\\ \\\\ \\\\ clientCA:\\n... \\\\ \\\\ \\\\ \\\\ \\\\ \\\\ name: router-ca-certs-custom\\n... \\\\ \\\\ tlsSecurityProfile:\\n... \\\\ \\\\ \\\\ \\\\ type: Custom\\n... \\\\ \\\\ \\\\ \\\\ custom:\\n... \\\\ \\\\ \\\\ \\\\ \\\\ \\\\ Ciphers:\\n... \\\\ \\\\ \\\\ \\\\ \\\\ \\\\ - ECDHE-RSA-AES256-GCM-SHA384\\n... \\\\ \\\\ \\\\ \\\\ \\\\ \\\\ - DHE-RSA-AES256-GCM-SHA384\\n... \\\\ \\\\ \\\\ \\\\ \\\\ \\\\ - TLS_CHACHA20_POLY1305_SHA256\\n... \\\\ \\\\ \\\\ \\\\ \\\\ \\\\ MinTLSVersion: VersionTLS13'}}","documentation":""} {"code":"Setup\n [Documentation] Special setup for the suite. As every test case configures MicroShift in\n ... different ways there is no need to restart before\/after each one of them. Instead, store\n ... the original configuration here to restore it at the end.\n Setup Suite With Namespace","name":"Setup","imports_file_locations":"{'..\/..\/resources\/common.resource': 'test\/resources\/common.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/router.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"different ways there is no need to restart before\/after each one of them. Instead, store\n ... the original configuration here to restore it at the end."} {"code":"Teardown\n [Documentation] Special teardown for the suite, will finish off by restoring the original\n ... configuration and restarting MicroShift.\n Remove Drop In MicroShift Config 10-ingress\n Restart MicroShift\n Teardown Suite With Namespace","name":"Teardown","imports_file_locations":"{'..\/..\/resources\/microshift-config.resource': 'test\/resources\/microshift-config.resource', '..\/..\/resources\/common.resource': 'test\/resources\/common.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/router.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"configuration and restarting MicroShift."} {"code":"Configure Namespace Ownership Allowed\n [Documentation] Configure MicroShift to use InterNamespaceAllowed namespace ownership.\n Setup With Custom Config ${OWNERSHIP_ALLOW}","name":"Configure Namespace Ownership Allowed","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/router.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'OWNERSHIP_ALLOW': {'text': '${OWNERSHIP_ALLOW} SEPARATOR=\\\\n\\n... ---\\n... ingress:\\n... \\\\ \\\\ status: Managed\\n... \\\\ \\\\ routeAdmissionPolicy:\\n... \\\\ \\\\ \\\\ \\\\ namespaceOwnership: InterNamespaceAllowed'}}","documentation":"Setup With Custom Config ${OWNERSHIP_ALLOW}"} {"code":"Configure Namespace Ownership Strict\n [Documentation] Configure MicroShift to use Strict namespace ownership.\n Setup With Custom Config ${OWNERSHIP_STRICT}","name":"Configure Namespace Ownership Strict","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/router.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'OWNERSHIP_STRICT': {'text': '${OWNERSHIP_STRICT} SEPARATOR=\\\\n\\n... ---\\n... ingress:\\n... \\\\ \\\\ status: Managed\\n... \\\\ \\\\ routeAdmissionPolicy:\\n... \\\\ \\\\ \\\\ \\\\ namespaceOwnership: Strict'}}","documentation":"Setup With Custom Config ${OWNERSHIP_STRICT}"} {"code":"Configure Router Exposure\n [Documentation] Configure MicroShift to use Strict namespace ownership.\n Setup With Custom Config ${ROUTER_EXPOSE_FULL}","name":"Configure Router Exposure","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/router.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'ROUTER_EXPOSE_FULL': {'text': '${ROUTER_EXPOSE_FULL} SEPARATOR=\\\\n\\n... ---\\n... ingress:\\n... \\\\ \\\\ status: Managed\\n... \\\\ \\\\ ports:\\n... \\\\ \\\\ \\\\ \\\\ http: ${ALTERNATIVE_HTTP_PORT}\\n... \\\\ \\\\ \\\\ \\\\ https: ${ALTERNATIVE_HTTPS_PORT}\\n... \\\\ \\\\ listenAddress:\\n... \\\\ \\\\ - br-ex'}}","documentation":"Setup With Custom Config ${ROUTER_EXPOSE_FULL}"} {"code":"Disable Router\n [Documentation] Disable router.\n Setup With Custom Config ${ROUTER_REMOVED}","name":"Disable Router","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/router.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'ROUTER_REMOVED': {'text': '${ROUTER_REMOVED} SEPARATOR=\\\\n\\n... ---\\n... ingress:\\n... \\\\ \\\\ status: Removed'}}","documentation":"Setup With Custom Config ${ROUTER_REMOVED}"} {"code":"Wait For Router Ready\n [Documentation] Wait for the default router to be ready.\n # Wait for the namespace to be ready, as sometimes apiserver may signal readiness before all\n # the manifests have been applied.\n Oc Wait namespace\/openshift-ingress --for jsonpath='{.status.phase}=Active' --timeout=5m\n Named Deployment Should Be Available router-default openshift-ingress 5m","name":"Wait For Router Ready","imports_file_locations":"{'..\/..\/resources\/oc.resource': 'test\/resources\/oc.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/router.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Wait for the default router to be ready."} {"code":"Setup With Custom Config\n [Documentation] Install a custom config and restart MicroShift.\n [Arguments] ${config_content}\n Drop In MicroShift Config ${config_content} 10-ingress\n Restart MicroShift","name":"Setup With Custom Config","imports_file_locations":"{'..\/..\/resources\/microshift-config.resource': 'test\/resources\/microshift-config.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/router.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${config_content}"} {"code":"Setup Namespaces\n [Documentation] Configure the required namespaces for namespace ownership tests.\n Set Suite Variable \\${NS_OWNERSHIP_1} ${NAMESPACE}-ownership-1\n Set Suite Variable \\${NS_OWNERSHIP_2} ${NAMESPACE}-ownership-2\n Create Namespace ${NS_OWNERSHIP_1}\n Create Namespace ${NS_OWNERSHIP_2}","name":"Setup Namespaces","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/router.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'NS_OWNERSHIP_1': {'text': '${NS_OWNERSHIP_1} ${EMPTY}'}, 'NS_OWNERSHIP_2': {'text': '${NS_OWNERSHIP_2} ${EMPTY}'}}","documentation":"Set Suite Variable \\${NS_OWNERSHIP_1} ${NAMESPACE}-ownership-1"} {"code":"Delete Namespaces\n [Documentation] Remove namespace ownership namespaces.\n Remove Namespace ${NS_OWNERSHIP_1}\n Remove Namespace ${NS_OWNERSHIP_2}","name":"Delete Namespaces","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/router.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'NS_OWNERSHIP_1': {'text': '${NS_OWNERSHIP_1} ${EMPTY}'}, 'NS_OWNERSHIP_2': {'text': '${NS_OWNERSHIP_2} ${EMPTY}'}}","documentation":"Remove Namespace ${NS_OWNERSHIP_1}"} {"code":"Setup Hello MicroShift Pods In Multiple Namespaces\n [Documentation] Create and expose hello microshift pods in two namespaces.\n Create Hello MicroShift Pod ns=${NS_OWNERSHIP_1}\n Create Hello MicroShift Pod ns=${NS_OWNERSHIP_2}\n Expose Hello MicroShift ${NS_OWNERSHIP_1}\n Expose Hello MicroShift ${NS_OWNERSHIP_2}\n Oc Expose svc hello-microshift --hostname ${HOSTNAME} --path \/${NS_OWNERSHIP_1} -n ${NS_OWNERSHIP_1}\n Oc Expose svc hello-microshift --hostname ${HOSTNAME} --path \/${NS_OWNERSHIP_2} -n ${NS_OWNERSHIP_2}","name":"Setup Hello MicroShift Pods In Multiple Namespaces","imports_file_locations":"{'..\/..\/resources\/microshift-network.resource': 'test\/resources\/microshift-network.resource', '..\/..\/resources\/oc.resource': 'test\/resources\/oc.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/router.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'NS_OWNERSHIP_1': {'text': '${NS_OWNERSHIP_1} ${EMPTY}'}, 'NS_OWNERSHIP_2': {'text': '${NS_OWNERSHIP_2} ${EMPTY}'}, 'HOSTNAME': {'text': '${HOSTNAME} hello-microshift.cluster.local'}}","documentation":"Create Hello MicroShift Pod ns=${NS_OWNERSHIP_1}"} {"code":"Http Port Should Be Open\n [Documentation] Connect to the router and expect a response using http. A 503 response means the router\n ... is up but no routes are configured for the requested path.\n [Arguments] ${port}\n Access Hello MicroShift No Route ${port}","name":"Http Port Should Be Open","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/router.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"is up but no routes are configured for the requested path."} {"code":"Port Should Be Closed\n [Documentation] Try to connect to the router and expect a failure when connecting.\n [Arguments] ${port}\n ${rc} ${ignore_out} ${ignore_err}= Access Hello MicroShift ${port}\n # 7 is the error code for connection refused when using curl.\n Should Be Equal As Integers ${rc} 7","name":"Port Should Be Closed","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/router.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${port}"} {"code":"Internal Router Port Should Be Open\n [Documentation] Test whether the given router port is open from within MicroShift's host\n ... using the given IP address.\n [Arguments] ${router_ip} ${port} ${scheme}=http\n ${stdout} ${stderr} ${rc}= SSHLibrary.Execute Command\n ... curl -I -k ${scheme}:\/\/${router_ip}:${port}\n ... sudo=False return_rc=True return_stderr=True return_stdout=True\n Log Many ${stdout} ${stderr}\n Should Be Equal As Integers 0 ${rc}\n Should Match Regexp ${stdout} HTTP.*503","name":"Internal Router Port Should Be Open","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/router.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"using the given IP address."} {"code":"Add Fake IP To NIC\n [Documentation] Add the given IP to the given NIC temporarily.\n [Arguments] ${ip_address}=${FAKE_LISTEN_IP} ${nic_name}=br-ex\n ${stdout} ${stderr} ${rc}= SSHLibrary.Execute Command\n ... ip address add ${ip_address}\/32 dev ${nic_name}\n ... sudo=True return_rc=True return_stderr=True return_stdout=True\n Log Many ${stdout} ${stderr}\n Should Be Equal As Integers 0 ${rc}","name":"Add Fake IP To NIC","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/router.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'FAKE_LISTEN_IP': {'text': '${FAKE_LISTEN_IP} 99.99.99.99'}}","documentation":"[Arguments] ${ip_address}=${FAKE_LISTEN_IP} ${nic_name}=br-ex"} {"code":"Remove Fake IP From NIC\n [Documentation] Remove the given IP from the given NIC.\n [Arguments] ${ip_address}=${FAKE_LISTEN_IP} ${nic_name}=br-ex\n ${stdout} ${stderr} ${rc}= SSHLibrary.Execute Command\n ... ip address delete ${ip_address}\/32 dev ${nic_name}\n ... sudo=True return_rc=True return_stderr=True return_stdout=True\n Log Many ${stdout} ${stderr}\n Should Be Equal As Integers 0 ${rc}","name":"Remove Fake IP From NIC","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/router.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'FAKE_LISTEN_IP': {'text': '${FAKE_LISTEN_IP} 99.99.99.99'}}","documentation":"[Arguments] ${ip_address}=${FAKE_LISTEN_IP} ${nic_name}=br-ex"} {"code":"Pod Environment Should Match Value\n [Documentation] Check if config is Matching\n [Arguments] ${name_space} ${env_name} ${expected_value}\n ${is}= Oc Get JsonPath\n ... pod\n ... ${name_space}\n ... ${EMPTY}\n ... .items[*].spec.containers[*].env[?(@.name==\"${env_name}\")].value\n Should Be Equal As Strings ${is} ${expected_value}","name":"Pod Environment Should Match Value","imports_file_locations":"{'..\/..\/resources\/oc.resource': 'test\/resources\/oc.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/router.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${name_space} ${env_name} ${expected_value}"} {"code":"Pod Volume Should Contain Secret\n [Documentation] Check if pod volume exists by Name\n [Arguments] ${name_space} ${volume_name} ${expected_value}\n ${is}= Oc Get JsonPath\n ... pod\n ... ${name_space}\n ... ${EMPTY}\n ... .items[*].spec.volumes[?(@.name==\"${volume_name}\")].secret.secretName\n Should Be Equal As Strings ${is} ${expected_value}","name":"Pod Volume Should Contain Secret","imports_file_locations":"{'..\/..\/resources\/oc.resource': 'test\/resources\/oc.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/router.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${name_space} ${volume_name} ${expected_value}"} {"code":"Create Custom Resources\n [Documentation] Copy Default certs to custom\n Run With Kubeconfig\n ... oc get secret router-certs-default -n openshift-ingress -oyaml | sed 's\/name: .*\/name: router-certs-custom\/' | oc create -f - -oyaml | true\n Run With Kubeconfig oc extract configmap\/openshift-service-ca.crt --to=\/tmp\/ --confirm\n Run With Kubeconfig\n ... oc create configmap router-ca-certs-custom -n openshift-ingress --from-file=ca-bundle.pem=\/tmp\/service-ca.crt --dry-run -o yaml | oc apply -f -","name":"Create Custom Resources","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/router.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Run With Kubeconfig\n ... oc get secret router-certs-default -n openshift-ingress -oyaml | sed 's\/name: .*\/name: router-certs-custom\/' | oc create -f - -oyaml | true"} {"code":"Delete Custom CA Secret\n [Documentation] Copy Default certs to custom\n Oc Delete secret\/router-certs-custom -n openshift-ingress\n Oc Delete configmap\/router-ca-certs-custom -n openshift-ingress","name":"Delete Custom CA Secret","imports_file_locations":"{'..\/..\/resources\/oc.resource': 'test\/resources\/oc.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/router.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Oc Delete secret\/router-certs-custom -n openshift-ingress"} {"code":"*** Settings ***\nDocumentation show-config command tests\n\nResource ..\/..\/resources\/common.resource\nResource ..\/..\/resources\/microshift-config.resource\nResource ..\/..\/resources\/microshift-host.resource\nResource ..\/..\/resources\/microshift-process.resource\nLibrary ..\/..\/resources\/DataFormats.py\n\nSuite Setup Setup\nSuite Teardown Teardown\n\n\n*** Variables ***\n${MEMLIMIT256} SEPARATOR=\\n\n... ---\n... etcd:\n... \\ \\ memoryLimitMB: 256\n\n\n*** Test Cases ***\nNo Sudo Command\n [Documentation] Test without priviledge elevation\n ${output} ${rc}= Execute Command\n ... microshift show-config\n ... sudo=False return_rc=True\n Should Not Be Equal As Integers 0 ${rc}\n\nNo Mode Argument\n [Documentation] Test without any explicit --mode\n ${output} ${rc}= Execute Command\n ... microshift show-config\n ... sudo=True return_rc=True\n Should Be Equal As Integers 0 ${rc}\n ${config}= Yaml Parse ${output}\n Should Be Equal As Integers 256 ${config.etcd.memoryLimitMB}\n\nExplicit Mode Default\n [Documentation] Test with explicit '--mode default'\n ${config}= Show Config default\n Should Be Equal As Integers 0 ${config.etcd.memoryLimitMB}\n\nExplicit Mode Effective\n [Documentation] Test with explicit '--mode effective'\n ${config}= Show Config effective\n Should Be Equal As Integers 256 ${config.etcd.memoryLimitMB}\n\nMode Unknown\n [Documentation] Test with explicit '--mode no-such-mode'\n ${output} ${rc}= Execute Command\n ... microshift show-config --mode no-such-mode\n ... sudo=True return_rc=True\n Should Not Be Equal As Integers 0 ${rc}\n\n\n*** Keywords ***\nSetup\n [Documentation] Test suite setup\n Check Required Env Variables\n Login MicroShift Host\n Drop In MicroShift Config ${MEMLIMIT256} 10-etcd\n\nTeardown\n [Documentation] Test suite teardown\n Remove Drop In MicroShift Config 10-etcd\n Logout MicroShift Host\n","name":"\/tmp\/repos\/microshift\/test\/suites\/standard1\/show-config.robot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/show-config.robot","element_type":"test","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"No Sudo Command\n [Documentation] Test without priviledge elevation\n ${output} ${rc}= Execute Command\n ... microshift show-config\n ... sudo=False return_rc=True\n Should Not Be Equal As Integers 0 ${rc}","name":"No Sudo Command","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/show-config.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"No Mode Argument\n [Documentation] Test without any explicit --mode\n ${output} ${rc}= Execute Command\n ... microshift show-config\n ... sudo=True return_rc=True\n Should Be Equal As Integers 0 ${rc}\n ${config}= Yaml Parse ${output}\n Should Be Equal As Integers 256 ${config.etcd.memoryLimitMB}","name":"No Mode Argument","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/show-config.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Explicit Mode Default\n [Documentation] Test with explicit '--mode default'\n ${config}= Show Config default\n Should Be Equal As Integers 0 ${config.etcd.memoryLimitMB}","name":"Explicit Mode Default","imports_file_locations":"{'..\/..\/resources\/microshift-config.resource': 'test\/resources\/microshift-config.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/show-config.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Explicit Mode Effective\n [Documentation] Test with explicit '--mode effective'\n ${config}= Show Config effective\n Should Be Equal As Integers 256 ${config.etcd.memoryLimitMB}","name":"Explicit Mode Effective","imports_file_locations":"{'..\/..\/resources\/microshift-config.resource': 'test\/resources\/microshift-config.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/show-config.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Mode Unknown\n [Documentation] Test with explicit '--mode no-such-mode'\n ${output} ${rc}= Execute Command\n ... microshift show-config --mode no-such-mode\n ... sudo=True return_rc=True\n Should Not Be Equal As Integers 0 ${rc}","name":"Mode Unknown","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/show-config.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Setup\n [Documentation] Test suite setup\n Check Required Env Variables\n Login MicroShift Host\n Drop In MicroShift Config ${MEMLIMIT256} 10-etcd","name":"Setup","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource', '..\/..\/resources\/microshift-config.resource': 'test\/resources\/microshift-config.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/show-config.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'MEMLIMIT256': {'text': '${MEMLIMIT256} SEPARATOR=\\\\n\\n... ---\\n... etcd:\\n... \\\\ \\\\ memoryLimitMB: 256'}}","documentation":"Check Required Env Variables"} {"code":"Teardown\n [Documentation] Test suite teardown\n Remove Drop In MicroShift Config 10-etcd\n Logout MicroShift Host","name":"Teardown","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/show-config.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Remove Drop In MicroShift Config 10-etcd"} {"code":"*** Settings ***\nDocumentation Tests related to the version of MicroShift\n\nResource ..\/..\/resources\/common.resource\nResource ..\/..\/resources\/oc.resource\nResource ..\/..\/resources\/microshift-process.resource\nResource ..\/..\/resources\/microshift-rpm.resource\nLibrary Collections\nLibrary ..\/..\/resources\/DataFormats.py\n\nSuite Setup Setup\nSuite Teardown Teardown\n\n\n*** Variables ***\n${USHIFT_HOST} ${EMPTY}\n${USHIFT_USER} ${EMPTY}\n${EXPECTED_OS_VERSION} ${EMPTY}\n\n\n*** Test Cases ***\nConfigMap Contents\n [Documentation] Check the version of the server\n\n ${configmap}= Oc Get configmap kube-public microshift-version\n Should Be Equal As Integers ${configmap.data.major} ${MAJOR_VERSION}\n Should Be Equal As Integers ${configmap.data.minor} ${MINOR_VERSION}\n Should Be Equal As Integers ${configmap.data.patch} ${PATCH_VERSION}\n\nCLI Output\n [Documentation] Check the version reported by the process\n\n ${version}= MicroShift Version\n Should Be Equal As Integers ${version.major} ${MAJOR_VERSION}\n Should Be Equal As Integers ${version.minor} ${MINOR_VERSION}\n Should Be Equal As Integers ${version.patch} ${PATCH_VERSION}\n Should Start With ${version.gitVersion} ${Y_STREAM}\n\nConfigMap Matches CLI\n [Documentation] Ensure the ConfigMap is being updated based on the actual binary version\n\n ${configmap}= Oc Get configmap kube-public microshift-version\n ${cli}= MicroShift Version\n Should Be Equal ${configmap.data.version} ${cli.gitVersion}\n\nMetadata File Contents\n [Documentation] Ensure the metadata file contents match the expected version.\n\n ${contents}= Execute Command\n ... cat \/var\/lib\/microshift\/version\n ... sudo=True return_rc=False\n\n ${is_ostree}= Is System OSTree\n IF ${is_ostree}\n ${expected}= Set Variable\n ... {\"version\":\"${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}\",\"deployment_id\":\"*\",\"boot_id\":\"*\"}\n ELSE\n ${expected}= Set Variable\n ... {\"version\":\"${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}\",\"boot_id\":\"*\"}\n END\n\n Should Match ${contents} ${expected}\n\nExpected OS Version\n [Documentation] Ensure the OS version is as expected by the test.\n\n ${os_version}= Command Should Work bash -c '. \/etc\/os-release && echo \"\\${VERSION_ID}\"'\n Should Be Equal As Strings ${EXPECTED_OS_VERSION} ${os_version}\n\n\n*** Keywords ***\nSetup\n [Documentation] Test suite setup\n Check Required Env Variables\n Login MicroShift Host\n Setup Kubeconfig\n Should Not Be Empty ${EXPECTED_OS_VERSION} EXPECTED_OS_VERSION variable is required\n Read Expected Versions\n Verify MicroShift RPM Install\n\nTeardown\n [Documentation] Test suite teardown\n Remove Kubeconfig\n Logout MicroShift Host\n\nRead Expected Versions # robocop: disable=too-many-calls-in-keyword\n [Documentation] Ask dnf for the version of the MicroShift package to\n ... find the expected versions\n ...\n ... Sets suite variables FULL_VERSION, MAJOR_VERSION, MINOR_VERSION, and Y_STREAM based on\n ... the content.\n # This returns a string like 4.14.0-0.nightly-arm64-2023-05-04-012046\n ${version_full}= Get Version Of MicroShift RPM\n Set Suite Variable \\${FULL_VERSION} ${version_full}\n # 4.14.0\n ${version_short_matches}= Get Regexp Matches ${version_full} ^(\\\\d+.\\\\d+.\\\\d+)\n ${version_short_parts}= Split String ${version_short_matches}[0] .\n # 4\n Set Suite Variable \\${MAJOR_VERSION} ${version_short_parts}[0]\n # 14\n Set Suite Variable \\${MINOR_VERSION} ${version_short_parts}[1]\n # 0\n Set Suite Variable \\${PATCH_VERSION} ${version_short_parts}[2]\n # 4.14\n ${ystream}= Format String {}.{} ${MAJOR_VERSION} ${MINOR_VERSION}\n Set Suite Variable \\${Y_STREAM} ${ystream}\n","name":"\/tmp\/repos\/microshift\/test\/suites\/standard1\/version.robot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/version.robot","element_type":"test","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"ConfigMap Contents\n [Documentation] Check the version of the server\n\n ${configmap}= Oc Get configmap kube-public microshift-version\n Should Be Equal As Integers ${configmap.data.major} ${MAJOR_VERSION}\n Should Be Equal As Integers ${configmap.data.minor} ${MINOR_VERSION}\n Should Be Equal As Integers ${configmap.data.patch} ${PATCH_VERSION}","name":"ConfigMap Contents","imports_file_locations":"{'..\/..\/resources\/oc.resource': 'test\/resources\/oc.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/version.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"CLI Output\n [Documentation] Check the version reported by the process\n\n ${version}= MicroShift Version\n Should Be Equal As Integers ${version.major} ${MAJOR_VERSION}\n Should Be Equal As Integers ${version.minor} ${MINOR_VERSION}\n Should Be Equal As Integers ${version.patch} ${PATCH_VERSION}\n Should Start With ${version.gitVersion} ${Y_STREAM}","name":"CLI Output","imports_file_locations":"{'..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/version.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"ConfigMap Matches CLI\n [Documentation] Ensure the ConfigMap is being updated based on the actual binary version\n\n ${configmap}= Oc Get configmap kube-public microshift-version\n ${cli}= MicroShift Version\n Should Be Equal ${configmap.data.version} ${cli.gitVersion}","name":"ConfigMap Matches CLI","imports_file_locations":"{'..\/..\/resources\/oc.resource': 'test\/resources\/oc.resource', '..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/version.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Metadata File Contents\n [Documentation] Ensure the metadata file contents match the expected version.\n\n ${contents}= Execute Command\n ... cat \/var\/lib\/microshift\/version\n ... sudo=True return_rc=False\n\n ${is_ostree}= Is System OSTree\n IF ${is_ostree}\n ${expected}= Set Variable\n ... {\"version\":\"${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}\",\"deployment_id\":\"*\",\"boot_id\":\"*\"}\n ELSE\n ${expected}= Set Variable\n ... {\"version\":\"${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}\",\"boot_id\":\"*\"}\n END\n\n Should Match ${contents} ${expected}","name":"Metadata File Contents","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/version.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Expected OS Version\n [Documentation] Ensure the OS version is as expected by the test.\n\n ${os_version}= Command Should Work bash -c '. \/etc\/os-release && echo \"\\${VERSION_ID}\"'\n Should Be Equal As Strings ${EXPECTED_OS_VERSION} ${os_version}","name":"Expected OS Version","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/version.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'EXPECTED_OS_VERSION': {'text': '${EXPECTED_OS_VERSION} ${EMPTY}'}}","documentation":""} {"code":"Setup\n [Documentation] Test suite setup\n Check Required Env Variables\n Login MicroShift Host\n Setup Kubeconfig\n Should Not Be Empty ${EXPECTED_OS_VERSION} EXPECTED_OS_VERSION variable is required\n Read Expected Versions\n Verify MicroShift RPM Install","name":"Setup","imports_file_locations":"{'..\/..\/resources\/microshift-rpm.resource': 'test\/resources\/microshift-rpm.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/version.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'EXPECTED_OS_VERSION': {'text': '${EXPECTED_OS_VERSION} ${EMPTY}'}}","documentation":"Check Required Env Variables"} {"code":"Teardown\n [Documentation] Test suite teardown\n Remove Kubeconfig\n Logout MicroShift Host","name":"Teardown","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/version.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Remove Kubeconfig"} {"code":"Read Expected Versions # robocop: disable=too-many-calls-in-keyword\n [Documentation] Ask dnf for the version of the MicroShift package to\n ... find the expected versions\n ...\n ... Sets suite variables FULL_VERSION, MAJOR_VERSION, MINOR_VERSION, and Y_STREAM based on\n ... the content.\n # This returns a string like 4.14.0-0.nightly-arm64-2023-05-04-012046\n ${version_full}= Get Version Of MicroShift RPM\n Set Suite Variable \\${FULL_VERSION} ${version_full}\n # 4.14.0\n ${version_short_matches}= Get Regexp Matches ${version_full} ^(\\\\d+.\\\\d+.\\\\d+)\n ${version_short_parts}= Split String ${version_short_matches}[0] .\n # 4\n Set Suite Variable \\${MAJOR_VERSION} ${version_short_parts}[0]\n # 14\n Set Suite Variable \\${MINOR_VERSION} ${version_short_parts}[1]\n # 0\n Set Suite Variable \\${PATCH_VERSION} ${version_short_parts}[2]\n # 4.14\n ${ystream}= Format String {}.{} ${MAJOR_VERSION} ${MINOR_VERSION}\n Set Suite Variable \\${Y_STREAM} ${ystream}","name":"Read Expected Versions","imports_file_locations":"{'..\/..\/resources\/microshift-rpm.resource': 'test\/resources\/microshift-rpm.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard1\/version.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Sets suite variables FULL_VERSION, MAJOR_VERSION, MINOR_VERSION, and Y_STREAM based on\n ... the content."} {"code":"*** Settings ***\nDocumentation Tests for configuration changes\n\nResource ..\/..\/resources\/common.resource\nResource ..\/..\/resources\/microshift-config.resource\nResource ..\/..\/resources\/microshift-process.resource\nLibrary ..\/..\/resources\/journalctl.py\n\nSuite Setup Setup\nSuite Teardown Teardown\n\nTest Tags restart slow\n\n\n*** Variables ***\n${CURSOR} ${EMPTY} # The journal cursor before restarting MicroShift\n${BAD_LOG_LEVEL} SEPARATOR=\\n\n... ---\n... debugging:\n... \\ \\ logLevel: unknown-value\n${DEBUG_LOG_LEVEL} SEPARATOR=\\n\n... ---\n... debugging:\n... \\ \\ logLevel: debug\n${BAD_AUDIT_PROFILE} SEPARATOR=\\n\n... apiServer:\n... \\ \\ auditLog:\n... \\ \\ \\ \\ profile: BAD_PROFILE\n${AUDIT_PROFILE} SEPARATOR=\\n\n... apiServer:\n... \\ \\ auditLog:\n... \\ \\ \\ \\ profile: WriteRequestBodies\n${AUDIT_FLAGS} SEPARATOR=\\n\n... apiServer:\n... \\ \\ auditLog:\n... \\ \\ \\ \\ maxFileSize: 1000\n... \\ \\ \\ \\ maxFiles: 1000\n... \\ \\ \\ \\ maxFileAge: 1000\n${LVMS_DEFAULT} SEPARATOR=\\n\n... storage: {}\n${LVMS_DISABLED} SEPARATOR=\\n\n... storage:\n... \\ \\ driver: \"none\"\n${CSI_SNAPSHOT_DISABLED} SEPARATOR=\\n\n... storage:\n... \\ \\ optionalCsiComponents: [ none ]\n${LVMS_CSI_SNAPSHOT_DISABLED} SEPARATOR=\\n\n... storage:\n... \\ \\ driver: \"none\"\n... \\ \\ optionalCsiComponents: [ none ]\n${TLS_12_CUSTOM_CIPHER} SEPARATOR=\\n\n... apiServer:\n... \\ \\ tls:\n... \\ \\ \\ \\ cipherSuites:\n... \\ \\ \\ \\ - TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256\n... \\ \\ \\ \\ minVersion: VersionTLS12\n${TLS_13_MIN_VERSION} SEPARATOR=\\n\n... apiServer:\n... \\ \\ tls:\n... \\ \\ \\ \\ minVersion: VersionTLS13\n${APISERVER_ETCD_CLIENT_CERT} \/var\/lib\/microshift\/certs\/etcd-signer\/apiserver-etcd-client\n\n\n*** Test Cases ***\nMicroShift Starts Using Default Config\n [Documentation] Default (example) config should not fail to be parsed\n ... and prevent MicroShift from starting.\n # Copy existing config.yaml as a drop-in because it has subjectAltNames\n # required by the `Restart MicroShift` keyword (sets up required kubeconfig).\n [Tags] defaultcfg\n [Setup] Run Keywords\n ... Save Default MicroShift Config\n ... AND\n ... Command Should Work mkdir -p \/etc\/microshift\/config.d\/\n ... AND\n ... Command Should Work cp \/etc\/microshift\/config.yaml \/etc\/microshift\/config.d\/00-ci.yaml\n ... AND\n ... Command Should Work cp \/etc\/microshift\/config.yaml.default \/etc\/microshift\/config.yaml\n\n Restart MicroShift\n\n [Teardown] Run Keywords\n ... Restore Default MicroShift Config\n ... AND\n ... Command Should Work rm -f \/etc\/microshift\/config.d\/00-ci.yaml\n ... AND\n ... Restart MicroShift\n\nUnknown Log Level Produces Warning\n [Documentation] Logs should warn that the log level setting is unknown\n Setup With Bad Log Level\n Pattern Should Appear In Log Output ${CURSOR} Unrecognized log level \"unknown-value\", defaulting to \"Normal\"\n\nDebug Log Level Produces No Warning\n [Documentation] Logs should not warn that the log level setting is unknown\n Setup With Debug Log Level\n Pattern Should Not Appear In Log Output ${CURSOR} Unrecognized log level \"debug\", defaulting to \"Normal\"\n\nKnown Audit Log Profile Produces No Warning\n [Documentation] A recognized kube-apiserver audit log profile will not produce a message in logs\n Setup Known Audit Log Profile\n Pattern Should Not Appear In Log Output ${CURSOR} unknown audit profile \\\\\\\\\"WriteRequestBodies\\\\\\\\\"\n\nConfig Flags Are Logged in Audit Flags\n [Documentation] Check that flags specified in the MicroShift audit config are passed to and logged by the\n ... kube-apiserver. It is not essential that we test the kube-apiserver functionality as that is\n ... already rigorously tested by upstream k8s and by OCP.\n Setup Audit Flags\n Pattern Should Appear In Log Output ${CURSOR} FLAG: --audit-log-maxsize=\\\"1000\\\"\n Pattern Should Appear In Log Output ${CURSOR} FLAG: --audit-log-maxbackup=\\\"1000\\\"\n Pattern Should Appear In Log Output ${CURSOR} FLAG: --audit-log-maxage=\\\"1000\\\"\n\nDeploy MicroShift With LVMS By Default\n [Documentation] Verify that LVMS and CSI snapshotting are deployed when config fields are null.\n [Setup] Deploy Storage Config ${LVMS_DEFAULT}\n LVMS Is Deployed\n CSI Snapshot Controller Is Deployed\n [Teardown] Run Keywords\n ... Remove Storage Drop In Config\n ... Restart MicroShift\n\nDeploy MicroShift Without LVMS\n [Documentation] Verify that LVMS is not deployed when storage.driver == none, and that CSI snapshotting\n ... components are still deployed.\n [Setup] Deploy Storage Config ${LVMS_DISABLED}\n\n CSI Snapshot Controller Is Deployed\n Run Keyword And Expect Error 1 != 0\n ... LVMS Is Deployed\n [Teardown] Run Keywords\n ... Remove Storage Drop In Config\n ... Restart MicroShift\n\nDeploy MicroShift Without CSI Snapshotter\n [Documentation] Verify that only LVMS is deployed when .storage.optionalCsiComponents is an empty array.\n [Setup] Deploy Storage Config ${CSI_SNAPSHOT_DISABLED}\n\n LVMS Is Deployed\n Run Keyword And Expect Error 1 != 0\n ... CSI Snapshot Controller Is Deployed\n\n [Teardown] Run Keywords\n ... Remove Storage Drop In Config\n ... Restart MicroShift\n\nCustom TLS 1_2 configuration\n [Documentation] Configure a custom cipher suite using TLSv1.2 as min version and verify it is used\n [Setup] Setup TLS Configuration ${TLS_12_CUSTOM_CIPHER}\n\n ${config}= Show Config effective\n Should Be Equal ${config.apiServer.tls.minVersion} VersionTLS12\n Length Should Be ${config.apiServer.tls.cipherSuites} 2\n Should Contain ${config.apiServer.tls.cipherSuites} TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256\n Should Contain ${config.apiServer.tls.cipherSuites} TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256\n\n # on TLSv1.2, openssl ciphers string codes (defined by IANA) does not excatly match openshift ones\n # custom cipher defined for this test\n Check TLS Endpoints 0 TLSv1.2 ECDHE-RSA-CHACHA20-POLY1305 # TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256\n Check TLS Endpoints 1 TLSv1.3 ECDHE-RSA-CHACHA20-POLY1305 # TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256\n\n # mandatory cipher needed for internal enpoints (i.e. etcd), set if not defined by the user\n Check TLS Endpoints 0 TLSv1.2 ECDHE-RSA-AES128-GCM-SHA256 # TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256\n Check TLS Endpoints 1 TLSv1.3 ECDHE-RSA-AES128-GCM-SHA256 # TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256\n\n # when TLSv1.2 is set as min version, TLSv1.3 must also work\n Check TLS Endpoints 1 TLSv1.2 TLS_AES_128_GCM_SHA256\n Check TLS Endpoints 0 TLSv1.3 TLS_AES_128_GCM_SHA256\n\n [Teardown] Run Keywords\n ... Remove TLS Drop In Config\n ... Restart MicroShift\n\nCustom TLS 1_3 configuration\n [Documentation] Configure API server to use TLSv1.3 as min version and verify only that version works\n ... TLSv1.2 must fail and cipher suites for TLSv1.3 can not be config by the user, always 3 are enabled.\n [Setup] Setup TLS Configuration ${TLS_13_MIN_VERSION}\n\n ${config}= Show Config effective\n Should Be Equal ${config.apiServer.tls.minVersion} VersionTLS13\n Length Should Be ${config.apiServer.tls.cipherSuites} 3\n Should Contain ${config.apiServer.tls.cipherSuites} TLS_AES_128_GCM_SHA256\n Should Contain ${config.apiServer.tls.cipherSuites} TLS_AES_256_GCM_SHA384\n Should Contain ${config.apiServer.tls.cipherSuites} TLS_CHACHA20_POLY1305_SHA256\n\n # checking the 3 ciphers available for TLSv1.3 on openshift\n Check TLS Endpoints 1 TLSv1.2 TLS_AES_128_GCM_SHA256\n Check TLS Endpoints 0 TLSv1.3 TLS_AES_128_GCM_SHA256\n Check TLS Endpoints 1 TLSv1.2 TLS_AES_256_GCM_SHA384\n Check TLS Endpoints 0 TLSv1.3 TLS_AES_256_GCM_SHA384\n Check TLS Endpoints 1 TLSv1.2 TLS_CHACHA20_POLY1305_SHA256\n Check TLS Endpoints 0 TLSv1.3 TLS_CHACHA20_POLY1305_SHA256\n\n [Teardown] Run Keywords\n ... Remove TLS Drop In Config\n ... Restart MicroShift\n\n\n*** Keywords ***\nSetup\n [Documentation] Test suite setup\n Check Required Env Variables\n Login MicroShift Host\n Setup Kubeconfig # for readiness checks\n Save Journal Cursor\n\nTeardown\n [Documentation] Test suite teardown\n Remove Drop In MicroShift Config 10-loglevel\n Remove Drop In MicroShift Config 10-audit\n Restart MicroShift\n Logout MicroShift Host\n Remove Kubeconfig\n\nSave Journal Cursor\n [Documentation]\n ... Save the journal cursor then restart MicroShift so we capture the\n ... shutdown messages and startup messages.\n ${cursor}= Get Journal Cursor\n Set Suite Variable \\${CURSOR} ${cursor}\n\nSetup With Bad Log Level\n [Documentation] Set log level to an unknown value and restart\n Drop In MicroShift Config ${BAD_LOG_LEVEL} 10-loglevel\n Restart MicroShift\n\nSetup With Debug Log Level\n [Documentation] Set log level to debug and restart\n Drop In MicroShift Config ${DEBUG_LOG_LEVEL} 10-loglevel\n Restart MicroShift\n\nSetup Known Audit Log Profile\n [Documentation] Setup audit\n Drop In MicroShift Config ${AUDIT_PROFILE} 10-audit\n Restart MicroShift\n\nSetup Audit Flags\n [Documentation] Apply the audit config values set in ${AUDIT_FLAGS}\n Drop In MicroShift Config ${AUDIT_FLAGS} 10-audit\n Restart MicroShift\n\nDeploy Storage Config\n [Documentation] Applies a storage ${config} to the exist MicroShift config, pushes it to the MicroShift host,\n ... and restarts microshift.service\n [Arguments] ${config}\n Cleanup MicroShift opt='--keep-images'\n Drop In MicroShift Config ${config} 10-storage\n Start MicroShift\n\nSetup TLS Configuration\n [Documentation] Apply the TLS configuration in the argument\n [Arguments] ${config}\n Drop In MicroShift Config ${config} 10-tls\n Restart MicroShift\n\nRemove TLS Drop In Config\n [Documentation] Remove the previously created drop-in config for storage\n Remove Drop In MicroShift Config 10-tls\n\nRemove Storage Drop In Config\n [Documentation] Remove the previously created drop-in config for storage\n Remove Drop In MicroShift Config 10-storage\n\nLVMS Is Deployed\n [Documentation] Wait for LVMS components to deploy\n Named Deployment Should Be Available lvms-operator openshift-storage 120s\n # Wait for vg-manager daemonset to exist before trying to \"wait\".\n # `oc wait` fails if the object doesn't exist.\n Wait Until Resource Exists daemonset vg-manager openshift-storage 120s\n Named Daemonset Should Be Available vg-manager openshift-storage 120s\n\nCSI Snapshot Controller Is Deployed\n [Documentation] Wait for CSI snapshot controller to be deployed\n Named Deployment Should Be Available csi-snapshot-controller kube-system 120s\n\nOpenssl Connect Command\n [Documentation] Run Openssl Connect Command in the remote server\n [Arguments] ${host_and_port} ${args}\n ${stdout} ${rc}= Execute Command\n ... openssl s_client -connect ${host_and_port} ${args} <<< \"Q\"\n ... sudo=True return_stdout=True return_stderr=False return_rc=True\n RETURN ${stdout} ${rc}\n\nCheck TLS Endpoints\n [Documentation] Run Openssl Connect Command to check k8s internal endpoints\n [Arguments] ${return_code} ${tls_version} ${cipher}\n IF \"${tls_version}\" == \"TLSv1.2\"\n Set Test Variable ${TLS_AND_CIPHER_ARGS} -tls1_2 -cipher ${cipher}\n ELSE IF \"${tls_version}\" == \"TLSv1.3\"\n Set Test Variable ${TLS_AND_CIPHER_ARGS} -tls1_3 -ciphersuites ${cipher}\n END\n\n # api server, kubelet, kube controller manager and kube scheduler endpoint ports\n FOR ${port} IN 6443 10250 10257 10259\n ${stdout} ${rc}= Openssl Connect Command ${USHIFT_HOST}:${port} ${TLS_AND_CIPHER_ARGS}\n Should Be Equal As Integers ${return_code} ${rc}\n IF \"${rc}\" == \"0\"\n Should Contain ${stdout} ${tls_version}, Cipher is ${cipher}\n END\n END\n\n # etcd endpoint, need to use cert and key because etcd requires mTLS\n Set Test Variable ${CERT_ARG} -cert ${APISERVER_ETCD_CLIENT_CERT}\/client.crt\n Set Test Variable ${KEY_ARG} -key ${APISERVER_ETCD_CLIENT_CERT}\/client.key\n ${stdout} ${rc}= Openssl Connect Command localhost:2379 ${TLS_AND_CIPHER_ARGS} ${CERT_ARG} ${KEY_ARG}\n Should Be Equal As Integers ${return_code} ${rc}\n","name":"\/tmp\/repos\/microshift\/test\/suites\/standard2\/configuration.robot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/configuration.robot","element_type":"test","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"MicroShift Starts Using Default Config\n [Documentation] Default (example) config should not fail to be parsed\n ... and prevent MicroShift from starting.\n # Copy existing config.yaml as a drop-in because it has subjectAltNames\n # required by the `Restart MicroShift` keyword (sets up required kubeconfig).\n [Tags] defaultcfg\n [Setup] Run Keywords\n ... Save Default MicroShift Config\n ... AND\n ... Command Should Work mkdir -p \/etc\/microshift\/config.d\/\n ... AND\n ... Command Should Work cp \/etc\/microshift\/config.yaml \/etc\/microshift\/config.d\/00-ci.yaml\n ... AND\n ... Command Should Work cp \/etc\/microshift\/config.yaml.default \/etc\/microshift\/config.yaml\n\n Restart MicroShift\n\n [Teardown] Run Keywords\n ... Restore Default MicroShift Config\n ... AND\n ... Command Should Work rm -f \/etc\/microshift\/config.d\/00-ci.yaml\n ... AND\n ... Restart MicroShift","name":"MicroShift Starts Using Default Config","imports_file_locations":"{'..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/configuration.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Unknown Log Level Produces Warning\n [Documentation] Logs should warn that the log level setting is unknown\n Setup With Bad Log Level\n Pattern Should Appear In Log Output ${CURSOR} Unrecognized log level \"unknown-value\", defaulting to \"Normal\"","name":"Unknown Log Level Produces Warning","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/configuration.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'CURSOR': {'text': '${CURSOR} ${EMPTY} # The journal cursor before restarting MicroShift'}}","documentation":""} {"code":"Debug Log Level Produces No Warning\n [Documentation] Logs should not warn that the log level setting is unknown\n Setup With Debug Log Level\n Pattern Should Not Appear In Log Output ${CURSOR} Unrecognized log level \"debug\", defaulting to \"Normal\"","name":"Debug Log Level Produces No Warning","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/configuration.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'CURSOR': {'text': '${CURSOR} ${EMPTY} # The journal cursor before restarting MicroShift'}}","documentation":""} {"code":"Known Audit Log Profile Produces No Warning\n [Documentation] A recognized kube-apiserver audit log profile will not produce a message in logs\n Setup Known Audit Log Profile\n Pattern Should Not Appear In Log Output ${CURSOR} unknown audit profile \\\\\\\\\"WriteRequestBodies\\\\\\\\\"","name":"Known Audit Log Profile Produces No Warning","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/configuration.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'CURSOR': {'text': '${CURSOR} ${EMPTY} # The journal cursor before restarting MicroShift'}}","documentation":""} {"code":"Config Flags Are Logged in Audit Flags\n [Documentation] Check that flags specified in the MicroShift audit config are passed to and logged by the\n ... kube-apiserver. It is not essential that we test the kube-apiserver functionality as that is\n ... already rigorously tested by upstream k8s and by OCP.\n Setup Audit Flags\n Pattern Should Appear In Log Output ${CURSOR} FLAG: --audit-log-maxsize=\\\"1000\\\"\n Pattern Should Appear In Log Output ${CURSOR} FLAG: --audit-log-maxbackup=\\\"1000\\\"\n Pattern Should Appear In Log Output ${CURSOR} FLAG: --audit-log-maxage=\\\"1000\\\"","name":"Config Flags Are Logged in Audit Flags","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/configuration.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'CURSOR': {'text': '${CURSOR} ${EMPTY} # The journal cursor before restarting MicroShift'}}","documentation":""} {"code":"Deploy MicroShift With LVMS By Default\n [Documentation] Verify that LVMS and CSI snapshotting are deployed when config fields are null.\n [Setup] Deploy Storage Config ${LVMS_DEFAULT}\n LVMS Is Deployed\n CSI Snapshot Controller Is Deployed\n [Teardown] Run Keywords\n ... Remove Storage Drop In Config\n ... Restart MicroShift","name":"Deploy MicroShift With LVMS By Default","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/configuration.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'LVMS_DEFAULT': {'text': '${LVMS_DEFAULT} SEPARATOR=\\\\n\\n... storage: {}'}}","documentation":""} {"code":"Deploy MicroShift Without LVMS\n [Documentation] Verify that LVMS is not deployed when storage.driver == none, and that CSI snapshotting\n ... components are still deployed.\n [Setup] Deploy Storage Config ${LVMS_DISABLED}\n\n CSI Snapshot Controller Is Deployed\n Run Keyword And Expect Error 1 != 0\n ... LVMS Is Deployed\n [Teardown] Run Keywords\n ... Remove Storage Drop In Config\n ... Restart MicroShift","name":"Deploy MicroShift Without LVMS","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/configuration.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'LVMS_DISABLED': {'text': '${LVMS_DISABLED} SEPARATOR=\\\\n\\n... storage:\\n... \\\\ \\\\ driver: \"none\"'}}","documentation":""} {"code":"Deploy MicroShift Without CSI Snapshotter\n [Documentation] Verify that only LVMS is deployed when .storage.optionalCsiComponents is an empty array.\n [Setup] Deploy Storage Config ${CSI_SNAPSHOT_DISABLED}\n\n LVMS Is Deployed\n Run Keyword And Expect Error 1 != 0\n ... CSI Snapshot Controller Is Deployed\n\n [Teardown] Run Keywords\n ... Remove Storage Drop In Config\n ... Restart MicroShift","name":"Deploy MicroShift Without CSI Snapshotter","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/configuration.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'CSI_SNAPSHOT_DISABLED': {'text': '${CSI_SNAPSHOT_DISABLED} SEPARATOR=\\\\n\\n... storage:\\n... \\\\ \\\\ optionalCsiComponents: [ none ]'}}","documentation":""} {"code":"Custom TLS 1_2 configuration\n [Documentation] Configure a custom cipher suite using TLSv1.2 as min version and verify it is used\n [Setup] Setup TLS Configuration ${TLS_12_CUSTOM_CIPHER}\n\n ${config}= Show Config effective\n Should Be Equal ${config.apiServer.tls.minVersion} VersionTLS12\n Length Should Be ${config.apiServer.tls.cipherSuites} 2\n Should Contain ${config.apiServer.tls.cipherSuites} TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256\n Should Contain ${config.apiServer.tls.cipherSuites} TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256\n\n # on TLSv1.2, openssl ciphers string codes (defined by IANA) does not excatly match openshift ones\n # custom cipher defined for this test\n Check TLS Endpoints 0 TLSv1.2 ECDHE-RSA-CHACHA20-POLY1305 # TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256\n Check TLS Endpoints 1 TLSv1.3 ECDHE-RSA-CHACHA20-POLY1305 # TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256\n\n # mandatory cipher needed for internal enpoints (i.e. etcd), set if not defined by the user\n Check TLS Endpoints 0 TLSv1.2 ECDHE-RSA-AES128-GCM-SHA256 # TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256\n Check TLS Endpoints 1 TLSv1.3 ECDHE-RSA-AES128-GCM-SHA256 # TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256\n\n # when TLSv1.2 is set as min version, TLSv1.3 must also work\n Check TLS Endpoints 1 TLSv1.2 TLS_AES_128_GCM_SHA256\n Check TLS Endpoints 0 TLSv1.3 TLS_AES_128_GCM_SHA256\n\n [Teardown] Run Keywords\n ... Remove TLS Drop In Config\n ... Restart MicroShift","name":"Custom TLS 1_2 configuration","imports_file_locations":"{'..\/..\/resources\/microshift-config.resource': 'test\/resources\/microshift-config.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/configuration.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'TLS_12_CUSTOM_CIPHER': {'text': '${TLS_12_CUSTOM_CIPHER} SEPARATOR=\\\\n\\n... apiServer:\\n... \\\\ \\\\ tls:\\n... \\\\ \\\\ \\\\ \\\\ cipherSuites:\\n... \\\\ \\\\ \\\\ \\\\ - TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256\\n... \\\\ \\\\ \\\\ \\\\ minVersion: VersionTLS12'}}","documentation":""} {"code":"Custom TLS 1_3 configuration\n [Documentation] Configure API server to use TLSv1.3 as min version and verify only that version works\n ... TLSv1.2 must fail and cipher suites for TLSv1.3 can not be config by the user, always 3 are enabled.\n [Setup] Setup TLS Configuration ${TLS_13_MIN_VERSION}\n\n ${config}= Show Config effective\n Should Be Equal ${config.apiServer.tls.minVersion} VersionTLS13\n Length Should Be ${config.apiServer.tls.cipherSuites} 3\n Should Contain ${config.apiServer.tls.cipherSuites} TLS_AES_128_GCM_SHA256\n Should Contain ${config.apiServer.tls.cipherSuites} TLS_AES_256_GCM_SHA384\n Should Contain ${config.apiServer.tls.cipherSuites} TLS_CHACHA20_POLY1305_SHA256\n\n # checking the 3 ciphers available for TLSv1.3 on openshift\n Check TLS Endpoints 1 TLSv1.2 TLS_AES_128_GCM_SHA256\n Check TLS Endpoints 0 TLSv1.3 TLS_AES_128_GCM_SHA256\n Check TLS Endpoints 1 TLSv1.2 TLS_AES_256_GCM_SHA384\n Check TLS Endpoints 0 TLSv1.3 TLS_AES_256_GCM_SHA384\n Check TLS Endpoints 1 TLSv1.2 TLS_CHACHA20_POLY1305_SHA256\n Check TLS Endpoints 0 TLSv1.3 TLS_CHACHA20_POLY1305_SHA256\n\n [Teardown] Run Keywords\n ... Remove TLS Drop In Config\n ... Restart MicroShift","name":"Custom TLS 1_3 configuration","imports_file_locations":"{'..\/..\/resources\/microshift-config.resource': 'test\/resources\/microshift-config.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/configuration.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'TLS_13_MIN_VERSION': {'text': '${TLS_13_MIN_VERSION} SEPARATOR=\\\\n\\n... apiServer:\\n... \\\\ \\\\ tls:\\n... \\\\ \\\\ \\\\ \\\\ minVersion: VersionTLS13'}}","documentation":""} {"code":"Setup\n [Documentation] Test suite setup\n Check Required Env Variables\n Login MicroShift Host\n Setup Kubeconfig # for readiness checks\n Save Journal Cursor","name":"Setup","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/configuration.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Check Required Env Variables"} {"code":"Teardown\n [Documentation] Test suite teardown\n Remove Drop In MicroShift Config 10-loglevel\n Remove Drop In MicroShift Config 10-audit\n Restart MicroShift\n Logout MicroShift Host\n Remove Kubeconfig","name":"Teardown","imports_file_locations":"{'..\/..\/resources\/microshift-config.resource': 'test\/resources\/microshift-config.resource', '..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/configuration.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Remove Drop In MicroShift Config 10-loglevel"} {"code":"Save Journal Cursor\n [Documentation]\n ... Save the journal cursor then restart MicroShift so we capture the\n ... shutdown messages and startup messages.\n ${cursor}= Get Journal Cursor\n Set Suite Variable \\${CURSOR} ${cursor}","name":"Save Journal Cursor","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/configuration.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'CURSOR': {'text': '${CURSOR} ${EMPTY} # The journal cursor before restarting MicroShift'}}","documentation":"... Save the journal cursor then restart MicroShift so we capture the\n ... shutdown messages and startup messages."} {"code":"Setup With Bad Log Level\n [Documentation] Set log level to an unknown value and restart\n Drop In MicroShift Config ${BAD_LOG_LEVEL} 10-loglevel\n Restart MicroShift","name":"Setup With Bad Log Level","imports_file_locations":"{'..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/configuration.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'BAD_LOG_LEVEL': {'text': '${BAD_LOG_LEVEL} SEPARATOR=\\\\n\\n... ---\\n... debugging:\\n... \\\\ \\\\ logLevel: unknown-value'}}","documentation":"Drop In MicroShift Config ${BAD_LOG_LEVEL} 10-loglevel"} {"code":"Setup With Debug Log Level\n [Documentation] Set log level to debug and restart\n Drop In MicroShift Config ${DEBUG_LOG_LEVEL} 10-loglevel\n Restart MicroShift","name":"Setup With Debug Log Level","imports_file_locations":"{'..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/configuration.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'DEBUG_LOG_LEVEL': {'text': '${DEBUG_LOG_LEVEL} SEPARATOR=\\\\n\\n... ---\\n... debugging:\\n... \\\\ \\\\ logLevel: debug'}}","documentation":"Drop In MicroShift Config ${DEBUG_LOG_LEVEL} 10-loglevel"} {"code":"Setup Known Audit Log Profile\n [Documentation] Setup audit\n Drop In MicroShift Config ${AUDIT_PROFILE} 10-audit\n Restart MicroShift","name":"Setup Known Audit Log Profile","imports_file_locations":"{'..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/configuration.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'AUDIT_PROFILE': {'text': '${AUDIT_PROFILE} SEPARATOR=\\\\n\\n... apiServer:\\n... \\\\ \\\\ auditLog:\\n... \\\\ \\\\ \\\\ \\\\ profile: WriteRequestBodies'}}","documentation":"Drop In MicroShift Config ${AUDIT_PROFILE} 10-audit"} {"code":"Setup Audit Flags\n [Documentation] Apply the audit config values set in ${AUDIT_FLAGS}\n Drop In MicroShift Config ${AUDIT_FLAGS} 10-audit\n Restart MicroShift","name":"Setup Audit Flags","imports_file_locations":"{'..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/configuration.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'AUDIT_FLAGS': {'text': '${AUDIT_FLAGS} SEPARATOR=\\\\n\\n... apiServer:\\n... \\\\ \\\\ auditLog:\\n... \\\\ \\\\ \\\\ \\\\ maxFileSize: 1000\\n... \\\\ \\\\ \\\\ \\\\ maxFiles: 1000\\n... \\\\ \\\\ \\\\ \\\\ maxFileAge: 1000'}}","documentation":"Drop In MicroShift Config ${AUDIT_FLAGS} 10-audit"} {"code":"Deploy Storage Config\n [Documentation] Applies a storage ${config} to the exist MicroShift config, pushes it to the MicroShift host,\n ... and restarts microshift.service\n [Arguments] ${config}\n Cleanup MicroShift opt='--keep-images'\n Drop In MicroShift Config ${config} 10-storage\n Start MicroShift","name":"Deploy Storage Config","imports_file_locations":"{'..\/..\/resources\/microshift-config.resource': 'test\/resources\/microshift-config.resource', '..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/configuration.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"and restarts microshift.service"} {"code":"Setup TLS Configuration\n [Documentation] Apply the TLS configuration in the argument\n [Arguments] ${config}\n Drop In MicroShift Config ${config} 10-tls\n Restart MicroShift","name":"Setup TLS Configuration","imports_file_locations":"{'..\/..\/resources\/microshift-config.resource': 'test\/resources\/microshift-config.resource', '..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/configuration.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${config}"} {"code":"Remove TLS Drop In Config\n [Documentation] Remove the previously created drop-in config for storage\n Remove Drop In MicroShift Config 10-tls","name":"Remove TLS Drop In Config","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/configuration.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Remove Drop In MicroShift Config 10-tls"} {"code":"Remove Storage Drop In Config\n [Documentation] Remove the previously created drop-in config for storage\n Remove Drop In MicroShift Config 10-storage","name":"Remove Storage Drop In Config","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/configuration.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Remove Drop In MicroShift Config 10-storage"} {"code":"LVMS Is Deployed\n [Documentation] Wait for LVMS components to deploy\n Named Deployment Should Be Available lvms-operator openshift-storage 120s\n # Wait for vg-manager daemonset to exist before trying to \"wait\".\n # `oc wait` fails if the object doesn't exist.\n Wait Until Resource Exists daemonset vg-manager openshift-storage 120s\n Named Daemonset Should Be Available vg-manager openshift-storage 120s","name":"LVMS Is Deployed","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/configuration.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Named Deployment Should Be Available lvms-operator openshift-storage 120s"} {"code":"CSI Snapshot Controller Is Deployed\n [Documentation] Wait for CSI snapshot controller to be deployed\n Named Deployment Should Be Available csi-snapshot-controller kube-system 120s","name":"CSI Snapshot Controller Is Deployed","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/configuration.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Named Deployment Should Be Available csi-snapshot-controller kube-system 120s"} {"code":"Openssl Connect Command\n [Documentation] Run Openssl Connect Command in the remote server\n [Arguments] ${host_and_port} ${args}\n ${stdout} ${rc}= Execute Command\n ... openssl s_client -connect ${host_and_port} ${args} <<< \"Q\"\n ... sudo=True return_stdout=True return_stderr=False return_rc=True\n RETURN ${stdout} ${rc}","name":"Openssl Connect Command","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/configuration.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${host_and_port} ${args}"} {"code":"Check TLS Endpoints\n [Documentation] Run Openssl Connect Command to check k8s internal endpoints\n [Arguments] ${return_code} ${tls_version} ${cipher}\n IF \"${tls_version}\" == \"TLSv1.2\"\n Set Test Variable ${TLS_AND_CIPHER_ARGS} -tls1_2 -cipher ${cipher}\n ELSE IF \"${tls_version}\" == \"TLSv1.3\"\n Set Test Variable ${TLS_AND_CIPHER_ARGS} -tls1_3 -ciphersuites ${cipher}\n END\n\n # api server, kubelet, kube controller manager and kube scheduler endpoint ports\n FOR ${port} IN 6443 10250 10257 10259\n ${stdout} ${rc}= Openssl Connect Command ${USHIFT_HOST}:${port} ${TLS_AND_CIPHER_ARGS}\n Should Be Equal As Integers ${return_code} ${rc}\n IF \"${rc}\" == \"0\"\n Should Contain ${stdout} ${tls_version}, Cipher is ${cipher}\n END\n END\n\n # etcd endpoint, need to use cert and key because etcd requires mTLS\n Set Test Variable ${CERT_ARG} -cert ${APISERVER_ETCD_CLIENT_CERT}\/client.crt\n Set Test Variable ${KEY_ARG} -key ${APISERVER_ETCD_CLIENT_CERT}\/client.key\n ${stdout} ${rc}= Openssl Connect Command localhost:2379 ${TLS_AND_CIPHER_ARGS} ${CERT_ARG} ${KEY_ARG}\n Should Be Equal As Integers ${return_code} ${rc}","name":"Check TLS Endpoints","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/configuration.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'APISERVER_ETCD_CLIENT_CERT': {'text': '${APISERVER_ETCD_CLIENT_CERT} \/var\/lib\/microshift\/certs\/etcd-signer\/apiserver-etcd-client'}}","documentation":"[Arguments] ${return_code} ${tls_version} ${cipher}"} {"code":"*** Settings ***\nDocumentation Container policy verification\n\nResource ..\/..\/resources\/microshift-process.resource\nLibrary OperatingSystem\nLibrary Collections\n\nSuite Setup Setup\nSuite Teardown Teardown\n\n\n*** Variables ***\n${POLICY_JSON_PATH} \/etc\/containers\/policy.json\n${IMAGE_SIGSTORE_ENABLED} False\n\n\n*** Test Cases ***\nVerify Policy JSON Contents\n [Documentation] Verify container policy contents\n ${policy_contents}= Command Should Work cat ${POLICY_JSON_PATH}\n ${policy}= Json Parse ${policy_contents}\n\n IF ${IMAGE_SIGSTORE_ENABLED}\n Verify Sigstore Signing Enabled ${policy}\n ELSE\n Verify Sigstore Signing Disabled ${policy}\n END\n\n\n*** Keywords ***\nSetup\n [Documentation] Test suite setup\n Login MicroShift Host\n\nTeardown\n [Documentation] Test suite teardown\n Logout MicroShift Host\n\nVerify Sigstore Signing Enabled # robocop: disable=too-many-calls-in-keyword\n [Documentation] Verify the policy file contents when sigstore signing\n ... verification is enabled\n [Arguments] ${policy}\n\n # This verification should match the policy contents defined in\n # https:\/\/github.com\/openshift\/microshift\/blob\/main\/test\/kickstart-templates\/includes\/post-containers-sigstore.cfg\n\n # Verify default entry\n ${default_type}= Evaluate \"${policy}[default][0][type]\"\n Should Be Equal As Strings ${default_type} reject\n\n # Verify quay.io entry\n ${quay_type}= Evaluate \"${policy}[transports][docker][quay.io\/openshift-release-dev][0][type]\"\n Should Be Equal ${quay_type} sigstoreSigned\n ${quay_key}= Evaluate \"${policy}[transports][docker][quay.io\/openshift-release-dev][0][keyPath]\"\n Should Be Equal ${quay_key} \/etc\/containers\/RedHat_ReleaseKey3.pub\n ${quay_ident}= Evaluate\n ... \"${policy}[transports][docker][quay.io\/openshift-release-dev][0][signedIdentity][type]\"\n Should Be Equal ${quay_ident} matchRepoDigestOrExact\n\n # Verify registry.redhat.io entry\n ${redhat_type}= Evaluate \"${policy}[transports][docker][registry.redhat.io][0][type]\"\n Should Be Equal ${redhat_type} sigstoreSigned\n ${redhat_key}= Evaluate \"${policy}[transports][docker][registry.redhat.io][0][keyPath]\"\n Should Be Equal ${redhat_key} \/etc\/containers\/RedHat_ReleaseKey3.pub\n ${redhat_ident}= Evaluate \"${policy}[transports][docker][registry.redhat.io][0][signedIdentity][type]\"\n Should Be Equal ${redhat_ident} matchRepoDigestOrExact\n\nVerify Sigstore Signing Disabled\n [Documentation] Verify the policy file contents when sigstore signing\n ... verification is disabled\n [Arguments] ${policy}\n # This verification should match the policy contents defined in\n # https:\/\/github.com\/openshift\/microshift\/blob\/main\/test\/kickstart-templates\/includes\/post-containers.cfg\n\n # Verify default entry\n ${default_type}= Evaluate \"${policy}[default][0][type]\"\n Should Be Equal As Strings ${default_type} insecureAcceptAnything\n\n # Verify transports entry\n ${quay_type}= Evaluate '${policy}[transports][docker-daemon][][0][type]'\n Should Be Equal ${quay_type} insecureAcceptAnything\n","name":"\/tmp\/repos\/microshift\/test\/suites\/standard2\/containers-policy.robot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/containers-policy.robot","element_type":"test","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Verify Policy JSON Contents\n [Documentation] Verify container policy contents\n ${policy_contents}= Command Should Work cat ${POLICY_JSON_PATH}\n ${policy}= Json Parse ${policy_contents}\n\n IF ${IMAGE_SIGSTORE_ENABLED}\n Verify Sigstore Signing Enabled ${policy}\n ELSE\n Verify Sigstore Signing Disabled ${policy}\n END","name":"Verify Policy JSON Contents","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/containers-policy.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'POLICY_JSON_PATH': {'text': '${POLICY_JSON_PATH} \/etc\/containers\/policy.json'}, 'IMAGE_SIGSTORE_ENABLED': {'text': '${IMAGE_SIGSTORE_ENABLED} False'}}","documentation":""} {"code":"Setup\n [Documentation] Test suite setup\n Login MicroShift Host","name":"Setup","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/containers-policy.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Login MicroShift Host"} {"code":"Teardown\n [Documentation] Test suite teardown\n Logout MicroShift Host","name":"Teardown","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/containers-policy.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Logout MicroShift Host"} {"code":"Verify Sigstore Signing Enabled # robocop: disable=too-many-calls-in-keyword\n [Documentation] Verify the policy file contents when sigstore signing\n ... verification is enabled\n [Arguments] ${policy}\n\n # This verification should match the policy contents defined in\n # https:\/\/github.com\/openshift\/microshift\/blob\/main\/test\/kickstart-templates\/includes\/post-containers-sigstore.cfg\n\n # Verify default entry\n ${default_type}= Evaluate \"${policy}[default][0][type]\"\n Should Be Equal As Strings ${default_type} reject\n\n # Verify quay.io entry\n ${quay_type}= Evaluate \"${policy}[transports][docker][quay.io\/openshift-release-dev][0][type]\"\n Should Be Equal ${quay_type} sigstoreSigned\n ${quay_key}= Evaluate \"${policy}[transports][docker][quay.io\/openshift-release-dev][0][keyPath]\"\n Should Be Equal ${quay_key} \/etc\/containers\/RedHat_ReleaseKey3.pub\n ${quay_ident}= Evaluate\n ... \"${policy}[transports][docker][quay.io\/openshift-release-dev][0][signedIdentity][type]\"\n Should Be Equal ${quay_ident} matchRepoDigestOrExact\n\n # Verify registry.redhat.io entry\n ${redhat_type}= Evaluate \"${policy}[transports][docker][registry.redhat.io][0][type]\"\n Should Be Equal ${redhat_type} sigstoreSigned\n ${redhat_key}= Evaluate \"${policy}[transports][docker][registry.redhat.io][0][keyPath]\"\n Should Be Equal ${redhat_key} \/etc\/containers\/RedHat_ReleaseKey3.pub\n ${redhat_ident}= Evaluate \"${policy}[transports][docker][registry.redhat.io][0][signedIdentity][type]\"\n Should Be Equal ${redhat_ident} matchRepoDigestOrExact","name":"Verify Sigstore Signing Enabled","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/containers-policy.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"verification is enabled"} {"code":"Verify Sigstore Signing Disabled\n [Documentation] Verify the policy file contents when sigstore signing\n ... verification is disabled\n [Arguments] ${policy}\n # This verification should match the policy contents defined in\n # https:\/\/github.com\/openshift\/microshift\/blob\/main\/test\/kickstart-templates\/includes\/post-containers.cfg\n\n # Verify default entry\n ${default_type}= Evaluate \"${policy}[default][0][type]\"\n Should Be Equal As Strings ${default_type} insecureAcceptAnything\n\n # Verify transports entry\n ${quay_type}= Evaluate '${policy}[transports][docker-daemon][][0][type]'\n Should Be Equal ${quay_type} insecureAcceptAnything","name":"Verify Sigstore Signing Disabled","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/containers-policy.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"verification is disabled"} {"code":"*** Settings ***\nDocumentation Tests for Telemetry\n\nResource ..\/..\/resources\/common.resource\nResource ..\/..\/resources\/microshift-config.resource\nResource ..\/..\/resources\/microshift-process.resource\nLibrary ..\/..\/resources\/journalctl.py\n\nSuite Setup Setup\nSuite Teardown Teardown\n\nTest Tags restart slow\n\n\n*** Variables ***\n# Temporary use of the telemetry production server until staging is ready.\n${TELEMETRY_WRITE_ENDPOINT} https:\/\/infogw.api.openshift.com\n${ENABLE_TELEMETRY} SEPARATOR=\\n\n... telemetry:\n... \\ \\ status: Enabled\n... \\ \\ endpoint: ${TELEMETRY_WRITE_ENDPOINT}\n${JOURNAL_CURSOR} ${EMPTY}\n${PULL_SECRET} \/etc\/crio\/openshift-pull-secret\n${PULL_SECRET_METRICS} \/etc\/crio\/openshift-pull-secret-with-telemetry\n${PULL_SECRET_NO_METRICS} \/etc\/crio\/openshift-pull-secret-without-telemetry\n\n\n*** Test Cases ***\nMicroShift Reports Metrics To Server\n [Documentation] Check MicroShift is able to send metrics to the telemetry server without errors.\n [Tags] robot:exclude\n [Setup] Setup Telemetry Configuration\n\n Wait Until Keyword Succeeds 10x 10s\n ... Should Find Metrics Success\n\n [Teardown] Remove Telemetry Configuration\n\n\n*** Keywords ***\nSetup\n [Documentation] Test suite setup\n Check Required Env Variables\n Login MicroShift Host\n Configure Pull Secrets\n Setup Kubeconfig\n\nTeardown\n [Documentation] Test suite teardown\n Restore Pull Secrets\n Restart MicroShift\n Logout MicroShift Host\n Remove Kubeconfig\n\nSetup Telemetry Configuration\n [Documentation] Enables the telemetry feature in MicroShift configuration file\n ... and restarts microshift.service\n Drop In MicroShift Config ${ENABLE_TELEMETRY} 10-telemetry\n Stop MicroShift\n ${cursor}= Get Journal Cursor\n Set Suite Variable \\${CURSOR} ${cursor}\n Restart MicroShift\n\nRemove Telemetry Configuration\n [Documentation] Removes the telemetry feature from MicroShift configuration file\n ... and restarts microshift.service\n Remove Drop In MicroShift Config 10-telemetry\n Restart MicroShift\n\nConfigure Pull Secrets\n [Documentation] Sets up the pull secrets for the MicroShift cluster.\n ${rc}= SSHLibrary.Execute Command\n ... grep -q cloud.openshift.com ${PULL_SECRET} || sudo ln -sf ${PULL_SECRET_METRICS} ${PULL_SECRET}\n ... sudo=True\n ... return_rc=True\n ... return_stderr=False\n ... return_stdout=False\n Should Be Equal As Integers ${rc} 0\n\nRestore Pull Secrets\n [Documentation] Restores the original pull secrets for the MicroShift cluster if it was changed by the test.\n ${rc}= SSHLibrary.Execute Command\n ... test -f ${PULL_SECRET_NO_METRICS} && sudo ln -sf ${PULL_SECRET_NO_METRICS} ${PULL_SECRET} || true\n ... sudo=True return_rc=True return_stderr=False return_stdout=False\n Should Be Equal As Integers ${rc} 0\n\nShould Find Metrics Success\n [Documentation] Logs should contain metrics success message\n Pattern Should Appear In Log Output ${CURSOR} Metrics sent successfully\n","name":"\/tmp\/repos\/microshift\/test\/suites\/standard2\/telemetry.robot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/telemetry.robot","element_type":"test","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"MicroShift Reports Metrics To Server\n [Documentation] Check MicroShift is able to send metrics to the telemetry server without errors.\n [Tags] robot:exclude\n [Setup] Setup Telemetry Configuration\n\n Wait Until Keyword Succeeds 10x 10s\n ... Should Find Metrics Success\n\n [Teardown] Remove Telemetry Configuration","name":"MicroShift Reports Metrics To Server","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/telemetry.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Setup\n [Documentation] Test suite setup\n Check Required Env Variables\n Login MicroShift Host\n Configure Pull Secrets\n Setup Kubeconfig","name":"Setup","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/telemetry.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Check Required Env Variables"} {"code":"Teardown\n [Documentation] Test suite teardown\n Restore Pull Secrets\n Restart MicroShift\n Logout MicroShift Host\n Remove Kubeconfig","name":"Teardown","imports_file_locations":"{'..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/telemetry.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Restore Pull Secrets"} {"code":"Setup Telemetry Configuration\n [Documentation] Enables the telemetry feature in MicroShift configuration file\n ... and restarts microshift.service\n Drop In MicroShift Config ${ENABLE_TELEMETRY} 10-telemetry\n Stop MicroShift\n ${cursor}= Get Journal Cursor\n Set Suite Variable \\${CURSOR} ${cursor}\n Restart MicroShift","name":"Setup Telemetry Configuration","imports_file_locations":"{'..\/..\/resources\/microshift-config.resource': 'test\/resources\/microshift-config.resource', '..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/telemetry.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'ENABLE_TELEMETRY': {'text': '${ENABLE_TELEMETRY} SEPARATOR=\\\\n\\n... telemetry:\\n... \\\\ \\\\ status: Enabled\\n... \\\\ \\\\ endpoint: ${TELEMETRY_WRITE_ENDPOINT}'}}","documentation":"and restarts microshift.service"} {"code":"Remove Telemetry Configuration\n [Documentation] Removes the telemetry feature from MicroShift configuration file\n ... and restarts microshift.service\n Remove Drop In MicroShift Config 10-telemetry\n Restart MicroShift","name":"Remove Telemetry Configuration","imports_file_locations":"{'..\/..\/resources\/microshift-config.resource': 'test\/resources\/microshift-config.resource', '..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/telemetry.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"and restarts microshift.service"} {"code":"Configure Pull Secrets\n [Documentation] Sets up the pull secrets for the MicroShift cluster.\n ${rc}= SSHLibrary.Execute Command\n ... grep -q cloud.openshift.com ${PULL_SECRET} || sudo ln -sf ${PULL_SECRET_METRICS} ${PULL_SECRET}\n ... sudo=True\n ... return_rc=True\n ... return_stderr=False\n ... return_stdout=False\n Should Be Equal As Integers ${rc} 0","name":"Configure Pull Secrets","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/telemetry.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'PULL_SECRET': {'text': '${PULL_SECRET} \/etc\/crio\/openshift-pull-secret'}, 'PULL_SECRET_METRICS': {'text': '${PULL_SECRET_METRICS} \/etc\/crio\/openshift-pull-secret-with-telemetry'}}","documentation":"${rc}= SSHLibrary.Execute Command\n ... grep -q cloud.openshift.com ${PULL_SECRET} || sudo ln -sf ${PULL_SECRET_METRICS} ${PULL_SECRET}\n ... sudo=True\n ... return_rc=True\n ... return_stderr=False\n ... return_stdout=False"} {"code":"Restore Pull Secrets\n [Documentation] Restores the original pull secrets for the MicroShift cluster if it was changed by the test.\n ${rc}= SSHLibrary.Execute Command\n ... test -f ${PULL_SECRET_NO_METRICS} && sudo ln -sf ${PULL_SECRET_NO_METRICS} ${PULL_SECRET} || true\n ... sudo=True return_rc=True return_stderr=False return_stdout=False\n Should Be Equal As Integers ${rc} 0","name":"Restore Pull Secrets","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/telemetry.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'PULL_SECRET_NO_METRICS': {'text': '${PULL_SECRET_NO_METRICS} \/etc\/crio\/openshift-pull-secret-without-telemetry'}, 'PULL_SECRET': {'text': '${PULL_SECRET} \/etc\/crio\/openshift-pull-secret'}}","documentation":"${rc}= SSHLibrary.Execute Command\n ... test -f ${PULL_SECRET_NO_METRICS} && sudo ln -sf ${PULL_SECRET_NO_METRICS} ${PULL_SECRET} || true\n ... sudo=True return_rc=True return_stderr=False return_stdout=False"} {"code":"Should Find Metrics Success\n [Documentation] Logs should contain metrics success message\n Pattern Should Appear In Log Output ${CURSOR} Metrics sent successfully","name":"Should Find Metrics Success","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/telemetry.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Pattern Should Appear In Log Output ${CURSOR} Metrics sent successfully"} {"code":"*** Settings ***\nDocumentation Tests related to MicroShift automated certificate rotation.\n\nResource ..\/..\/resources\/common.resource\nResource ..\/..\/resources\/microshift-process.resource\nResource ..\/..\/resources\/microshift-host.resource\nResource ..\/..\/resources\/ostree-health.resource\nLibrary DateTime\nLibrary Collections\n\nSuite Setup Setup\nSuite Teardown Teardown\n\nTest Tags restart\n\n\n*** Variables ***\n${KUBE_SCHEDULER_CLIENT_CERT} \/var\/lib\/microshift\/certs\/kube-control-plane-signer\/kube-scheduler\/client.crt\n${OSSL_CMD} openssl x509 -noout -dates -in\n${OSSL_DATE_FORMAT} %b %d %Y\n${TIMEDATECTL_DATE_FORMAT} %Y-%m-%d %H:%M:%S\n${FUTURE_DAYS} 150\n\n\n*** Test Cases ***\nCertificate Rotation\n [Documentation] Performs Certificate Expiration Rotation test\n ${first_cert_date}= Compute Date After Days 365 ${OSSL_DATE_FORMAT}\n Certs Should Expire On ${KUBE_SCHEDULER_CLIENT_CERT} ${first_cert_date}\n ${cert_should_expire_in_days}= Evaluate 365+${FUTURE_DAYS}\n ${cert_expiry_date}= Compute Date After Days ${cert_should_expire_in_days} ${OSSL_DATE_FORMAT}\n ${future_date}= Compute Date After Days ${FUTURE_DAYS} ${TIMEDATECTL_DATE_FORMAT}\n Change System Date To ${future_date}\n Certs Should Expire On ${KUBE_SCHEDULER_CLIENT_CERT} ${cert_expiry_date}\n\n\n*** Keywords ***\nSetup\n [Documentation] Test suite setup\n Check Required Env Variables\n Login MicroShift Host\n Setup Kubeconfig # for readiness checks\n Restart Greenboot And Wait For Success\n\nTeardown\n [Documentation] Test suite teardown\n Restore System Date\n Logout MicroShift Host\n\nRestore System Date\n [Documentation] Reset Microshift date to current date\n ${ushift_pid}= MicroShift Process ID\n Systemctl start chronyd\n Wait Until MicroShift Process ID Changes ${ushift_pid}\n Wait For MicroShift\n\nChange System Date To\n [Documentation] Move the system to a future date.\n [Arguments] ${future_date}\n ${ushift_pid}= MicroShift Process ID\n Systemctl stop chronyd\n Command Should Work TZ=UTC timedatectl set-time \"${future_date}\"\n Wait Until MicroShift Process ID Changes ${ushift_pid}\n Wait For MicroShift\n\nCompute Date After Days\n [Documentation] return system date after number of days elapsed\n [Arguments] ${number_of_days} ${date_format}\n # date command is used here because we need to consider the remote vm timezone .\n ${future_date}= Command Should Work TZ=UTC date \"+${date_format}\" -d \"$(date) + ${number_of_days} day\"\n RETURN ${future_date}\n\nCerts Should Expire On\n [Documentation] verify if the ceritifate expires at given date.\n [Arguments] ${cert_file} ${cert_expected_date}\n ${expiration_date}= Command Should Work\n ... ${OSSL_CMD} ${cert_file} | grep notAfter | cut -f2 -d'=' | awk '{printf (\"%s %02d %d\",$1,$2,$4)}'\n Should Be Equal As Strings ${cert_expected_date} ${expiration_date}\n","name":"\/tmp\/repos\/microshift\/test\/suites\/standard2\/validate-certificate-rotation.robot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/validate-certificate-rotation.robot","element_type":"test","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Certificate Rotation\n [Documentation] Performs Certificate Expiration Rotation test\n ${first_cert_date}= Compute Date After Days 365 ${OSSL_DATE_FORMAT}\n Certs Should Expire On ${KUBE_SCHEDULER_CLIENT_CERT} ${first_cert_date}\n ${cert_should_expire_in_days}= Evaluate 365+${FUTURE_DAYS}\n ${cert_expiry_date}= Compute Date After Days ${cert_should_expire_in_days} ${OSSL_DATE_FORMAT}\n ${future_date}= Compute Date After Days ${FUTURE_DAYS} ${TIMEDATECTL_DATE_FORMAT}\n Change System Date To ${future_date}\n Certs Should Expire On ${KUBE_SCHEDULER_CLIENT_CERT} ${cert_expiry_date}","name":"Certificate Rotation","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/validate-certificate-rotation.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'OSSL_DATE_FORMAT': {'text': '${OSSL_DATE_FORMAT} %b %d %Y'}, 'KUBE_SCHEDULER_CLIENT_CERT': {'text': '${KUBE_SCHEDULER_CLIENT_CERT} \/var\/lib\/microshift\/certs\/kube-control-plane-signer\/kube-scheduler\/client.crt'}, 'FUTURE_DAYS': {'text': '${FUTURE_DAYS} 150'}, 'TIMEDATECTL_DATE_FORMAT': {'text': '${TIMEDATECTL_DATE_FORMAT} %Y-%m-%d %H:%M:%S'}}","documentation":""} {"code":"Setup\n [Documentation] Test suite setup\n Check Required Env Variables\n Login MicroShift Host\n Setup Kubeconfig # for readiness checks\n Restart Greenboot And Wait For Success","name":"Setup","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource', '..\/..\/resources\/ostree-health.resource': 'test\/resources\/ostree-health.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/validate-certificate-rotation.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Check Required Env Variables"} {"code":"Teardown\n [Documentation] Test suite teardown\n Restore System Date\n Logout MicroShift Host","name":"Teardown","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/validate-certificate-rotation.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Restore System Date"} {"code":"Restore System Date\n [Documentation] Reset Microshift date to current date\n ${ushift_pid}= MicroShift Process ID\n Systemctl start chronyd\n Wait Until MicroShift Process ID Changes ${ushift_pid}\n Wait For MicroShift","name":"Restore System Date","imports_file_locations":"{'..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/validate-certificate-rotation.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${ushift_pid}= MicroShift Process ID"} {"code":"Change System Date To\n [Documentation] Move the system to a future date.\n [Arguments] ${future_date}\n ${ushift_pid}= MicroShift Process ID\n Systemctl stop chronyd\n Command Should Work TZ=UTC timedatectl set-time \"${future_date}\"\n Wait Until MicroShift Process ID Changes ${ushift_pid}\n Wait For MicroShift","name":"Change System Date To","imports_file_locations":"{'..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource', '..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/validate-certificate-rotation.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${future_date}"} {"code":"Compute Date After Days\n [Documentation] return system date after number of days elapsed\n [Arguments] ${number_of_days} ${date_format}\n # date command is used here because we need to consider the remote vm timezone .\n ${future_date}= Command Should Work TZ=UTC date \"+${date_format}\" -d \"$(date) + ${number_of_days} day\"\n RETURN ${future_date}","name":"Compute Date After Days","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/validate-certificate-rotation.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${number_of_days} ${date_format}"} {"code":"Certs Should Expire On\n [Documentation] verify if the ceritifate expires at given date.\n [Arguments] ${cert_file} ${cert_expected_date}\n ${expiration_date}= Command Should Work\n ... ${OSSL_CMD} ${cert_file} | grep notAfter | cut -f2 -d'=' | awk '{printf (\"%s %02d %d\",$1,$2,$4)}'\n Should Be Equal As Strings ${cert_expected_date} ${expiration_date}","name":"Certs Should Expire On","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/validate-certificate-rotation.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'OSSL_CMD': {'text': '${OSSL_CMD} openssl x509 -noout -dates -in'}}","documentation":"[Arguments] ${cert_file} ${cert_expected_date}"} {"code":"*** Settings ***\nDocumentation Tests custom certificates functionality\n\nResource ..\/..\/resources\/microshift-config.resource\nResource ..\/..\/resources\/microshift-process.resource\nResource ..\/..\/resources\/openssl.resource\nLibrary ..\/..\/resources\/journalctl.py\n\nSuite Setup Setup\nSuite Teardown Teardown\n\nTest Tags restart slow\n\n\n*** Variables ***\n${CSR_CONFIG} .\/assets\/custom-certs\/csr.conf.template\n${CSR_NOSAN_CONFIG} .\/assets\/custom-certs\/csr-no-san.conf.template\n${MASTER_IP} 1.1.1.1\n${TMPDIR} ${EMPTY}\n${RHL_CA_PATH} ${EMPTY}\n\n\n*** Test Cases ***\nTest Missing File\n [Documentation] Missing certificate files should be ignored with a warning\n [Setup] Setup Test\n ${cursor}= Get Journal Cursor\n Set Suite Variable \\${CURSOR} ${cursor}\n Configure Named Certificates ${TMPDIR}\/server.crt ${TMPDIR}\/server.key\n Restart MicroShift\n Pattern Should Appear In Log Output ${CURSOR} unparsable certificates are ignored\n Setup Kubeconfig\n MicroShift Is Live\n\nTest Expired Cert\n [Documentation] Expired certificate files should be accepted but fail secure connection\n [Setup] Setup Test\n # Generate CSR Config\n Create Keys\n ${hostname}= Generate Random HostName\n Create Cert TestCN ${hostname} 5.5.5.5 0\n Upload Certificates\n Configure Named Certificates ${TMPDIR}\/server.crt ${TMPDIR}\/server.key\n Restart MicroShift\n Add Entry To Hosts ${USHIFT_HOST} ${hostname}\n Setup Custom Kubeconfig ${hostname}\n OC Should Fail To Connect With Expired Cert\n [Teardown] Remove Entry From Hosts ${hostname}\n\nTest Local Cert\n [Documentation] localhost certs should be ignored with a warning\n [Setup] Setup Test\n ${cursor}= Get Journal Cursor\n Set Suite Variable \\${CURSOR} ${cursor}\n Create Keys\n Create Cert TestCN localhost\n Upload Certificates\n Configure Named Certificates ${TMPDIR}\/server.crt ${TMPDIR}\/server.key\n Restart MicroShift\n Pattern Should Appear In Log Output ${CURSOR} is not allowed - ignoring\n Setup Kubeconfig\n MicroShift Is Live\n\nTest SAN Cert\n [Documentation] Create regular SNI certificate\n [Setup] Setup Test\n Create Keys\n ${hostname}= Generate Random HostName\n Create Cert TestCN ${hostname}\n Upload Certificates\n Configure Named Certificates ${TMPDIR}\/server.crt ${TMPDIR}\/server.key test\n Restart MicroShift\n Add Entry To Hosts ${USHIFT_HOST} ${hostname}\n Setup Custom Kubeconfig ${hostname}\n OC Should Fail To Connect With Unknown CA\n MicroShift Is Live With Custom CA ${TMPDIR}\/ca.crt\n [Teardown] Remove Entry From Hosts ${hostname}\n\nTest Wildcard Only Cert\n [Documentation] Create WildCard only certificate\n [Setup] Setup Test\n Create Keys\n ${hostname}= Generate Random HostName\n Create Cert TestCN *.api.com\n Upload Certificates\n Configure Named Certificates ${TMPDIR}\/server.crt ${TMPDIR}\/server.key\n Restart MicroShift\n Add Entry To Hosts ${USHIFT_HOST} ${hostname}\n Setup Custom Kubeconfig TestCN\n Replace Server In Kubeconfig ${hostname}\n OC Should Fail To Connect With Unknown CA\n MicroShift Is Live With Custom CA ${TMPDIR}\/ca.crt\n [Teardown] Remove Entry From Hosts ${hostname}\n\nTest Wildcard With Names Cert\n [Documentation] Create WildCard certificate with additional config name\n [Setup] Setup Test\n Create Keys\n ${hostname}= Generate Random HostName\n Create Cert TestCN *.api.com\n Upload Certificates\n Configure Named Certificates ${TMPDIR}\/server.crt ${TMPDIR}\/server.key ${hostname}\n Restart MicroShift\n Add Entry To Hosts ${USHIFT_HOST} ${hostname}\n Setup Custom Kubeconfig ${hostname}\n OC Should Fail To Connect With Unknown CA\n MicroShift Is Live With Custom CA ${TMPDIR}\/ca.crt\n [Teardown] Remove Entry From Hosts ${hostname}\n\n\n*** Keywords ***\nSetup\n [Documentation] Set up all of the tests in this suite\n Check Required Env Variables\n Login MicroShift Host\n Setup Kubeconfig\n\nSetup Test\n [Documentation] Test suite setup\n ${tmp}= Create Random Temp Directory\n Set Global Variable ${TMPDIR} ${tmp}\n\nTeardown\n [Documentation] Test suite teardown\n Remove Drop In MicroShift Config 10-subjectAltNames\n Remove Kubeconfig\n Logout MicroShift Host\n\nCreate Keys\n [Documentation] Create a certificate CA\n Openssl genrsa -out ${TMPDIR}\/ca.key 2048\n Openssl genrsa -out ${TMPDIR}\/server.key 2048\n Openssl req -x509 -new -nodes -key ${TMPDIR}\/ca.key -subj \"\/CN\\=${MASTER_IP}\"\n ... -days 10000 -out ${TMPDIR}\/ca.crt\n\nCreate Cert No San\n [Documentation] Create a certificate\n [Arguments] ${cert_cn}\n Set Global Variable ${CERT_CN}\n Generate CSR Config ${CSR_NOSAN_CONFIG} ${TMPDIR}\/csr.conf\n Openssl req -new -key ${TMPDIR}\/server.key -out ${TMPDIR}\/server.csr -config ${TMPDIR}\/csr.conf\n Openssl x509 -req -in ${TMPDIR}\/server.csr -CA ${TMPDIR}\/ca.crt -CAkey ${TMPDIR}\/ca.key -CAcreateserial\n ... -out ${TMPDIR}\/server.crt -days 10000 -extensions v3_ext -extfile ${TMPDIR}\/csr.conf -sha256\n\nCreate Cert\n [Documentation] Create a certificate\n [Arguments] ${cert_cn} ${cert_san_dns}=${EMPTY} ${cert_san_ip}=${EMPTY} ${expiry_days}=1000\n Set Global Variable ${CERT_CN}\n IF \"${cert_san_dns}\"!=\"${EMPTY}\"\n Set Global Variable ${CERT_SAN_DNS} DNS.1 = ${cert_san_dns}\n ELSE\n Set Global Variable ${CERT_SAN_DNS}\n END\n\n IF \"${cert_san_ip}\"!=\"${EMPTY}\"\n Set Global Variable ${CERT_SAN_IP} IP.1 = ${cert_san_ip}\n ELSE\n Set Global Variable ${CERT_SAN_IP}\n END\n Generate CSR Config ${CSR_CONFIG} ${TMPDIR}\/csr.conf\n Openssl req -new -key ${TMPDIR}\/server.key -out ${TMPDIR}\/server.csr -config ${TMPDIR}\/csr.conf\n Openssl x509 -req -in ${TMPDIR}\/server.csr -CA ${TMPDIR}\/ca.crt -CAkey ${TMPDIR}\/ca.key -CAcreateserial\n ... -out ${TMPDIR}\/server.crt -days ${expiry_days} -extensions v3_ext -extfile ${TMPDIR}\/csr.conf -sha256\n\nUpload Certificates\n [Documentation] Upload certificates to remote host\n Put Directory ${TMPDIR} ${TMPDIR}\n\nConfigure Named Certificates\n [Documentation] Replace namedCertificates entries in the configuration file.\n [Arguments] ${cert_path} ${key_path} ${sni}=${EMPTY}\n\n ${subject_alt_names}= CATENATE SEPARATOR=\\n\n ... apiServer:\n ... \\ \\ subjectAltNames:\n ... \\ \\ -\\ ${USHIFT_HOST}\n ... \\ \\ namedCertificates:\n ... \\ \\ - certPath:\\ ${cert_path}\n ... \\ \\ \\ \\ keyPath:\\ ${key_path}\n\n IF \"${sni}\"!=\"${EMPTY}\"\n ${subject_alt_names}= CATENATE SEPARATOR=\\n ${subject_alt_names}\n ... \\ \\ \\ \\ names:\n ... \\ \\ \\ \\ - ${sni}\n END\n Drop In MicroShift Config ${subject_alt_names} 10-subjectAltNames\n\nGenerate Random HostName\n [Documentation] Generate Random Hostname\n ${rand}= Generate Random String\n ${rand}= Convert To Lower Case ${rand}\n RETURN ${rand}.api.com\n\nAdd Entry To Hosts\n [Documentation] Add new entry to local \/etc\/hosts\n [Arguments] ${ip} ${host}\n ${ttt}= Set Variable ${ip}\\t${host} # RF test marker\\n\n ${result}= Run Process sudo tee -a \/etc\/hosts shell=True stdin=${ttt}\n Should Be Equal As Integers ${result.rc} 0\n\nRemove Entry From Hosts\n [Documentation] Removes entry from local \/etc\/hosts\n [Arguments] ${host}\n ${result}= Run Process sudo sed -i \"\/${host} # RF test marker\/d\" \/etc\/hosts shell=True\n Should Be Equal As Integers ${result.rc} 0\n\nReplace Server In Kubeconfig\n [Documentation] replace the server part of kubeconfig\n [Arguments] ${fqdn}\n ${result}= Run Process sudo sed -i \"s|server:.*|server: https:\\\/\\\/${fqdn}:6443|\" ${KUBECONFIG} shell=True\n Should Be Equal As Integers ${result.rc} 0\n\nOC Should Fail To Connect With Unknown CA\n [Documentation] Check the \/livez endpoint\n ${stdout}= Run With Kubeconfig oc get --raw='\/livez' allow_fail=True\n Should Contain ${stdout} certificate signed by unknown authority strip_spaces=True\n\nOC Should Fail To Connect With Expired Cert\n [Documentation] Check the \/livez endpoint\n ${stdout}= Run With Kubeconfig oc get --raw='\/livez' allow_fail=True\n Should Contain ${stdout} certificate has expired or is not yet valid strip_spaces=True\n\nMicroShift Is Live With Custom CA\n [Documentation] Check the \/livez endpoint with Custom CA\n [Arguments] ${ca_path}\n MicroShift Is Live --certificate-authority ${ca_path}\n","name":"\/tmp\/repos\/microshift\/test\/suites\/standard2\/validate-custom-certificates.robot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/validate-custom-certificates.robot","element_type":"test","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Test Missing File\n [Documentation] Missing certificate files should be ignored with a warning\n [Setup] Setup Test\n ${cursor}= Get Journal Cursor\n Set Suite Variable \\${CURSOR} ${cursor}\n Configure Named Certificates ${TMPDIR}\/server.crt ${TMPDIR}\/server.key\n Restart MicroShift\n Pattern Should Appear In Log Output ${CURSOR} unparsable certificates are ignored\n Setup Kubeconfig\n MicroShift Is Live","name":"Test Missing File","imports_file_locations":"{'..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/validate-custom-certificates.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'TMPDIR': {'text': '${TMPDIR} ${EMPTY}'}}","documentation":""} {"code":"Test Expired Cert\n [Documentation] Expired certificate files should be accepted but fail secure connection\n [Setup] Setup Test\n # Generate CSR Config\n Create Keys\n ${hostname}= Generate Random HostName\n Create Cert TestCN ${hostname} 5.5.5.5 0\n Upload Certificates\n Configure Named Certificates ${TMPDIR}\/server.crt ${TMPDIR}\/server.key\n Restart MicroShift\n Add Entry To Hosts ${USHIFT_HOST} ${hostname}\n Setup Custom Kubeconfig ${hostname}\n OC Should Fail To Connect With Expired Cert\n [Teardown] Remove Entry From Hosts ${hostname}","name":"Test Expired Cert","imports_file_locations":"{'..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/validate-custom-certificates.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'TMPDIR': {'text': '${TMPDIR} ${EMPTY}'}}","documentation":""} {"code":"Test Local Cert\n [Documentation] localhost certs should be ignored with a warning\n [Setup] Setup Test\n ${cursor}= Get Journal Cursor\n Set Suite Variable \\${CURSOR} ${cursor}\n Create Keys\n Create Cert TestCN localhost\n Upload Certificates\n Configure Named Certificates ${TMPDIR}\/server.crt ${TMPDIR}\/server.key\n Restart MicroShift\n Pattern Should Appear In Log Output ${CURSOR} is not allowed - ignoring\n Setup Kubeconfig\n MicroShift Is Live","name":"Test Local Cert","imports_file_locations":"{'..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/validate-custom-certificates.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'TMPDIR': {'text': '${TMPDIR} ${EMPTY}'}}","documentation":""} {"code":"Test SAN Cert\n [Documentation] Create regular SNI certificate\n [Setup] Setup Test\n Create Keys\n ${hostname}= Generate Random HostName\n Create Cert TestCN ${hostname}\n Upload Certificates\n Configure Named Certificates ${TMPDIR}\/server.crt ${TMPDIR}\/server.key test\n Restart MicroShift\n Add Entry To Hosts ${USHIFT_HOST} ${hostname}\n Setup Custom Kubeconfig ${hostname}\n OC Should Fail To Connect With Unknown CA\n MicroShift Is Live With Custom CA ${TMPDIR}\/ca.crt\n [Teardown] Remove Entry From Hosts ${hostname}","name":"Test SAN Cert","imports_file_locations":"{'..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/validate-custom-certificates.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'TMPDIR': {'text': '${TMPDIR} ${EMPTY}'}}","documentation":""} {"code":"Test Wildcard Only Cert\n [Documentation] Create WildCard only certificate\n [Setup] Setup Test\n Create Keys\n ${hostname}= Generate Random HostName\n Create Cert TestCN *.api.com\n Upload Certificates\n Configure Named Certificates ${TMPDIR}\/server.crt ${TMPDIR}\/server.key\n Restart MicroShift\n Add Entry To Hosts ${USHIFT_HOST} ${hostname}\n Setup Custom Kubeconfig TestCN\n Replace Server In Kubeconfig ${hostname}\n OC Should Fail To Connect With Unknown CA\n MicroShift Is Live With Custom CA ${TMPDIR}\/ca.crt\n [Teardown] Remove Entry From Hosts ${hostname}","name":"Test Wildcard Only Cert","imports_file_locations":"{'..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/validate-custom-certificates.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'TMPDIR': {'text': '${TMPDIR} ${EMPTY}'}}","documentation":""} {"code":"Test Wildcard With Names Cert\n [Documentation] Create WildCard certificate with additional config name\n [Setup] Setup Test\n Create Keys\n ${hostname}= Generate Random HostName\n Create Cert TestCN *.api.com\n Upload Certificates\n Configure Named Certificates ${TMPDIR}\/server.crt ${TMPDIR}\/server.key ${hostname}\n Restart MicroShift\n Add Entry To Hosts ${USHIFT_HOST} ${hostname}\n Setup Custom Kubeconfig ${hostname}\n OC Should Fail To Connect With Unknown CA\n MicroShift Is Live With Custom CA ${TMPDIR}\/ca.crt\n [Teardown] Remove Entry From Hosts ${hostname}","name":"Test Wildcard With Names Cert","imports_file_locations":"{'..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/validate-custom-certificates.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'TMPDIR': {'text': '${TMPDIR} ${EMPTY}'}}","documentation":""} {"code":"Setup\n [Documentation] Set up all of the tests in this suite\n Check Required Env Variables\n Login MicroShift Host\n Setup Kubeconfig","name":"Setup","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/validate-custom-certificates.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Check Required Env Variables"} {"code":"Setup Test\n [Documentation] Test suite setup\n ${tmp}= Create Random Temp Directory\n Set Global Variable ${TMPDIR} ${tmp}","name":"Setup Test","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/validate-custom-certificates.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'TMPDIR': {'text': '${TMPDIR} ${EMPTY}'}}","documentation":"${tmp}= Create Random Temp Directory"} {"code":"Teardown\n [Documentation] Test suite teardown\n Remove Drop In MicroShift Config 10-subjectAltNames\n Remove Kubeconfig\n Logout MicroShift Host","name":"Teardown","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/validate-custom-certificates.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Remove Drop In MicroShift Config 10-subjectAltNames"} {"code":"Create Keys\n [Documentation] Create a certificate CA\n Openssl genrsa -out ${TMPDIR}\/ca.key 2048\n Openssl genrsa -out ${TMPDIR}\/server.key 2048\n Openssl req -x509 -new -nodes -key ${TMPDIR}\/ca.key -subj \"\/CN\\=${MASTER_IP}\"\n ... -days 10000 -out ${TMPDIR}\/ca.crt","name":"Create Keys","imports_file_locations":"{'..\/..\/resources\/openssl.resource': 'test\/resources\/openssl.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/validate-custom-certificates.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'TMPDIR': {'text': '${TMPDIR} ${EMPTY}'}, 'MASTER_IP': {'text': '${MASTER_IP} 1.1.1.1'}}","documentation":"Openssl genrsa -out ${TMPDIR}\/ca.key 2048"} {"code":"Create Cert No San\n [Documentation] Create a certificate\n [Arguments] ${cert_cn}\n Set Global Variable ${CERT_CN}\n Generate CSR Config ${CSR_NOSAN_CONFIG} ${TMPDIR}\/csr.conf\n Openssl req -new -key ${TMPDIR}\/server.key -out ${TMPDIR}\/server.csr -config ${TMPDIR}\/csr.conf\n Openssl x509 -req -in ${TMPDIR}\/server.csr -CA ${TMPDIR}\/ca.crt -CAkey ${TMPDIR}\/ca.key -CAcreateserial\n ... -out ${TMPDIR}\/server.crt -days 10000 -extensions v3_ext -extfile ${TMPDIR}\/csr.conf -sha256","name":"Create Cert No San","imports_file_locations":"{'..\/..\/resources\/openssl.resource': 'test\/resources\/openssl.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/validate-custom-certificates.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'CSR_NOSAN_CONFIG': {'text': '${CSR_NOSAN_CONFIG} .\/assets\/custom-certs\/csr-no-san.conf.template'}, 'TMPDIR': {'text': '${TMPDIR} ${EMPTY}'}}","documentation":"[Arguments] ${cert_cn}"} {"code":"Create Cert\n [Documentation] Create a certificate\n [Arguments] ${cert_cn} ${cert_san_dns}=${EMPTY} ${cert_san_ip}=${EMPTY} ${expiry_days}=1000\n Set Global Variable ${CERT_CN}\n IF \"${cert_san_dns}\"!=\"${EMPTY}\"\n Set Global Variable ${CERT_SAN_DNS} DNS.1 = ${cert_san_dns}\n ELSE\n Set Global Variable ${CERT_SAN_DNS}\n END\n\n IF \"${cert_san_ip}\"!=\"${EMPTY}\"\n Set Global Variable ${CERT_SAN_IP} IP.1 = ${cert_san_ip}\n ELSE\n Set Global Variable ${CERT_SAN_IP}\n END\n Generate CSR Config ${CSR_CONFIG} ${TMPDIR}\/csr.conf\n Openssl req -new -key ${TMPDIR}\/server.key -out ${TMPDIR}\/server.csr -config ${TMPDIR}\/csr.conf\n Openssl x509 -req -in ${TMPDIR}\/server.csr -CA ${TMPDIR}\/ca.crt -CAkey ${TMPDIR}\/ca.key -CAcreateserial\n ... -out ${TMPDIR}\/server.crt -days ${expiry_days} -extensions v3_ext -extfile ${TMPDIR}\/csr.conf -sha256","name":"Create Cert","imports_file_locations":"{'..\/..\/resources\/openssl.resource': 'test\/resources\/openssl.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/validate-custom-certificates.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'CSR_CONFIG': {'text': '${CSR_CONFIG} .\/assets\/custom-certs\/csr.conf.template'}, 'TMPDIR': {'text': '${TMPDIR} ${EMPTY}'}}","documentation":"[Arguments] ${cert_cn} ${cert_san_dns}=${EMPTY} ${cert_san_ip}=${EMPTY} ${expiry_days}=1000"} {"code":"Upload Certificates\n [Documentation] Upload certificates to remote host\n Put Directory ${TMPDIR} ${TMPDIR}","name":"Upload Certificates","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/validate-custom-certificates.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'TMPDIR': {'text': '${TMPDIR} ${EMPTY}'}}","documentation":"Put Directory ${TMPDIR} ${TMPDIR}"} {"code":"Configure Named Certificates\n [Documentation] Replace namedCertificates entries in the configuration file.\n [Arguments] ${cert_path} ${key_path} ${sni}=${EMPTY}\n\n ${subject_alt_names}= CATENATE SEPARATOR=\\n\n ... apiServer:\n ... \\ \\ subjectAltNames:\n ... \\ \\ -\\ ${USHIFT_HOST}\n ... \\ \\ namedCertificates:\n ... \\ \\ - certPath:\\ ${cert_path}\n ... \\ \\ \\ \\ keyPath:\\ ${key_path}\n\n IF \"${sni}\"!=\"${EMPTY}\"\n ${subject_alt_names}= CATENATE SEPARATOR=\\n ${subject_alt_names}\n ... \\ \\ \\ \\ names:\n ... \\ \\ \\ \\ - ${sni}\n END\n Drop In MicroShift Config ${subject_alt_names} 10-subjectAltNames","name":"Configure Named Certificates","imports_file_locations":"{'..\/..\/resources\/microshift-config.resource': 'test\/resources\/microshift-config.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/validate-custom-certificates.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${cert_path} ${key_path} ${sni}=${EMPTY}"} {"code":"Generate Random HostName\n [Documentation] Generate Random Hostname\n ${rand}= Generate Random String\n ${rand}= Convert To Lower Case ${rand}\n RETURN ${rand}.api.com","name":"Generate Random HostName","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/validate-custom-certificates.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${rand}= Generate Random String"} {"code":"Add Entry To Hosts\n [Documentation] Add new entry to local \/etc\/hosts\n [Arguments] ${ip} ${host}\n ${ttt}= Set Variable ${ip}\\t${host} # RF test marker\\n\n ${result}= Run Process sudo tee -a \/etc\/hosts shell=True stdin=${ttt}\n Should Be Equal As Integers ${result.rc} 0","name":"Add Entry To Hosts","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/validate-custom-certificates.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${ip} ${host}"} {"code":"Remove Entry From Hosts\n [Documentation] Removes entry from local \/etc\/hosts\n [Arguments] ${host}\n ${result}= Run Process sudo sed -i \"\/${host} # RF test marker\/d\" \/etc\/hosts shell=True\n Should Be Equal As Integers ${result.rc} 0","name":"Remove Entry From Hosts","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/validate-custom-certificates.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${host}"} {"code":"Replace Server In Kubeconfig\n [Documentation] replace the server part of kubeconfig\n [Arguments] ${fqdn}\n ${result}= Run Process sudo sed -i \"s|server:.*|server: https:\\\/\\\/${fqdn}:6443|\" ${KUBECONFIG} shell=True\n Should Be Equal As Integers ${result.rc} 0","name":"Replace Server In Kubeconfig","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/validate-custom-certificates.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${fqdn}"} {"code":"OC Should Fail To Connect With Unknown CA\n [Documentation] Check the \/livez endpoint\n ${stdout}= Run With Kubeconfig oc get --raw='\/livez' allow_fail=True\n Should Contain ${stdout} certificate signed by unknown authority strip_spaces=True","name":"OC Should Fail To Connect With Unknown CA","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/validate-custom-certificates.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${stdout}= Run With Kubeconfig oc get --raw='\/livez' allow_fail=True"} {"code":"OC Should Fail To Connect With Expired Cert\n [Documentation] Check the \/livez endpoint\n ${stdout}= Run With Kubeconfig oc get --raw='\/livez' allow_fail=True\n Should Contain ${stdout} certificate has expired or is not yet valid strip_spaces=True","name":"OC Should Fail To Connect With Expired Cert","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/validate-custom-certificates.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${stdout}= Run With Kubeconfig oc get --raw='\/livez' allow_fail=True"} {"code":"MicroShift Is Live With Custom CA\n [Documentation] Check the \/livez endpoint with Custom CA\n [Arguments] ${ca_path}\n MicroShift Is Live --certificate-authority ${ca_path}","name":"MicroShift Is Live With Custom CA","imports_file_locations":"{'..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/standard2\/validate-custom-certificates.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${ca_path}"} {"code":"*** Settings ***\nDocumentation Tests related to a functional PVC after reboot\n\nResource ..\/..\/resources\/common.resource\nResource ..\/..\/resources\/oc.resource\nResource ..\/..\/resources\/ostree-health.resource\n\nSuite Setup Setup Suite\nSuite Teardown Teardown Suite\n\n\n*** Variables ***\n${SOURCE_POD} .\/assets\/reboot\/pod-with-pvc.yaml\n${POD_NAME_STATIC} test-pod\n${RESIZE_TO} 2Gi\n${PVC_CLAIM_NAME} test-claim\n\n\n*** Test Cases ***\nIncrease Running Pod PV Size\n [Documentation] Increase Running Pod PV size by changing the PVC spec.\n [Setup] Test Case Setup\n Oc Patch pvc\/${PVC_CLAIM_NAME} '{\"spec\":{\"resources\":{\"requests\":{\"storage\":\"${RESIZE_TO}\"}}}}'\n Named PVC Should Be Resized ${PVC_CLAIM_NAME} ${RESIZE_TO}\n [Teardown] Test Case Teardown\n\n\n*** Keywords ***\nTest Case Setup\n [Documentation] Prepare the cluster env and test pod workload.\n ${ns}= Create Unique Namespace\n Set Test Variable \\${NAMESPACE} ${ns}\n Oc Create -f ${SOURCE_POD} -n ${NAMESPACE}\n Named Pod Should Be Ready ${POD_NAME_STATIC}\n\nTest Case Teardown\n [Documentation] Clean up test suite resources\n Oc Delete -f ${SOURCE_POD} -n ${NAMESPACE}\n Remove Namespace ${NAMESPACE}\n","name":"\/tmp\/repos\/microshift\/test\/suites\/storage\/pvc-resize.robot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/storage\/pvc-resize.robot","element_type":"test","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Increase Running Pod PV Size\n [Documentation] Increase Running Pod PV size by changing the PVC spec.\n [Setup] Test Case Setup\n Oc Patch pvc\/${PVC_CLAIM_NAME} '{\"spec\":{\"resources\":{\"requests\":{\"storage\":\"${RESIZE_TO}\"}}}}'\n Named PVC Should Be Resized ${PVC_CLAIM_NAME} ${RESIZE_TO}\n [Teardown] Test Case Teardown","name":"Increase Running Pod PV Size","imports_file_locations":"{'..\/..\/resources\/oc.resource': 'test\/resources\/oc.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/storage\/pvc-resize.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'PVC_CLAIM_NAME': {'text': '${PVC_CLAIM_NAME} test-claim'}, 'RESIZE_TO': {'text': '${RESIZE_TO} 2Gi'}}","documentation":""} {"code":"Test Case Setup\n [Documentation] Prepare the cluster env and test pod workload.\n ${ns}= Create Unique Namespace\n Set Test Variable \\${NAMESPACE} ${ns}\n Oc Create -f ${SOURCE_POD} -n ${NAMESPACE}\n Named Pod Should Be Ready ${POD_NAME_STATIC}","name":"Test Case Setup","imports_file_locations":"{'..\/..\/resources\/oc.resource': 'test\/resources\/oc.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/storage\/pvc-resize.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'SOURCE_POD': {'text': '${SOURCE_POD} .\/assets\/reboot\/pod-with-pvc.yaml'}, 'POD_NAME_STATIC': {'text': '${POD_NAME_STATIC} test-pod'}}","documentation":"${ns}= Create Unique Namespace"} {"code":"Test Case Teardown\n [Documentation] Clean up test suite resources\n Oc Delete -f ${SOURCE_POD} -n ${NAMESPACE}\n Remove Namespace ${NAMESPACE}","name":"Test Case Teardown","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/storage\/pvc-resize.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'SOURCE_POD': {'text': '${SOURCE_POD} .\/assets\/reboot\/pod-with-pvc.yaml'}}","documentation":"Oc Delete -f ${SOURCE_POD} -n ${NAMESPACE}"} {"code":"*** Settings ***\nDocumentation Tests related to a functional PVC after reboot\n\nResource ..\/..\/resources\/common.resource\nResource ..\/..\/resources\/oc.resource\nResource ..\/..\/resources\/ostree-health.resource\n\nSuite Setup Setup Suite\n\nTest Tags restart slow\n\n\n*** Variables ***\n${SOURCE_POD} .\/assets\/reboot\/pod-with-pvc.yaml\n${POD_NAME_STATIC} test-pod\n\n\n*** Test Cases ***\nRebooting Healthy System Should Keep Functional PVC\n [Documentation] Run a reboot test and make sure pod with PVC remains functional.\n [Setup] Test Case Setup\n Reboot MicroShift Host\n Wait Until Greenboot Health Check Exited\n Named Pod Should Be Ready ${POD_NAME_STATIC} timeout=120s\n [Teardown] Test Case Teardown\n\n\n*** Keywords ***\nTest Case Setup\n [Documentation] Prepare the cluster env and test pod workload.\n ${ns}= Create Unique Namespace\n Set Test Variable \\${NAMESPACE} ${ns}\n Oc Create -f ${SOURCE_POD} -n ${NAMESPACE}\n Named Pod Should Be Ready ${POD_NAME_STATIC}\n\nTest Case Teardown\n [Documentation] Clean up test suite resources\n Oc Delete -f ${SOURCE_POD} -n ${NAMESPACE}\n Remove Namespace ${NAMESPACE}\n","name":"\/tmp\/repos\/microshift\/test\/suites\/storage\/reboot.robot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/storage\/reboot.robot","element_type":"test","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Rebooting Healthy System Should Keep Functional PVC\n [Documentation] Run a reboot test and make sure pod with PVC remains functional.\n [Setup] Test Case Setup\n Reboot MicroShift Host\n Wait Until Greenboot Health Check Exited\n Named Pod Should Be Ready ${POD_NAME_STATIC} timeout=120s\n [Teardown] Test Case Teardown","name":"Rebooting Healthy System Should Keep Functional PVC","imports_file_locations":"{'..\/..\/resources\/ostree-health.resource': 'test\/resources\/ostree-health.resource', '..\/..\/resources\/oc.resource': 'test\/resources\/oc.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/storage\/reboot.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'POD_NAME_STATIC': {'text': '${POD_NAME_STATIC} test-pod'}}","documentation":""} {"code":"Test Case Setup\n [Documentation] Prepare the cluster env and test pod workload.\n ${ns}= Create Unique Namespace\n Set Test Variable \\${NAMESPACE} ${ns}\n Oc Create -f ${SOURCE_POD} -n ${NAMESPACE}\n Named Pod Should Be Ready ${POD_NAME_STATIC}","name":"Test Case Setup","imports_file_locations":"{'..\/..\/resources\/oc.resource': 'test\/resources\/oc.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/storage\/reboot.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'SOURCE_POD': {'text': '${SOURCE_POD} .\/assets\/reboot\/pod-with-pvc.yaml'}, 'POD_NAME_STATIC': {'text': '${POD_NAME_STATIC} test-pod'}}","documentation":"${ns}= Create Unique Namespace"} {"code":"Test Case Teardown\n [Documentation] Clean up test suite resources\n Oc Delete -f ${SOURCE_POD} -n ${NAMESPACE}\n Remove Namespace ${NAMESPACE}","name":"Test Case Teardown","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/storage\/reboot.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'SOURCE_POD': {'text': '${SOURCE_POD} .\/assets\/reboot\/pod-with-pvc.yaml'}}","documentation":"Oc Delete -f ${SOURCE_POD} -n ${NAMESPACE}"} {"code":"*** Settings ***\nDocumentation CSI Snapshotting Tests\n\nLibrary SSHLibrary\nLibrary ..\/..\/resources\/DataFormats.py\nResource ..\/..\/resources\/microshift-process.resource\nResource ..\/..\/resources\/common.resource\nResource ..\/..\/resources\/kubeconfig.resource\nResource ..\/..\/resources\/oc.resource\nResource ..\/..\/resources\/microshift-config.resource\nResource ..\/..\/resources\/ostree-health.resource\n\nSuite Setup Test Suite Setup\nSuite Teardown Test Suite Teardown\n\n\n*** Variables ***\n${POD_NAME_STATIC} base\n${TEST_DATA} FOOBAR\n${SOURCE_KUSTOMIZE} assets\/kustomizations\/patches\/pvc-thin\n${RESTORE_KUSTOMIZE} assets\/kustomizations\/patches\/pvc-from-snapshot\n${SNAPSHOT} assets\/storage\/snapshot.yaml\n${STORAGE_CLASS} assets\/storage\/storage-class-thin.yaml\n${SNAPSHOT_CLASS} assets\/storage\/volume-snapshot-class.yaml\n\n\n*** Test Cases ***\nSnapshotter Smoke Test\n [Documentation] Write data to a volume, snapshot it, restore the snapshot and verify the data is present\n [Tags] smoke snapshot\n [Setup] Test Case Setup\n Oc Apply -f ${SNAPSHOT} -n ${NAMESPACE}\n Named VolumeSnapshot Should Be Ready my-snap\n Oc Apply -k ${RESTORE_KUSTOMIZE} -n ${NAMESPACE}\n Named Pod Should Be Ready ${POD_NAME_STATIC}\n ${data}= Read From Volume ${POD_NAME_STATIC}\n Should Be Equal As Strings ${TESTDATA} ${data}\n [Teardown] Test Case Teardown\n\n\n*** Keywords ***\nTest Suite Setup\n [Documentation] Setup test namespace, patch the lvmd for thin-volume support, and restart microshift for\n ... it to take effect\n Setup Suite\n Create Thin Storage Pool\n Save Lvmd Config\n ${config}= Extend Lvmd Config\n Upload Lvmd Config ${config}\n Oc Apply -f ${STORAGE_CLASS} -f ${SNAPSHOT_CLASS}\n Restart Microshift\n Restart Greenboot And Wait For Success\n\nTest Suite Teardown\n [Documentation] Clean up test suite resources\n Oc Delete -f ${STORAGE_CLASS} -f ${SNAPSHOT_CLASS}\n Restore Lvmd Config\n Delete Thin Storage Pool\n Restart Microshift\n Restart Greenboot And Wait For Success\n Teardown Suite\n\nTest Case Setup\n [Documentation] Prepare the cluster-level APIs and a data-volume with some simple text\n ${ns}= Create Unique Namespace\n Set Test Variable \\${NAMESPACE} ${ns}\n Oc Apply -k ${SOURCE_KUSTOMIZE} -n ${NAMESPACE}\n Named Pod Should Be Ready ${POD_NAME_STATIC}\n Write To Volume ${POD_NAME_STATIC} ${TEST_DATA}\n Oc Delete pod ${POD_NAME_STATIC} -n ${NAMESPACE}\n Named Pod Should Be Deleted ${POD_NAME_STATIC}\n\nTest Case Teardown\n [Documentation] Remove cluster-scoped test APIs\n Oc Delete pod ${POD_NAME_STATIC} -n ${NAMESPACE}\n Named Pod Should Be Deleted ${POD_NAME_STATIC}\n Oc Delete volumesnapshot my-snap -n ${NAMESPACE}\n Named VolumeSnapshot Should Be Deleted my-snap\n Oc Delete pvc test-claim-thin -n ${NAMESPACE}\n Oc Delete pvc snapshot-restore -n ${NAMESPACE}\n Named PVC Should Be Deleted test-claim-thin\n Named PVC Should Be Deleted snapshot-restore\n Remove Namespace ${NAMESPACE}\n\nWrite To Volume\n [Documentation] Write some simple text to the data volume\n [Arguments] ${to_pod} ${data}\n Oc Exec ${to_pod} echo \"${data}\" > \/vol\/data\n\nRead From Volume\n [Documentation] Read textfile from the datavolume and return as a string.\n [Arguments] ${from_pod}\n ${output}= Oc Exec ${from_pod} cat \/vol\/data\n RETURN ${output}\n","name":"\/tmp\/repos\/microshift\/test\/suites\/storage\/snapshot.robot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/storage\/snapshot.robot","element_type":"test","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Snapshotter Smoke Test\n [Documentation] Write data to a volume, snapshot it, restore the snapshot and verify the data is present\n [Tags] smoke snapshot\n [Setup] Test Case Setup\n Oc Apply -f ${SNAPSHOT} -n ${NAMESPACE}\n Named VolumeSnapshot Should Be Ready my-snap\n Oc Apply -k ${RESTORE_KUSTOMIZE} -n ${NAMESPACE}\n Named Pod Should Be Ready ${POD_NAME_STATIC}\n ${data}= Read From Volume ${POD_NAME_STATIC}\n Should Be Equal As Strings ${TESTDATA} ${data}\n [Teardown] Test Case Teardown","name":"Snapshotter Smoke Test","imports_file_locations":"{'..\/..\/resources\/oc.resource': 'test\/resources\/oc.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/storage\/snapshot.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'SNAPSHOT': {'text': '${SNAPSHOT} assets\/storage\/snapshot.yaml'}, 'RESTORE_KUSTOMIZE': {'text': '${RESTORE_KUSTOMIZE} assets\/kustomizations\/patches\/pvc-from-snapshot'}, 'POD_NAME_STATIC': {'text': '${POD_NAME_STATIC} base'}}","documentation":""} {"code":"Test Suite Setup\n [Documentation] Setup test namespace, patch the lvmd for thin-volume support, and restart microshift for\n ... it to take effect\n Setup Suite\n Create Thin Storage Pool\n Save Lvmd Config\n ${config}= Extend Lvmd Config\n Upload Lvmd Config ${config}\n Oc Apply -f ${STORAGE_CLASS} -f ${SNAPSHOT_CLASS}\n Restart Microshift\n Restart Greenboot And Wait For Success","name":"Test Suite Setup","imports_file_locations":"{'..\/..\/resources\/common.resource': 'test\/resources\/common.resource', '..\/..\/resources\/microshift-config.resource': 'test\/resources\/microshift-config.resource', '..\/..\/resources\/oc.resource': 'test\/resources\/oc.resource', '..\/..\/resources\/ostree-health.resource': 'test\/resources\/ostree-health.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/storage\/snapshot.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'STORAGE_CLASS': {'text': '${STORAGE_CLASS} assets\/storage\/storage-class-thin.yaml'}, 'SNAPSHOT_CLASS': {'text': '${SNAPSHOT_CLASS} assets\/storage\/volume-snapshot-class.yaml'}}","documentation":"it to take effect"} {"code":"Test Suite Teardown\n [Documentation] Clean up test suite resources\n Oc Delete -f ${STORAGE_CLASS} -f ${SNAPSHOT_CLASS}\n Restore Lvmd Config\n Delete Thin Storage Pool\n Restart Microshift\n Restart Greenboot And Wait For Success\n Teardown Suite","name":"Test Suite Teardown","imports_file_locations":"{'..\/..\/resources\/microshift-config.resource': 'test\/resources\/microshift-config.resource', '..\/..\/resources\/ostree-health.resource': 'test\/resources\/ostree-health.resource', '..\/..\/resources\/common.resource': 'test\/resources\/common.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/storage\/snapshot.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'STORAGE_CLASS': {'text': '${STORAGE_CLASS} assets\/storage\/storage-class-thin.yaml'}, 'SNAPSHOT_CLASS': {'text': '${SNAPSHOT_CLASS} assets\/storage\/volume-snapshot-class.yaml'}}","documentation":"Oc Delete -f ${STORAGE_CLASS} -f ${SNAPSHOT_CLASS}"} {"code":"Test Case Setup\n [Documentation] Prepare the cluster-level APIs and a data-volume with some simple text\n ${ns}= Create Unique Namespace\n Set Test Variable \\${NAMESPACE} ${ns}\n Oc Apply -k ${SOURCE_KUSTOMIZE} -n ${NAMESPACE}\n Named Pod Should Be Ready ${POD_NAME_STATIC}\n Write To Volume ${POD_NAME_STATIC} ${TEST_DATA}\n Oc Delete pod ${POD_NAME_STATIC} -n ${NAMESPACE}\n Named Pod Should Be Deleted ${POD_NAME_STATIC}","name":"Test Case Setup","imports_file_locations":"{'..\/..\/resources\/oc.resource': 'test\/resources\/oc.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/storage\/snapshot.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'SOURCE_KUSTOMIZE': {'text': '${SOURCE_KUSTOMIZE} assets\/kustomizations\/patches\/pvc-thin'}, 'POD_NAME_STATIC': {'text': '${POD_NAME_STATIC} base'}, 'TEST_DATA': {'text': '${TEST_DATA} FOOBAR'}}","documentation":"${ns}= Create Unique Namespace"} {"code":"Test Case Teardown\n [Documentation] Remove cluster-scoped test APIs\n Oc Delete pod ${POD_NAME_STATIC} -n ${NAMESPACE}\n Named Pod Should Be Deleted ${POD_NAME_STATIC}\n Oc Delete volumesnapshot my-snap -n ${NAMESPACE}\n Named VolumeSnapshot Should Be Deleted my-snap\n Oc Delete pvc test-claim-thin -n ${NAMESPACE}\n Oc Delete pvc snapshot-restore -n ${NAMESPACE}\n Named PVC Should Be Deleted test-claim-thin\n Named PVC Should Be Deleted snapshot-restore\n Remove Namespace ${NAMESPACE}","name":"Test Case Teardown","imports_file_locations":"{'..\/..\/resources\/oc.resource': 'test\/resources\/oc.resource', '..\/..\/resources\/kubeconfig.resource': 'test\/resources\/kubeconfig.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/storage\/snapshot.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'POD_NAME_STATIC': {'text': '${POD_NAME_STATIC} base'}}","documentation":"Oc Delete pod ${POD_NAME_STATIC} -n ${NAMESPACE}"} {"code":"Write To Volume\n [Documentation] Write some simple text to the data volume\n [Arguments] ${to_pod} ${data}\n Oc Exec ${to_pod} echo \"${data}\" > \/vol\/data","name":"Write To Volume","imports_file_locations":"{'..\/..\/resources\/oc.resource': 'test\/resources\/oc.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/storage\/snapshot.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${to_pod} ${data}"} {"code":"Read From Volume\n [Documentation] Read textfile from the datavolume and return as a string.\n [Arguments] ${from_pod}\n ${output}= Oc Exec ${from_pod} cat \/vol\/data\n RETURN ${output}","name":"Read From Volume","imports_file_locations":"{'..\/..\/resources\/oc.resource': 'test\/resources\/oc.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/storage\/snapshot.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${from_pod}"} {"code":"*** Settings ***\nDocumentation Storage version migration test suite.\n\nLibrary Process\nLibrary ..\/..\/resources\/DataFormats.py\nResource ..\/..\/resources\/oc.resource\nResource ..\/..\/resources\/common.resource\nResource ..\/..\/resources\/kubeconfig.resource\nResource ..\/..\/resources\/microshift-process.resource\n\nSuite Setup Setup\nSuite Teardown Teardown\n\n\n*** Variables ***\n${BETA_CRD} assets\/storage-version-migration\/crd.beta.yaml\n${STABLE_CRD} assets\/storage-version-migration\/crd.stable.yaml\n${CR_RESOURCE} assets\/storage-version-migration\/cr.yaml\n${BETA_MIGRATION_REQUEST} assets\/storage-version-migration\/migration.beta.yaml\n${STABLE_MIGRATION_REQUEST} assets\/storage-version-migration\/migration.stable.yaml\n\n\n*** Test Cases ***\nStorage Version Migration Test\n [Documentation] Verify that storage migrations get created when CRDs get updated.\n [Tags] restart slow smoke\n\n Create Beta Migration\n Wait Until Keyword Succeeds 5x 10s\n ... Validate Migration v1beta1\n\n Update Beta CRD To Stable\n\n Create Stable Migration\n Wait Until Keyword Succeeds 5x 10s\n ... Validate Migration v1\n\n\n*** Keywords ***\nSetup\n [Documentation] Create initial setup with CRD and resources\n Check Required Env Variables\n Login MicroShift Host\n Setup Kubeconfig\n\n Create Beta CRD\n # There may be a lag between creating the CRD and being able to\n # use it, so retry uploading the first copy of the resource a few\n # times.\n Wait Until Keyword Succeeds 5x 10s\n ... Create Custom Resource\n\nTeardown\n [Documentation] Delete all created resources\n Delete Migration Resources\n\nCreate Beta CRD\n [Documentation] Create beta CRD\n Run With Kubeconfig oc apply -f ${BETA_CRD}\n\nCreate Beta Migration\n [Documentation] Create beta migration request\n Run With Kubeconfig oc apply -f ${BETA_MIGRATION_REQUEST}\n\nCreate Stable Migration\n [Documentation] Create stable migration request\n Run With Kubeconfig oc apply -f ${STABLE_MIGRATION_REQUEST}\n\nCreate Custom Resource\n [Documentation] Create beta version resource\n Run With Kubeconfig oc apply -f ${CR_RESOURCE}\n\nUpdate Beta CRD To Stable\n [Documentation] Update the beta versin of CRD to stable\n Run With Kubeconfig oc apply -f ${STABLE_CRD}\n\nValidate Migration\n [Documentation] Validate that a migration resource has succeeded in migrating the CR,\n ... we should expect to see a StorageVersionMigration resource has succeeded and that the resource\n ... has the correct version updated.\n [Arguments] ${api_version}\n ${yaml_data}= Oc Get migrates.test.resource \"\" default\n ${storage_yaml_data}= Oc Get storageversionmigrations.migration.k8s.io \"\" test.resource-${api_version}\n Should Be Equal ${yaml_data.apiVersion} test.resource\/${api_version}\n Should Be Equal ${storage_yaml_data.status.conditions[0].type} Succeeded\n\nDelete Migration Resources\n [Documentation] Remove the CRD and Storage State and Version Migration resources\n ${query}= Set Variable {.items[?(@.spec.resource.group=='test.resource')].metadata.name}\n ${migration_resource_name}= Run With Kubeconfig\n ... oc get storageversionmigration -o jsonpath=\"${query}\"\n\n Run With Kubeconfig oc delete -f ${STABLE_CRD} True\n Run With Kubeconfig oc delete storageversionmigration ${migration_resource_name} True\n","name":"\/tmp\/repos\/microshift\/test\/suites\/storage\/storage-version-migration.robot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/storage\/storage-version-migration.robot","element_type":"test","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Storage Version Migration Test\n [Documentation] Verify that storage migrations get created when CRDs get updated.\n [Tags] restart slow smoke\n\n Create Beta Migration\n Wait Until Keyword Succeeds 5x 10s\n ... Validate Migration v1beta1\n\n Update Beta CRD To Stable\n\n Create Stable Migration\n Wait Until Keyword Succeeds 5x 10s\n ... Validate Migration v1","name":"Storage Version Migration Test","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/storage\/storage-version-migration.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Setup\n [Documentation] Create initial setup with CRD and resources\n Check Required Env Variables\n Login MicroShift Host\n Setup Kubeconfig\n\n Create Beta CRD\n # There may be a lag between creating the CRD and being able to\n # use it, so retry uploading the first copy of the resource a few\n # times.\n Wait Until Keyword Succeeds 5x 10s\n ... Create Custom Resource","name":"Setup","imports_file_locations":"{'..\/..\/resources\/kubeconfig.resource': 'test\/resources\/kubeconfig.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/storage\/storage-version-migration.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Check Required Env Variables"} {"code":"Teardown\n [Documentation] Delete all created resources\n Delete Migration Resources","name":"Teardown","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/storage\/storage-version-migration.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Delete Migration Resources"} {"code":"Create Beta CRD\n [Documentation] Create beta CRD\n Run With Kubeconfig oc apply -f ${BETA_CRD}","name":"Create Beta CRD","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/storage\/storage-version-migration.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'BETA_CRD': {'text': '${BETA_CRD} assets\/storage-version-migration\/crd.beta.yaml'}}","documentation":"Run With Kubeconfig oc apply -f ${BETA_CRD}"} {"code":"Create Beta Migration\n [Documentation] Create beta migration request\n Run With Kubeconfig oc apply -f ${BETA_MIGRATION_REQUEST}","name":"Create Beta Migration","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/storage\/storage-version-migration.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'BETA_MIGRATION_REQUEST': {'text': '${BETA_MIGRATION_REQUEST} assets\/storage-version-migration\/migration.beta.yaml'}}","documentation":"Run With Kubeconfig oc apply -f ${BETA_MIGRATION_REQUEST}"} {"code":"Create Stable Migration\n [Documentation] Create stable migration request\n Run With Kubeconfig oc apply -f ${STABLE_MIGRATION_REQUEST}","name":"Create Stable Migration","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/storage\/storage-version-migration.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'STABLE_MIGRATION_REQUEST': {'text': '${STABLE_MIGRATION_REQUEST} assets\/storage-version-migration\/migration.stable.yaml'}}","documentation":"Run With Kubeconfig oc apply -f ${STABLE_MIGRATION_REQUEST}"} {"code":"Create Custom Resource\n [Documentation] Create beta version resource\n Run With Kubeconfig oc apply -f ${CR_RESOURCE}","name":"Create Custom Resource","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/storage\/storage-version-migration.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'CR_RESOURCE': {'text': '${CR_RESOURCE} assets\/storage-version-migration\/cr.yaml'}}","documentation":"Run With Kubeconfig oc apply -f ${CR_RESOURCE}"} {"code":"Update Beta CRD To Stable\n [Documentation] Update the beta versin of CRD to stable\n Run With Kubeconfig oc apply -f ${STABLE_CRD}","name":"Update Beta CRD To Stable","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/storage\/storage-version-migration.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'STABLE_CRD': {'text': '${STABLE_CRD} assets\/storage-version-migration\/crd.stable.yaml'}}","documentation":"Run With Kubeconfig oc apply -f ${STABLE_CRD}"} {"code":"Validate Migration\n [Documentation] Validate that a migration resource has succeeded in migrating the CR,\n ... we should expect to see a StorageVersionMigration resource has succeeded and that the resource\n ... has the correct version updated.\n [Arguments] ${api_version}\n ${yaml_data}= Oc Get migrates.test.resource \"\" default\n ${storage_yaml_data}= Oc Get storageversionmigrations.migration.k8s.io \"\" test.resource-${api_version}\n Should Be Equal ${yaml_data.apiVersion} test.resource\/${api_version}\n Should Be Equal ${storage_yaml_data.status.conditions[0].type} Succeeded","name":"Validate Migration","imports_file_locations":"{'..\/..\/resources\/oc.resource': 'test\/resources\/oc.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/storage\/storage-version-migration.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${api_version}"} {"code":"Delete Migration Resources\n [Documentation] Remove the CRD and Storage State and Version Migration resources\n ${query}= Set Variable {.items[?(@.spec.resource.group=='test.resource')].metadata.name}\n ${migration_resource_name}= Run With Kubeconfig\n ... oc get storageversionmigration -o jsonpath=\"${query}\"\n\n Run With Kubeconfig oc delete -f ${STABLE_CRD} True\n Run With Kubeconfig oc delete storageversionmigration ${migration_resource_name} True","name":"Delete Migration Resources","imports_file_locations":"{'..\/..\/resources\/kubeconfig.resource': 'test\/resources\/kubeconfig.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/storage\/storage-version-migration.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'STABLE_CRD': {'text': '${STABLE_CRD} assets\/storage-version-migration\/crd.stable.yaml'}}","documentation":"${query}= Set Variable"} {"code":"*** Settings ***\nDocumentation Tests for verification on MicroShift's Tuned profile\n\nResource ..\/..\/resources\/microshift-host.resource\nResource ..\/..\/resources\/microshift-config.resource\nResource ..\/..\/resources\/microshift-process.resource\nResource ..\/..\/resources\/ostree-health.resource\n\nSuite Setup Setup\nSuite Teardown Teardown\n\n\n*** Test Cases ***\nChecksum Of Current Profile Should Be Persisted\n [Documentation] We expect that microshift-tuned keeps checksums of the profile and variables\n ... in a separate file.\n\n SSHLibrary.File Should Exist \/var\/lib\/microshift-tuned.yaml\n ${checksums_contents}= Command Should Work cat \/var\/lib\/microshift-tuned.yaml\n ${checksums}= DataFormats.Yaml Parse ${checksums_contents}\n Should Not Be Empty ${checksums.profile_checksum}\n Should Not Be Empty ${checksums.variables_checksum}\n\nProfile Is Already Active But Cache File Is Missing\n [Documentation] If profile is already active, but cache file is missing,\n ... we expect microshift-tuned to reactivate it, reboot, and store the hashes.\n\n Command Should Work rm -f \/var\/lib\/microshift-tuned.yaml\n Restart MicroShift-Tuned Expecting Reboot\n SSHLibrary.File Should Exist \/var\/lib\/microshift-tuned.yaml\n\nVariables Are Changed\n [Documentation] When requested profile's variable are changed,\n ... we expect microshift-tuned to reactivate the profile and reboot the host.\n\n ${old_hash}= Command Should Work cat \/var\/lib\/microshift-tuned.yaml\n Command Should Work\n ... sed -i 's\/^offline_cpu_set=.*$\/offline_cpu_set=\/' \/etc\/tuned\/microshift-baseline-variables.conf\n Restart MicroShift-Tuned Expecting Reboot\n ${new_hash}= Command Should Work cat \/var\/lib\/microshift-tuned.yaml\n Should Not Be Equal ${old_hash} ${new_hash}\n\nNo Reboot If Not Allowed\n [Documentation] If reboot_after_apply is False, then microshift-tuned should not reboot the host even if the\n ... profile changed.\n\n Command Should Work\n ... sed -i 's\/^offline_cpu_set=.*$\/offline_cpu_set=3\/' \/etc\/tuned\/microshift-baseline-variables.conf\n Command Should Work sed -i 's\/reboot_after_apply:.*\/reboot_after_apply: False\/' \/etc\/microshift\/tuned.yaml\n Restart MicroShift-Tuned Not Expecting Reboot\n\nCan Activate Any Tuned Profile\n [Documentation] Verify that microshift-tuned will activate any given tuned profile.\n\n Command Should Work sed -i 's\/profile:.*\/profile: virtual-guest\/' \/etc\/microshift\/tuned.yaml\n Restart MicroShift-Tuned Not Expecting Reboot\n ${active}= Command Should Work tuned-adm active\n Should Contain ${active} Current active profile: virtual-guest\n\nMicroShift-Tuned Requires Config To Function\n [Documentation] Verify that missing configuration will be fatal.\n Command Should Work rm -f \/etc\/microshift\/tuned.yaml\n Command Should Work systemctl restart microshift-tuned.service\n Wait Until Keyword Succeeds 1m 10s\n ... Systemctl Check Service SubState microshift-tuned.service failed\n\n\n*** Keywords ***\nSetup\n [Documentation] Setup test for the test suite\n Login MicroShift Host\n # We don't need MicroShift service when testing microshift-tuned.service\n Stop MicroShift\n Disable MicroShift\n Command Should Work\n ... cp \/etc\/tuned\/microshift-baseline-variables.conf \/etc\/tuned\/microshift-baseline-variables.conf.bak\n Command Should Work cp \/etc\/microshift\/tuned.yaml \/etc\/microshift\/tuned.yaml.bak\n\nTeardown\n [Documentation] Teardown test after the test suite\n Command Should Work\n ... mv \/etc\/tuned\/microshift-baseline-variables.conf.bak \/etc\/tuned\/microshift-baseline-variables.conf\n Command Should Work mv \/etc\/microshift\/tuned.yaml.bak \/etc\/microshift\/tuned.yaml\n Enable MicroShift\n Restart MicroShift-Tuned Expecting Reboot\n Logout MicroShift Host\n\nRestart MicroShift-Tuned Expecting Reboot\n [Documentation] TODO\n ${bootid}= Get Current Boot Id\n Command Should Work systemctl restart microshift-tuned.service\n Wait Until Keyword Succeeds 5m 15s\n ... System Should Be Rebooted ${bootid}\n\nRestart MicroShift-Tuned Not Expecting Reboot\n [Documentation] TODO\n ${bootid}= Get Current Boot Id\n Command Should Work systemctl restart microshift-tuned.service\n Wait Until Keyword Succeeds 1m 10s\n ... Systemctl Check Service SubState microshift-tuned.service dead\n ${rebooted}= Is System Rebooted ${bootid}\n Should Not Be True ${rebooted}\n","name":"\/tmp\/repos\/microshift\/test\/suites\/tuned\/microshift-tuned.robot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/tuned\/microshift-tuned.robot","element_type":"test","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Checksum Of Current Profile Should Be Persisted\n [Documentation] We expect that microshift-tuned keeps checksums of the profile and variables\n ... in a separate file.\n\n SSHLibrary.File Should Exist \/var\/lib\/microshift-tuned.yaml\n ${checksums_contents}= Command Should Work cat \/var\/lib\/microshift-tuned.yaml\n ${checksums}= DataFormats.Yaml Parse ${checksums_contents}\n Should Not Be Empty ${checksums.profile_checksum}\n Should Not Be Empty ${checksums.variables_checksum}","name":"Checksum Of Current Profile Should Be Persisted","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/tuned\/microshift-tuned.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Profile Is Already Active But Cache File Is Missing\n [Documentation] If profile is already active, but cache file is missing,\n ... we expect microshift-tuned to reactivate it, reboot, and store the hashes.\n\n Command Should Work rm -f \/var\/lib\/microshift-tuned.yaml\n Restart MicroShift-Tuned Expecting Reboot\n SSHLibrary.File Should Exist \/var\/lib\/microshift-tuned.yaml","name":"Profile Is Already Active But Cache File Is Missing","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/tuned\/microshift-tuned.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Variables Are Changed\n [Documentation] When requested profile's variable are changed,\n ... we expect microshift-tuned to reactivate the profile and reboot the host.\n\n ${old_hash}= Command Should Work cat \/var\/lib\/microshift-tuned.yaml\n Command Should Work\n ... sed -i 's\/^offline_cpu_set=.*$\/offline_cpu_set=\/' \/etc\/tuned\/microshift-baseline-variables.conf\n Restart MicroShift-Tuned Expecting Reboot\n ${new_hash}= Command Should Work cat \/var\/lib\/microshift-tuned.yaml\n Should Not Be Equal ${old_hash} ${new_hash}","name":"Variables Are Changed","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/tuned\/microshift-tuned.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"No Reboot If Not Allowed\n [Documentation] If reboot_after_apply is False, then microshift-tuned should not reboot the host even if the\n ... profile changed.\n\n Command Should Work\n ... sed -i 's\/^offline_cpu_set=.*$\/offline_cpu_set=3\/' \/etc\/tuned\/microshift-baseline-variables.conf\n Command Should Work sed -i 's\/reboot_after_apply:.*\/reboot_after_apply: False\/' \/etc\/microshift\/tuned.yaml\n Restart MicroShift-Tuned Not Expecting Reboot","name":"No Reboot If Not Allowed","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/tuned\/microshift-tuned.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Can Activate Any Tuned Profile\n [Documentation] Verify that microshift-tuned will activate any given tuned profile.\n\n Command Should Work sed -i 's\/profile:.*\/profile: virtual-guest\/' \/etc\/microshift\/tuned.yaml\n Restart MicroShift-Tuned Not Expecting Reboot\n ${active}= Command Should Work tuned-adm active\n Should Contain ${active} Current active profile: virtual-guest","name":"Can Activate Any Tuned Profile","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/tuned\/microshift-tuned.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"MicroShift-Tuned Requires Config To Function\n [Documentation] Verify that missing configuration will be fatal.\n Command Should Work rm -f \/etc\/microshift\/tuned.yaml\n Command Should Work systemctl restart microshift-tuned.service\n Wait Until Keyword Succeeds 1m 10s\n ... Systemctl Check Service SubState microshift-tuned.service failed","name":"MicroShift-Tuned Requires Config To Function","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/tuned\/microshift-tuned.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Setup\n [Documentation] Setup test for the test suite\n Login MicroShift Host\n # We don't need MicroShift service when testing microshift-tuned.service\n Stop MicroShift\n Disable MicroShift\n Command Should Work\n ... cp \/etc\/tuned\/microshift-baseline-variables.conf \/etc\/tuned\/microshift-baseline-variables.conf.bak\n Command Should Work cp \/etc\/microshift\/tuned.yaml \/etc\/microshift\/tuned.yaml.bak","name":"Setup","imports_file_locations":"{'..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource', '..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/tuned\/microshift-tuned.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Login MicroShift Host"} {"code":"Teardown\n [Documentation] Teardown test after the test suite\n Command Should Work\n ... mv \/etc\/tuned\/microshift-baseline-variables.conf.bak \/etc\/tuned\/microshift-baseline-variables.conf\n Command Should Work mv \/etc\/microshift\/tuned.yaml.bak \/etc\/microshift\/tuned.yaml\n Enable MicroShift\n Restart MicroShift-Tuned Expecting Reboot\n Logout MicroShift Host","name":"Teardown","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource', '..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/tuned\/microshift-tuned.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Command Should Work\n ... mv \/etc\/tuned\/microshift-baseline-variables.conf.bak \/etc\/tuned\/microshift-baseline-variables.conf"} {"code":"Restart MicroShift-Tuned Expecting Reboot\n [Documentation] TODO\n ${bootid}= Get Current Boot Id\n Command Should Work systemctl restart microshift-tuned.service\n Wait Until Keyword Succeeds 5m 15s\n ... System Should Be Rebooted ${bootid}","name":"Restart MicroShift-Tuned Expecting Reboot","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/tuned\/microshift-tuned.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${bootid}= Get Current Boot Id"} {"code":"Restart MicroShift-Tuned Not Expecting Reboot\n [Documentation] TODO\n ${bootid}= Get Current Boot Id\n Command Should Work systemctl restart microshift-tuned.service\n Wait Until Keyword Succeeds 1m 10s\n ... Systemctl Check Service SubState microshift-tuned.service dead\n ${rebooted}= Is System Rebooted ${bootid}\n Should Not Be True ${rebooted}","name":"Restart MicroShift-Tuned Not Expecting Reboot","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/tuned\/microshift-tuned.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${bootid}= Get Current Boot Id"} {"code":"*** Settings ***\nDocumentation Tests for verification on MicroShift's Tuned profile\n\nResource ..\/..\/resources\/microshift-host.resource\nResource ..\/..\/resources\/microshift-config.resource\nResource ..\/..\/resources\/microshift-process.resource\nResource ..\/..\/resources\/ostree-health.resource\nResource ..\/..\/resources\/ostree.resource\n\nSuite Setup Setup\nSuite Teardown Teardown\n\n\n*** Test Cases ***\nHost Should Have MicroShift-Baseline TuneD Profile Enabled\n [Documentation] Verifies that microshift-tuned.service was successful in activating the profile\n ... and rebooting the host.\n\n Kernel Arguments Should Exist nohz=on nohz_full=2,4-5 cu_nocbs=2,4-5 tuned.non_isolcpus=0000000b\n ... hugepagesz=2M hugepages=10 test1=on test2=true dummy\n CPUs Should Be 0 3\n CPUs Should Be 1 1 2 4 5 # 0 is implicitly online\n\nX86 64 Should Run RT Kernel\n [Documentation] If system under test is x86_64, assert it's running RT kernel.\n\n ${arch}= Command Should Work uname -m\n IF \"${arch}\" == \"x86_64\"\n ${kernel}= Command Should Work sudo grubby --default-kernel\n Should End With ${kernel} +rt\n END\n\nKubelet Resources Are As Expected\n [Documentation] Validates that kubelet detected right amount of online CPUs and hugepages.\n\n Wait Until Greenboot Health Check Exited\n Setup Kubeconfig\n Verify Node Resources hugepages-2Mi 20Mi\n Verify Node Resources cpu 5\n\nCreated Pod Is Guaranteed And Has Correct CPU Set\n [Documentation] Verify that Pod has guaranteed QoS and correct CPU set.\n [Setup] Setup Namespace\n\n Oc Create -n ${NAMESPACE} -f .\/assets\/tuned\/pod.yaml\n Named Pod Should Be Ready oslat\n\n ${qos_class}= Oc Get JsonPath pod ${NAMESPACE} oslat .status.qosClass\n Should Be Equal ${qos_class} Guaranteed\n\n ${cpus}= Oc Exec oslat cat \/proc\/self\/status | grep Cpus_allowed_list: | cut -f 2\n Should Be Equal ${cpus} 2,4\n\n Wait Until Oslat Completed Testing\n\nMake Sure Everything Works After Reboot\n [Documentation] Verify that after reboot MicroShift is starting and our low latency Pod is running.\n\n Reboot MicroShift Host\n Wait Until Greenboot Health Check Exited\n Named Pod Should Be Ready oslat\n\n Wait Until Oslat Completed Testing\n\n [Teardown] Remove Namespace ${NAMESPACE}\n\nReactivate Offline CPU\n [Documentation] Verify if reactivating previously offlined CPU is successful.\n [Setup] Backup MicroShift Baseline Variables\n\n Command Should Work\n ... sed -i 's\/^offline_cpu_set=.*$\/offline_cpu_set=\/' \/etc\/tuned\/microshift-baseline-variables.conf\n Command Should Work tuned-adm profile microshift-baseline\n CPUs Should Be 1 1 2 3 4 5 # 0 is implicitly online\n\n [Teardown] Restore MicroShift Baseline Variables\n\n\n*** Keywords ***\nSetup\n [Documentation] Setup test for the test suite\n Login MicroShift Host\n\nTeardown\n [Documentation] Teardown test after the test suite\n Logout MicroShift Host\n\nSetup Namespace\n [Documentation] Setup unique namespace with elevated privileges\n ${ns}= Create Unique Namespace\n Set Suite Variable \\${NAMESPACE} ${ns}\n Run With Kubeconfig oc label ns ${ns} --overwrite pod-security.kubernetes.io\/audit=privileged\n Run With Kubeconfig oc label ns ${ns} --overwrite pod-security.kubernetes.io\/enforce=privileged\n Run With Kubeconfig oc label ns ${ns} --overwrite pod-security.kubernetes.io\/warn=privileged\n\nVerify Node Resources\n [Documentation] Checks if node resources are as expected\n [Arguments] ${resource} ${expected}\n ${is}= Oc Get JsonPath node ${EMPTY} ${EMPTY} .items[0].status.capacity.${resource}\n Should Be Equal As Strings ${is} ${expected}\n\nKernel Arguments Should Exist\n [Documentation] Verify that given kernel arguments are present in the kernel's command line.\n [Arguments] @{kargs}\n FOR ${karg} IN @{kargs}\n Command Should Work grep ${karg} \/proc\/cmdline\n END\n\nCPUs Should Be\n [Documentation] Verify that given CPUs are offline\n [Arguments] ${expected} @{cpus}\n FOR ${cpu} IN @{cpus}\n ${state}= Command Should Work cat \/sys\/devices\/system\/cpu\/cpu${cpu}\/online\n Should Be Equal ${state} ${expected}\n END\n\nWait Until Oslat Completed Testing\n [Documentation] Wait until oslat container finished testing.\n Wait Until Keyword Succeeds 30s 5s\n ... Oslat Completed Testing\n\nOslat Completed Testing\n [Documentation] Check logs of oslat container looking for \"Test completed.\" message.\n ... We run oslat just to make sure it successfully runs, not for the results.\n ${logs}= Oc Logs oslat ${NAMESPACE}\n Should Contain ${logs} Test completed.\n\nBackup MicroShift Baseline Variables\n [Documentation] Backs up microshift-baseline-variables.conf\n Command Should Work\n ... cp \/etc\/tuned\/microshift-baseline-variables.conf \/etc\/tuned\/microshift-baseline-variables.conf.bak\n\nRestore MicroShift Baseline Variables\n [Documentation] Restores up microshift-baseline-variables.conf\n Command Should Work\n ... mv \/etc\/tuned\/microshift-baseline-variables.conf.bak \/etc\/tuned\/microshift-baseline-variables.conf\n","name":"\/tmp\/repos\/microshift\/test\/suites\/tuned\/profile.robot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/tuned\/profile.robot","element_type":"test","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Host Should Have MicroShift-Baseline TuneD Profile Enabled\n [Documentation] Verifies that microshift-tuned.service was successful in activating the profile\n ... and rebooting the host.\n\n Kernel Arguments Should Exist nohz=on nohz_full=2,4-5 cu_nocbs=2,4-5 tuned.non_isolcpus=0000000b\n ... hugepagesz=2M hugepages=10 test1=on test2=true dummy\n CPUs Should Be 0 3\n CPUs Should Be 1 1 2 4 5 # 0 is implicitly online","name":"Host Should Have MicroShift-Baseline TuneD Profile Enabled","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/tuned\/profile.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"X86 64 Should Run RT Kernel\n [Documentation] If system under test is x86_64, assert it's running RT kernel.\n\n ${arch}= Command Should Work uname -m\n IF \"${arch}\" == \"x86_64\"\n ${kernel}= Command Should Work sudo grubby --default-kernel\n Should End With ${kernel} +rt\n END","name":"X86 64 Should Run RT Kernel","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/tuned\/profile.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Kubelet Resources Are As Expected\n [Documentation] Validates that kubelet detected right amount of online CPUs and hugepages.\n\n Wait Until Greenboot Health Check Exited\n Setup Kubeconfig\n Verify Node Resources hugepages-2Mi 20Mi\n Verify Node Resources cpu 5","name":"Kubelet Resources Are As Expected","imports_file_locations":"{'..\/..\/resources\/ostree-health.resource': 'test\/resources\/ostree-health.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/tuned\/profile.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Created Pod Is Guaranteed And Has Correct CPU Set\n [Documentation] Verify that Pod has guaranteed QoS and correct CPU set.\n [Setup] Setup Namespace\n\n Oc Create -n ${NAMESPACE} -f .\/assets\/tuned\/pod.yaml\n Named Pod Should Be Ready oslat\n\n ${qos_class}= Oc Get JsonPath pod ${NAMESPACE} oslat .status.qosClass\n Should Be Equal ${qos_class} Guaranteed\n\n ${cpus}= Oc Exec oslat cat \/proc\/self\/status | grep Cpus_allowed_list: | cut -f 2\n Should Be Equal ${cpus} 2,4\n\n Wait Until Oslat Completed Testing","name":"Created Pod Is Guaranteed And Has Correct CPU Set","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/tuned\/profile.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Make Sure Everything Works After Reboot\n [Documentation] Verify that after reboot MicroShift is starting and our low latency Pod is running.\n\n Reboot MicroShift Host\n Wait Until Greenboot Health Check Exited\n Named Pod Should Be Ready oslat\n\n Wait Until Oslat Completed Testing\n\n [Teardown] Remove Namespace ${NAMESPACE}","name":"Make Sure Everything Works After Reboot","imports_file_locations":"{'..\/..\/resources\/ostree-health.resource': 'test\/resources\/ostree-health.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/tuned\/profile.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Reactivate Offline CPU\n [Documentation] Verify if reactivating previously offlined CPU is successful.\n [Setup] Backup MicroShift Baseline Variables\n\n Command Should Work\n ... sed -i 's\/^offline_cpu_set=.*$\/offline_cpu_set=\/' \/etc\/tuned\/microshift-baseline-variables.conf\n Command Should Work tuned-adm profile microshift-baseline\n CPUs Should Be 1 1 2 3 4 5 # 0 is implicitly online\n\n [Teardown] Restore MicroShift Baseline Variables","name":"Reactivate Offline CPU","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/tuned\/profile.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Setup\n [Documentation] Setup test for the test suite\n Login MicroShift Host","name":"Setup","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/tuned\/profile.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Login MicroShift Host"} {"code":"Teardown\n [Documentation] Teardown test after the test suite\n Logout MicroShift Host","name":"Teardown","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/tuned\/profile.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Logout MicroShift Host"} {"code":"Setup Namespace\n [Documentation] Setup unique namespace with elevated privileges\n ${ns}= Create Unique Namespace\n Set Suite Variable \\${NAMESPACE} ${ns}\n Run With Kubeconfig oc label ns ${ns} --overwrite pod-security.kubernetes.io\/audit=privileged\n Run With Kubeconfig oc label ns ${ns} --overwrite pod-security.kubernetes.io\/enforce=privileged\n Run With Kubeconfig oc label ns ${ns} --overwrite pod-security.kubernetes.io\/warn=privileged","name":"Setup Namespace","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/tuned\/profile.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${ns}= Create Unique Namespace"} {"code":"Verify Node Resources\n [Documentation] Checks if node resources are as expected\n [Arguments] ${resource} ${expected}\n ${is}= Oc Get JsonPath node ${EMPTY} ${EMPTY} .items[0].status.capacity.${resource}\n Should Be Equal As Strings ${is} ${expected}","name":"Verify Node Resources","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/tuned\/profile.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${resource} ${expected}"} {"code":"Kernel Arguments Should Exist\n [Documentation] Verify that given kernel arguments are present in the kernel's command line.\n [Arguments] @{kargs}\n FOR ${karg} IN @{kargs}\n Command Should Work grep ${karg} \/proc\/cmdline\n END","name":"Kernel Arguments Should Exist","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/tuned\/profile.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] @{kargs}"} {"code":"CPUs Should Be\n [Documentation] Verify that given CPUs are offline\n [Arguments] ${expected} @{cpus}\n FOR ${cpu} IN @{cpus}\n ${state}= Command Should Work cat \/sys\/devices\/system\/cpu\/cpu${cpu}\/online\n Should Be Equal ${state} ${expected}\n END","name":"CPUs Should Be","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/tuned\/profile.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${expected} @{cpus}"} {"code":"Wait Until Oslat Completed Testing\n [Documentation] Wait until oslat container finished testing.\n Wait Until Keyword Succeeds 30s 5s\n ... Oslat Completed Testing","name":"Wait Until Oslat Completed Testing","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/tuned\/profile.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Wait Until Keyword Succeeds 30s 5s\n ... Oslat Completed Testing"} {"code":"Oslat Completed Testing\n [Documentation] Check logs of oslat container looking for \"Test completed.\" message.\n ... We run oslat just to make sure it successfully runs, not for the results.\n ${logs}= Oc Logs oslat ${NAMESPACE}\n Should Contain ${logs} Test completed.","name":"Oslat Completed Testing","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/tuned\/profile.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"We run oslat just to make sure it successfully runs, not for the results."} {"code":"Backup MicroShift Baseline Variables\n [Documentation] Backs up microshift-baseline-variables.conf\n Command Should Work\n ... cp \/etc\/tuned\/microshift-baseline-variables.conf \/etc\/tuned\/microshift-baseline-variables.conf.bak","name":"Backup MicroShift Baseline Variables","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/tuned\/profile.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Command Should Work\n ... cp \/etc\/tuned\/microshift-baseline-variables.conf \/etc\/tuned\/microshift-baseline-variables.conf.bak"} {"code":"Restore MicroShift Baseline Variables\n [Documentation] Restores up microshift-baseline-variables.conf\n Command Should Work\n ... mv \/etc\/tuned\/microshift-baseline-variables.conf.bak \/etc\/tuned\/microshift-baseline-variables.conf","name":"Restore MicroShift Baseline Variables","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/tuned\/profile.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Command Should Work\n ... mv \/etc\/tuned\/microshift-baseline-variables.conf.bak \/etc\/tuned\/microshift-baseline-variables.conf"} {"code":"*** Settings ***\nDocumentation Tests for Workload partitioning\n\nResource ..\/..\/resources\/microshift-config.resource\nResource ..\/..\/resources\/common.resource\nResource ..\/..\/resources\/systemd.resource\nResource ..\/..\/resources\/microshift-process.resource\nResource ..\/..\/resources\/microshift-network.resource\nResource ..\/..\/resources\/ostree-health.resource\n\nSuite Setup Setup Suite And Wait For Greenboot\nSuite Teardown Teardown Suite\n\n\n*** Variables ***\n${MANAGEMENT_CPU} 0\n${SYSTEMD_CRIO_DROPIN} \/etc\/systemd\/system\/crio.service.d\/microshift-cpuaffinity.conf\n${SYSTEMD_MICROSHIFT_DROPIN} \/etc\/systemd\/system\/microshift.service.d\/microshift-cpuaffinity.conf\n${SYSTEMD_OVS_DROPIN} \/etc\/systemd\/system\/ovs-vswitchd.service.d\/microshift-cpuaffinity.conf\n${SYSTEMD_OVSDB_DROPIN} \/etc\/systemd\/system\/ovsdb-server.service.d\/microshift-cpuaffinity.conf\n${CRIO_CONFIG_DROPIN} \/etc\/crio\/crio.conf.d\/20-microshift-wp.conf\n${KUBELET_CPU_STATE_FILE} \/var\/lib\/kubelet\/cpu_manager_state\n${KUBELET_WORKLOAD_PINNING_CONFIG} \/etc\/kubernetes\/openshift-workload-pinning\n\n\n*** Test Cases ***\nControl Plane Pods Must Be Annotated\n [Documentation] Verify that all the Control Plane pods are properly annotated.\n All Pods Should Be Annotated As Management\n\nWorkload Partitioning Should Work\n [Documentation] Verify that all the Control Plane pods are properly annotated.\n [Setup] Setup For Workload Partitioning\n Microshift Services Should Be Running On Reserved CPU ${MANAGEMENT_CPU}\n All Pods Should Run On Reserved CPU ${MANAGEMENT_CPU}\n Create Hello MicroShift Pod\n All Pods Should Run On Reserved CPU ${MANAGEMENT_CPU} true\n [Teardown] Teardown For Workload Partitioning\n\n\n*** Keywords ***\nSetup For Workload Partitioning\n [Documentation] Setup for Workload Partitioning\n Configure Kubelet For Workload Partitioning ${MANAGEMENT_CPU}\n Configure CRIO For Workload Partitioning ${MANAGEMENT_CPU}\n Configure CPUAffinity In Systemd ${MANAGEMENT_CPU} ${SYSTEMD_CRIO_DROPIN}\n Configure CPUAffinity In Systemd ${MANAGEMENT_CPU} ${SYSTEMD_MICROSHIFT_DROPIN}\n Configure CPUAffinity In Systemd ${MANAGEMENT_CPU} ${SYSTEMD_OVS_DROPIN}\n Configure CPUAffinity In Systemd ${MANAGEMENT_CPU} ${SYSTEMD_OVSDB_DROPIN}\n Systemctl Daemon Reload\n Systemctl restart crio.service\n Cleanup And Create NS\n\nTeardown For Workload Partitioning\n [Documentation] Setup for Workload Partitioning\n Run Keyword And Ignore Error\n ... SSHLibrary.Get File ${DEBUG_OUTPUT_FILE} ${OUTPUTDIR}\/pod-crio-inspect-output.json\n Cleanup MicroShift --all --keep-images\n Remove Files ${KUBELET_CPU_STATE_FILE}\n ... ${SYSTEMD_CRIO_DROPIN}\n ... ${SYSTEMD_MICROSHIFT_DROPIN}\n ... ${CRIO_CONFIG_DROPIN}\n Systemctl Daemon Reload\n Remove Drop In MicroShift Config 10-kubelet\n Systemctl restart crio.service\n Restart MicroShift\n\nConfigure Kubelet For Workload Partitioning\n [Documentation] configure microshift with kubelet CPU configuration\n [Arguments] ${cpus}\n\n ${kubelet_config}= CATENATE SEPARATOR=\\n\n ... ---\n ... kubelet:\n ... \\ \\ reservedSystemCPUs: \"${cpus}\"\n ... \\ \\ cpuManagerPolicy: static\n ... \\ \\ cpuManagerPolicyOptions:\n ... \\ \\ \\ \\ full-pcpus-only: \"true\"\n ... \\ \\ cpuManagerReconcilePeriod: 5s\n\n Drop In MicroShift Config ${kubelet_config} 10-kubelet\n\n ${kubelet_pinning_config}= CATENATE SEPARATOR=\\n\n ... {\n ... \\ \\ \"management\": {\n ... \\ \\ \\ \\ \"cpuset\": \"${cpus}\"\n ... \\ \\ }\n ... }\n\n Upload String To File ${kubelet_pinning_config} ${KUBELET_WORKLOAD_PINNING_CONFIG}\n\nConfigure CRIO For Workload Partitioning\n [Documentation] add crio Dropin configuration\n [Arguments] ${cpus}\n ${crio_configuration}= CATENATE SEPARATOR=\\n\n ... [crio.runtime]\n ... infra_ctr_cpuset = \"${cpus}\"\n ... [crio.runtime.workloads.management]\n ... activation_annotation = \"target.workload.openshift.io\/management\"\n ... annotation_prefix = \"resources.workload.openshift.io\"\n ... resources = { \"cpushares\" = 0, \"cpuset\" = \"${cpus}\" }\n\n Upload String To File ${crio_configuration} ${CRIO_CONFIG_DROPIN}\n\nConfigure CPUAffinity In Systemd\n [Documentation] add CPUAffinity in systemd unit dropin\n [Arguments] ${cpus} ${target_file}\n Create Remote Dir For Path ${target_file}\n ${systemd_cpu_affinity}= CATENATE SEPARATOR=\\n\n ... [Service]\n ... CPUAffinity=${cpus}\n Upload String To File ${systemd_cpu_affinity} ${target_file}\n\nAll Pods Should Run On Reserved CPU\n [Documentation] Verify all the PODs runs on explicit reserved CPU\n [Arguments] ${configured_cpus} ${is_workloads}=${EMPTY}\n ${crio_json}= Get Json From Crio Output ${is_workloads}\n\n ${json_status}= Json Parse ${crio_json}\n FOR ${pod} IN @{json_status}\n ${pod_id} ${pod_pid} ${pod_cpuset} ${pod_info}= Construct Pod Info ${pod}\n\n IF \"${is_workloads}\"==\"${EMPTY}\"\n IF ${pod_cpuset} != ${configured_cpus}\n Crio Save Pod Manifest ${pod_id}\n Fail\n ... Management ${pod_info} running on CPU ${pod_cpuset} instead of ${configured_cpus}\n END\n Proccess Should Be Running On Host CPU ${pod_pid} ${configured_cpus}\n ELSE IF \"${pod_cpuset}\" == \"${configured_cpus}\"\n Crio Save Pod Manifest ${pod_id}\n Fail\n ... Workload ${pod_info} running on CPU ${pod_cpuset} instead of ${configured_cpus}\n END\n END\n\nConstruct Pod Info\n [Documentation] json\n [Arguments] ${pod_json}\n ${pod_cpuset}= Evaluate \"${pod_json}[info][runtimeSpec][linux][resources][cpu][cpus]\"\n ${pod_name}= Evaluate \"${pod_json}[status][metadata][name]\"\n ${container_name}= Evaluate \"${pod_json}[info][runtimeSpec][annotations][io.kubernetes.pod.name]\"\n ${pod_pid}= Evaluate \"${pod_json}[info][pid]\"\n ${pod_id}= Evaluate \"${pod_json}[status][id]\"\n ${namespace}= Evaluate \"${pod_json}[info][runtimeSpec][annotations][io.kubernetes.pod.namespace]\"\n ${pod_info}= Catenate SEPARATOR=\n ... container: ${container_name}\n ... ${EMPTY} pod: ${pod_name}\n ... ${EMPTY} pid: ${pod_pid}\n ... ${EMPTY} namespace: ${namespace}\n RETURN ${pod_id} ${pod_pid} ${pod_cpuset} ${pod_info}\n\nGet Json From Crio Output\n [Documentation] get json from the crio command\n [Arguments] ${is_workloads}\n Set Global Variable ${NOT_WORKLOADS} ${EMPTY}\n IF \"${is_workloads}\"!=\"${EMPTY}\"\n Set Global Variable ${NOT_WORKLOADS} | not\n END\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... crictl ps -q | xargs sudo crictl inspect | jq -rs '[.[][] | select(.info.runtimeSpec.annotations[\"target.workload.openshift.io\/management\"] ${NOT_WORKLOADS})]'\n ... sudo=True\n ... return_stdout=True\n ... return_stderr=True\n ... return_rc=True\n Should Be Equal As Integers ${rc} 0\n RETURN ${stdout}\n\nCrio Save Pod Manifest\n [Documentation] Saves running pod manifest using crio inspect\n [Arguments] ${pod_id}\n ${path}= Create Random Temp File\n Set Global Variable ${DEBUG_OUTPUT_FILE} ${path}\n ${stdout} ${stderr} ${rc}= Execute Command\n ... crictl ps -q | xargs sudo crictl inspect | jq -rs '[.[][] | select(.status.id==\"${pod_id}\")]' >${DEBUG_OUTPUT_FILE} 2>&1\n ... sudo=True\n ... return_stdout=True\n ... return_stderr=True\n ... return_rc=True\n\nMicroshift Services Should Be Running On Reserved CPU\n [Documentation] Verify all the Microshift Services runs on explicit reserved CPU\n [Arguments] ${cpus}\n ${pid}= MicroShift Process ID\n Proccess Should Be Running On Host CPU ${pid} ${cpus}\n\n ${pid}= Crio Process ID\n Proccess Should Be Running On Host CPU ${pid} ${cpus}\n\n ${pid}= MicroShift Etcd Process ID\n Proccess Should Be Running On Host CPU ${pid} ${cpus}\n\nProccess Should Be Running On Host CPU\n [Documentation] Verify all the PODs runs on explicit reserved CPU\n [Arguments] ${pid} ${cpus}\n ${stdout} ${stderr} ${rc}= Execute Command\n ... taskset -cp ${pid} | awk '{print $6}'\n ... sudo=True return_stdout=True return_stderr=True return_rc=True\n Should Be Equal As Integers ${rc} 0\n Should Be Equal As Strings ${stdout} ${cpus}\n\nAll Pods Should Be Annotated As Management\n [Documentation] Obtains list of Deployments created by CSV.\n ${pods_raw}= Oc Get All Pods\n @{pods}= Split String ${pods_raw}\n FOR ${pod} IN @{pods}\n ${ns} ${pod}= Split String ${pod} \\@\n Pod Must Be Annotated ${ns} ${pod}\n END\n\nPod Must Be Annotated\n [Documentation] Check management annotation for specified pod and namespace.\n [Arguments] ${ns} ${pod}\n ${management_annotation}= Oc Get JsonPath\n ... pod\n ... ${ns}\n ... ${pod}\n ... .metadata.annotations.target\\\\.workload\\\\.openshift\\\\.io\/management\n Should Not Be Empty ${management_annotation}\n\nOc Get All Pods\n [Documentation] Returns the running pods across all namespaces,\n ... Returns the command output as formatted string @\n\n ${data}= Oc Get JsonPath\n ... pods\n ... ${EMPTY}\n ... ${EMPTY}\n ... range .items[*]}{\\.metadata\\.namespace}{\"@\"}{\\.metadata\\.name}{\"\\\\n\"}{end\n RETURN ${data}\n\nCrio Process ID\n [Documentation] Return the current crio process ID\n ${stdout} ${stderr} ${rc}= Execute Command\n ... pidof crio\n ... return_stdout=True return_stderr=True return_rc=True\n Log ${stderr}\n RETURN ${stdout}\n\nRemove Files\n [Documentation] removes files from the microshit host\n [Arguments] @{files}\n Log ${files}\n ${files_path}= Catenate SEPARATOR=${SPACE} @{files}\n ${stdout} ${stderr} ${rc}= Execute Command\n ... rm -f ${files_path}\n ... sudo=True return_stdout=True return_stderr=True return_rc=True\n Should Be Equal As Integers ${rc} 0\n\nCleanup And Create NS\n [Documentation] cleanup microshift and recreate the namespace for workloads\n Cleanup MicroShift --all --keep-images\n Remove Files ${KUBELET_CPU_STATE_FILE}\n Restart MicroShift\n ${ns}= Create Unique Namespace\n Set Suite Variable \\${NAMESPACE} ${ns}\n\nSetup Suite And Wait For Greenboot\n [Documentation] Run setup suit and wait for greenboot to become ready\n Setup Suite\n Restart Greenboot And Wait For Success\n","name":"\/tmp\/repos\/microshift\/test\/suites\/tuned\/workload-partitioning.robot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/tuned\/workload-partitioning.robot","element_type":"test","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Control Plane Pods Must Be Annotated\n [Documentation] Verify that all the Control Plane pods are properly annotated.\n All Pods Should Be Annotated As Management","name":"Control Plane Pods Must Be Annotated","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/tuned\/workload-partitioning.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":""} {"code":"Workload Partitioning Should Work\n [Documentation] Verify that all the Control Plane pods are properly annotated.\n [Setup] Setup For Workload Partitioning\n Microshift Services Should Be Running On Reserved CPU ${MANAGEMENT_CPU}\n All Pods Should Run On Reserved CPU ${MANAGEMENT_CPU}\n Create Hello MicroShift Pod\n All Pods Should Run On Reserved CPU ${MANAGEMENT_CPU} true\n [Teardown] Teardown For Workload Partitioning","name":"Workload Partitioning Should Work","imports_file_locations":"{'..\/..\/resources\/microshift-network.resource': 'test\/resources\/microshift-network.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/tuned\/workload-partitioning.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'MANAGEMENT_CPU': {'text': '${MANAGEMENT_CPU} 0'}}","documentation":""} {"code":"Setup For Workload Partitioning\n [Documentation] Setup for Workload Partitioning\n Configure Kubelet For Workload Partitioning ${MANAGEMENT_CPU}\n Configure CRIO For Workload Partitioning ${MANAGEMENT_CPU}\n Configure CPUAffinity In Systemd ${MANAGEMENT_CPU} ${SYSTEMD_CRIO_DROPIN}\n Configure CPUAffinity In Systemd ${MANAGEMENT_CPU} ${SYSTEMD_MICROSHIFT_DROPIN}\n Configure CPUAffinity In Systemd ${MANAGEMENT_CPU} ${SYSTEMD_OVS_DROPIN}\n Configure CPUAffinity In Systemd ${MANAGEMENT_CPU} ${SYSTEMD_OVSDB_DROPIN}\n Systemctl Daemon Reload\n Systemctl restart crio.service\n Cleanup And Create NS","name":"Setup For Workload Partitioning","imports_file_locations":"{'..\/..\/resources\/systemd.resource': 'test\/resources\/systemd.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/tuned\/workload-partitioning.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'MANAGEMENT_CPU': {'text': '${MANAGEMENT_CPU} 0'}, 'SYSTEMD_CRIO_DROPIN': {'text': '${SYSTEMD_CRIO_DROPIN} \/etc\/systemd\/system\/crio.service.d\/microshift-cpuaffinity.conf'}, 'SYSTEMD_MICROSHIFT_DROPIN': {'text': '${SYSTEMD_MICROSHIFT_DROPIN} \/etc\/systemd\/system\/microshift.service.d\/microshift-cpuaffinity.conf'}, 'SYSTEMD_OVS_DROPIN': {'text': '${SYSTEMD_OVS_DROPIN} \/etc\/systemd\/system\/ovs-vswitchd.service.d\/microshift-cpuaffinity.conf'}, 'SYSTEMD_OVSDB_DROPIN': {'text': '${SYSTEMD_OVSDB_DROPIN} \/etc\/systemd\/system\/ovsdb-server.service.d\/microshift-cpuaffinity.conf'}}","documentation":"Configure Kubelet For Workload Partitioning ${MANAGEMENT_CPU}"} {"code":"Teardown For Workload Partitioning\n [Documentation] Setup for Workload Partitioning\n Run Keyword And Ignore Error\n ... SSHLibrary.Get File ${DEBUG_OUTPUT_FILE} ${OUTPUTDIR}\/pod-crio-inspect-output.json\n Cleanup MicroShift --all --keep-images\n Remove Files ${KUBELET_CPU_STATE_FILE}\n ... ${SYSTEMD_CRIO_DROPIN}\n ... ${SYSTEMD_MICROSHIFT_DROPIN}\n ... ${CRIO_CONFIG_DROPIN}\n Systemctl Daemon Reload\n Remove Drop In MicroShift Config 10-kubelet\n Systemctl restart crio.service\n Restart MicroShift","name":"Teardown For Workload Partitioning","imports_file_locations":"{'..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource', '..\/..\/resources\/systemd.resource': 'test\/resources\/systemd.resource', '..\/..\/resources\/microshift-config.resource': 'test\/resources\/microshift-config.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/tuned\/workload-partitioning.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'KUBELET_CPU_STATE_FILE': {'text': '${KUBELET_CPU_STATE_FILE} \/var\/lib\/kubelet\/cpu_manager_state'}, 'SYSTEMD_CRIO_DROPIN': {'text': '${SYSTEMD_CRIO_DROPIN} \/etc\/systemd\/system\/crio.service.d\/microshift-cpuaffinity.conf'}, 'SYSTEMD_MICROSHIFT_DROPIN': {'text': '${SYSTEMD_MICROSHIFT_DROPIN} \/etc\/systemd\/system\/microshift.service.d\/microshift-cpuaffinity.conf'}, 'CRIO_CONFIG_DROPIN': {'text': '${CRIO_CONFIG_DROPIN} \/etc\/crio\/crio.conf.d\/20-microshift-wp.conf'}}","documentation":"Run Keyword And Ignore Error\n ... SSHLibrary.Get File ${DEBUG_OUTPUT_FILE} ${OUTPUTDIR}\/pod-crio-inspect-output.json"} {"code":"Configure Kubelet For Workload Partitioning\n [Documentation] configure microshift with kubelet CPU configuration\n [Arguments] ${cpus}\n\n ${kubelet_config}= CATENATE SEPARATOR=\\n\n ... ---\n ... kubelet:\n ... \\ \\ reservedSystemCPUs: \"${cpus}\"\n ... \\ \\ cpuManagerPolicy: static\n ... \\ \\ cpuManagerPolicyOptions:\n ... \\ \\ \\ \\ full-pcpus-only: \"true\"\n ... \\ \\ cpuManagerReconcilePeriod: 5s\n\n Drop In MicroShift Config ${kubelet_config} 10-kubelet\n\n ${kubelet_pinning_config}= CATENATE SEPARATOR=\\n\n ... {\n ... \\ \\ \"management\": {\n ... \\ \\ \\ \\ \"cpuset\": \"${cpus}\"\n ... \\ \\ }\n ... }\n\n Upload String To File ${kubelet_pinning_config} ${KUBELET_WORKLOAD_PINNING_CONFIG}","name":"Configure Kubelet For Workload Partitioning","imports_file_locations":"{'..\/..\/resources\/microshift-config.resource': 'test\/resources\/microshift-config.resource', '..\/..\/resources\/common.resource': 'test\/resources\/common.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/tuned\/workload-partitioning.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'KUBELET_WORKLOAD_PINNING_CONFIG': {'text': '${KUBELET_WORKLOAD_PINNING_CONFIG} \/etc\/kubernetes\/openshift-workload-pinning'}}","documentation":"[Arguments] ${cpus}"} {"code":"Configure CRIO For Workload Partitioning\n [Documentation] add crio Dropin configuration\n [Arguments] ${cpus}\n ${crio_configuration}= CATENATE SEPARATOR=\\n\n ... [crio.runtime]\n ... infra_ctr_cpuset = \"${cpus}\"\n ... [crio.runtime.workloads.management]\n ... activation_annotation = \"target.workload.openshift.io\/management\"\n ... annotation_prefix = \"resources.workload.openshift.io\"\n ... resources = { \"cpushares\" = 0, \"cpuset\" = \"${cpus}\" }\n\n Upload String To File ${crio_configuration} ${CRIO_CONFIG_DROPIN}","name":"Configure CRIO For Workload Partitioning","imports_file_locations":"{'..\/..\/resources\/common.resource': 'test\/resources\/common.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/tuned\/workload-partitioning.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'CRIO_CONFIG_DROPIN': {'text': '${CRIO_CONFIG_DROPIN} \/etc\/crio\/crio.conf.d\/20-microshift-wp.conf'}}","documentation":"[Arguments] ${cpus}"} {"code":"Configure CPUAffinity In Systemd\n [Documentation] add CPUAffinity in systemd unit dropin\n [Arguments] ${cpus} ${target_file}\n Create Remote Dir For Path ${target_file}\n ${systemd_cpu_affinity}= CATENATE SEPARATOR=\\n\n ... [Service]\n ... CPUAffinity=${cpus}\n Upload String To File ${systemd_cpu_affinity} ${target_file}","name":"Configure CPUAffinity In Systemd","imports_file_locations":"{'..\/..\/resources\/common.resource': 'test\/resources\/common.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/tuned\/workload-partitioning.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${cpus} ${target_file}"} {"code":"All Pods Should Run On Reserved CPU\n [Documentation] Verify all the PODs runs on explicit reserved CPU\n [Arguments] ${configured_cpus} ${is_workloads}=${EMPTY}\n ${crio_json}= Get Json From Crio Output ${is_workloads}\n\n ${json_status}= Json Parse ${crio_json}\n FOR ${pod} IN @{json_status}\n ${pod_id} ${pod_pid} ${pod_cpuset} ${pod_info}= Construct Pod Info ${pod}\n\n IF \"${is_workloads}\"==\"${EMPTY}\"\n IF ${pod_cpuset} != ${configured_cpus}\n Crio Save Pod Manifest ${pod_id}\n Fail\n ... Management ${pod_info} running on CPU ${pod_cpuset} instead of ${configured_cpus}\n END\n Proccess Should Be Running On Host CPU ${pod_pid} ${configured_cpus}\n ELSE IF \"${pod_cpuset}\" == \"${configured_cpus}\"\n Crio Save Pod Manifest ${pod_id}\n Fail\n ... Workload ${pod_info} running on CPU ${pod_cpuset} instead of ${configured_cpus}\n END\n END","name":"All Pods Should Run On Reserved CPU","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/tuned\/workload-partitioning.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${configured_cpus} ${is_workloads}=${EMPTY}"} {"code":"Construct Pod Info\n [Documentation] json\n [Arguments] ${pod_json}\n ${pod_cpuset}= Evaluate \"${pod_json}[info][runtimeSpec][linux][resources][cpu][cpus]\"\n ${pod_name}= Evaluate \"${pod_json}[status][metadata][name]\"\n ${container_name}= Evaluate \"${pod_json}[info][runtimeSpec][annotations][io.kubernetes.pod.name]\"\n ${pod_pid}= Evaluate \"${pod_json}[info][pid]\"\n ${pod_id}= Evaluate \"${pod_json}[status][id]\"\n ${namespace}= Evaluate \"${pod_json}[info][runtimeSpec][annotations][io.kubernetes.pod.namespace]\"\n ${pod_info}= Catenate SEPARATOR=\n ... container: ${container_name}\n ... ${EMPTY} pod: ${pod_name}\n ... ${EMPTY} pid: ${pod_pid}\n ... ${EMPTY} namespace: ${namespace}\n RETURN ${pod_id} ${pod_pid} ${pod_cpuset} ${pod_info}","name":"Construct Pod Info","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/tuned\/workload-partitioning.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${pod_json}"} {"code":"Get Json From Crio Output\n [Documentation] get json from the crio command\n [Arguments] ${is_workloads}\n Set Global Variable ${NOT_WORKLOADS} ${EMPTY}\n IF \"${is_workloads}\"!=\"${EMPTY}\"\n Set Global Variable ${NOT_WORKLOADS} | not\n END\n\n ${stdout} ${stderr} ${rc}= Execute Command\n ... crictl ps -q | xargs sudo crictl inspect | jq -rs '[.[][] | select(.info.runtimeSpec.annotations[\"target.workload.openshift.io\/management\"] ${NOT_WORKLOADS})]'\n ... sudo=True\n ... return_stdout=True\n ... return_stderr=True\n ... return_rc=True\n Should Be Equal As Integers ${rc} 0\n RETURN ${stdout}","name":"Get Json From Crio Output","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/tuned\/workload-partitioning.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${is_workloads}"} {"code":"Crio Save Pod Manifest\n [Documentation] Saves running pod manifest using crio inspect\n [Arguments] ${pod_id}\n ${path}= Create Random Temp File\n Set Global Variable ${DEBUG_OUTPUT_FILE} ${path}\n ${stdout} ${stderr} ${rc}= Execute Command\n ... crictl ps -q | xargs sudo crictl inspect | jq -rs '[.[][] | select(.status.id==\"${pod_id}\")]' >${DEBUG_OUTPUT_FILE} 2>&1\n ... sudo=True\n ... return_stdout=True\n ... return_stderr=True\n ... return_rc=True","name":"Crio Save Pod Manifest","imports_file_locations":"{'..\/..\/resources\/common.resource': 'test\/resources\/common.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/tuned\/workload-partitioning.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${pod_id}"} {"code":"Microshift Services Should Be Running On Reserved CPU\n [Documentation] Verify all the Microshift Services runs on explicit reserved CPU\n [Arguments] ${cpus}\n ${pid}= MicroShift Process ID\n Proccess Should Be Running On Host CPU ${pid} ${cpus}\n\n ${pid}= Crio Process ID\n Proccess Should Be Running On Host CPU ${pid} ${cpus}\n\n ${pid}= MicroShift Etcd Process ID\n Proccess Should Be Running On Host CPU ${pid} ${cpus}","name":"Microshift Services Should Be Running On Reserved CPU","imports_file_locations":"{'..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/tuned\/workload-partitioning.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${cpus}"} {"code":"Proccess Should Be Running On Host CPU\n [Documentation] Verify all the PODs runs on explicit reserved CPU\n [Arguments] ${pid} ${cpus}\n ${stdout} ${stderr} ${rc}= Execute Command\n ... taskset -cp ${pid} | awk '{print $6}'\n ... sudo=True return_stdout=True return_stderr=True return_rc=True\n Should Be Equal As Integers ${rc} 0\n Should Be Equal As Strings ${stdout} ${cpus}","name":"Proccess Should Be Running On Host CPU","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/tuned\/workload-partitioning.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${pid} ${cpus}"} {"code":"All Pods Should Be Annotated As Management\n [Documentation] Obtains list of Deployments created by CSV.\n ${pods_raw}= Oc Get All Pods\n @{pods}= Split String ${pods_raw}\n FOR ${pod} IN @{pods}\n ${ns} ${pod}= Split String ${pod} \\@\n Pod Must Be Annotated ${ns} ${pod}\n END","name":"All Pods Should Be Annotated As Management","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/tuned\/workload-partitioning.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${pods_raw}= Oc Get All Pods"} {"code":"Pod Must Be Annotated\n [Documentation] Check management annotation for specified pod and namespace.\n [Arguments] ${ns} ${pod}\n ${management_annotation}= Oc Get JsonPath\n ... pod\n ... ${ns}\n ... ${pod}\n ... .metadata.annotations.target\\\\.workload\\\\.openshift\\\\.io\/management\n Should Not Be Empty ${management_annotation}","name":"Pod Must Be Annotated","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/tuned\/workload-partitioning.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${ns} ${pod}"} {"code":"Oc Get All Pods\n [Documentation] Returns the running pods across all namespaces,\n ... Returns the command output as formatted string @\n\n ${data}= Oc Get JsonPath\n ... pods\n ... ${EMPTY}\n ... ${EMPTY}\n ... range .items[*]}{\\.metadata\\.namespace}{\"@\"}{\\.metadata\\.name}{\"\\\\n\"}{end\n RETURN ${data}","name":"Oc Get All Pods","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/tuned\/workload-partitioning.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Returns the command output as formatted string @"} {"code":"Crio Process ID\n [Documentation] Return the current crio process ID\n ${stdout} ${stderr} ${rc}= Execute Command\n ... pidof crio\n ... return_stdout=True return_stderr=True return_rc=True\n Log ${stderr}\n RETURN ${stdout}","name":"Crio Process ID","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/tuned\/workload-partitioning.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"${stdout} ${stderr} ${rc}= Execute Command\n ... pidof crio\n ... return_stdout=True return_stderr=True return_rc=True"} {"code":"Remove Files\n [Documentation] removes files from the microshit host\n [Arguments] @{files}\n Log ${files}\n ${files_path}= Catenate SEPARATOR=${SPACE} @{files}\n ${stdout} ${stderr} ${rc}= Execute Command\n ... rm -f ${files_path}\n ... sudo=True return_stdout=True return_stderr=True return_rc=True\n Should Be Equal As Integers ${rc} 0","name":"Remove Files","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/tuned\/workload-partitioning.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] @{files}"} {"code":"Cleanup And Create NS\n [Documentation] cleanup microshift and recreate the namespace for workloads\n Cleanup MicroShift --all --keep-images\n Remove Files ${KUBELET_CPU_STATE_FILE}\n Restart MicroShift\n ${ns}= Create Unique Namespace\n Set Suite Variable \\${NAMESPACE} ${ns}","name":"Cleanup And Create NS","imports_file_locations":"{'..\/..\/resources\/microshift-process.resource': 'test\/resources\/microshift-process.resource', '..\/..\/resources\/common.resource': 'test\/resources\/common.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/tuned\/workload-partitioning.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'KUBELET_CPU_STATE_FILE': {'text': '${KUBELET_CPU_STATE_FILE} \/var\/lib\/kubelet\/cpu_manager_state'}}","documentation":"Cleanup MicroShift --all --keep-images"} {"code":"Setup Suite And Wait For Greenboot\n [Documentation] Run setup suit and wait for greenboot to become ready\n Setup Suite\n Restart Greenboot And Wait For Success","name":"Setup Suite And Wait For Greenboot","imports_file_locations":"{'..\/..\/resources\/ostree-health.resource': 'test\/resources\/ostree-health.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/tuned\/workload-partitioning.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Setup Suite"} {"code":"*** Settings ***\nDocumentation Tests related to upgrading MicroShift\n\nResource ..\/..\/resources\/common.resource\nResource ..\/..\/resources\/ostree.resource\nLibrary Collections\n\nSuite Setup Setup\nSuite Teardown Teardown\n\nTest Tags ostree\n\n\n*** Variables ***\n${OLDER_MICROSHIFT_REF} ${EMPTY}\n${BOOTC_REGISTRY} ${EMPTY}\n\n\n*** Test Cases ***\nDowngrade Is Blocked\n [Documentation] Verifies that staging a new deployment featuring\n ... MicroShift \"older\" than existing data is blocked\n ... and results in system rolling back.\n\n ${initial_deploy_backup}= Get Future Backup Name For Current Boot\n Deploy Commit Expecting A Rollback\n ... ${OLDER_MICROSHIFT_REF}\n ... False\n ... ${BOOTC_REGISTRY}\n\n Wait Until Greenboot Health Check Exited\n Backup Should Exist ${initial_deploy_backup}\n Journal Should Have Information About Failed Version Comparison\n\n\n*** Keywords ***\nSetup\n [Documentation] Test suite setup\n Check Required Env Variables\n Should Not Be Empty ${OLDER_MICROSHIFT_REF} OLDER_MICROSHIFT_REF variable is required\n Login MicroShift Host\n Wait Until Greenboot Health Check Exited\n\nTeardown\n [Documentation] Test suite teardown\n Logout MicroShift Host\n","name":"\/tmp\/repos\/microshift\/test\/suites\/upgrade\/downgrade-block.robot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/upgrade\/downgrade-block.robot","element_type":"test","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Downgrade Is Blocked\n [Documentation] Verifies that staging a new deployment featuring\n ... MicroShift \"older\" than existing data is blocked\n ... and results in system rolling back.\n\n ${initial_deploy_backup}= Get Future Backup Name For Current Boot\n Deploy Commit Expecting A Rollback\n ... ${OLDER_MICROSHIFT_REF}\n ... False\n ... ${BOOTC_REGISTRY}\n\n Wait Until Greenboot Health Check Exited\n Backup Should Exist ${initial_deploy_backup}\n Journal Should Have Information About Failed Version Comparison","name":"Downgrade Is Blocked","imports_file_locations":"{'..\/..\/resources\/ostree.resource': 'test\/resources\/ostree.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/upgrade\/downgrade-block.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'OLDER_MICROSHIFT_REF': {'text': '${OLDER_MICROSHIFT_REF} ${EMPTY}'}, 'BOOTC_REGISTRY': {'text': '${BOOTC_REGISTRY} ${EMPTY}'}}","documentation":""} {"code":"Setup\n [Documentation] Test suite setup\n Check Required Env Variables\n Should Not Be Empty ${OLDER_MICROSHIFT_REF} OLDER_MICROSHIFT_REF variable is required\n Login MicroShift Host\n Wait Until Greenboot Health Check Exited","name":"Setup","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/upgrade\/downgrade-block.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'OLDER_MICROSHIFT_REF': {'text': '${OLDER_MICROSHIFT_REF} ${EMPTY}'}}","documentation":"Check Required Env Variables"} {"code":"Teardown\n [Documentation] Test suite teardown\n Logout MicroShift Host","name":"Teardown","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/upgrade\/downgrade-block.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Logout MicroShift Host"} {"code":"*** Settings ***\nDocumentation Tests related to upgrading MicroShift\n\nResource ..\/..\/resources\/common.resource\nResource ..\/..\/resources\/ostree.resource\nLibrary Collections\n\nSuite Setup Setup\nSuite Teardown Teardown\n\nTest Tags ostree\n\n\n*** Variables ***\n${UPGRADE_REF} ${EMPTY}\n${TEST_NAMESPACE} default\n\n\n*** Test Cases ***\nManual Rollback Does Not Restore Data\n [Documentation] Verifies that using rpm-ostree rollback will not\n ... restore data automatically: making sure admin needs to perform\n ... it manually.\n ...\n ... Test expects that provided upgrade reference is within the same Y-stream,\n ... e.g. 4.14.0 -> 4.14.1, not 4.14.0 -> 4.15.0.\n ...\n ... Test will upgrade the system with provided reference, create ConfigMap,\n ... roll system back to initial deployment, verify that ConfigMap exists,\n ... create additional ConfigMap, roll system back to upgrade deployment\n ... and verify that both ConfigMaps exist.\n\n ${initial_deploy_backup}= Get Future Backup Name For Current Boot\n ${initial_deploy_id}= Get Booted Deployment Id\n\n Deploy Commit Not Expecting A Rollback ${UPGRADE_REF}\n Backup Should Exist ${initial_deploy_backup}\n\n ${upgrade_deploy_backup}= Get Future Backup Name For Current Boot\n ${upgrade_deploy_id}= Get Booted Deployment Id\n\n ConfigMap Create rollback-test\n\n Rollback System And Verify ${upgrade_deploy_backup} ${initial_deploy_id}\n ${rolled_back_deploy_backup}= Get Future Backup Name For Current Boot\n\n ConfigMap Should Exist rollback-test\n ConfigMap Create rollback-test-2\n\n Rollback System And Verify ${rolled_back_deploy_backup} ${upgrade_deploy_id}\n ConfigMap Should Exist rollback-test\n ConfigMap Should Exist rollback-test-2\n\n\n*** Keywords ***\nSetup\n [Documentation] Test suite setup\n Check Required Env Variables\n Should Not Be Empty ${UPGRADE_REF} UPGRADE_REF variable is required\n Login MicroShift Host\n Setup Kubeconfig\n Wait Until Greenboot Health Check Exited\n\nTeardown\n [Documentation] Test suite teardown\n Oc Delete configmap -n default rollback-test\n Remove Kubeconfig\n Logout MicroShift Host\n\nRollback System And Verify\n [Documentation] Rolls back and waits for OSTree system to be healthy\n [Arguments] ${backup_that_should_exist} ${expected_deployment_id}\n\n libostree.Rpm Ostree Rollback\n Reboot MicroShift Host\n Wait Until Greenboot Health Check Exited\n\n Backup Should Exist ${backup_that_should_exist}\n Current Deployment Should Be ${expected_deployment_id}\n\nConfigMap Create\n [Documentation] Create config map in namespace\n [Arguments] ${config_map_name}\n Oc Create configmap -n ${TEST_NAMESPACE} ${config_map_name}\n\nConfigMap Should Exist\n [Documentation] Verify config map exists in namespace\n [Arguments] ${config_map_name}\n Oc Get configmap ${TEST_NAMESPACE} ${config_map_name}\n","name":"\/tmp\/repos\/microshift\/test\/suites\/upgrade\/rollback-manual.robot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/upgrade\/rollback-manual.robot","element_type":"test","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Manual Rollback Does Not Restore Data\n [Documentation] Verifies that using rpm-ostree rollback will not\n ... restore data automatically: making sure admin needs to perform\n ... it manually.\n ...\n ... Test expects that provided upgrade reference is within the same Y-stream,\n ... e.g. 4.14.0 -> 4.14.1, not 4.14.0 -> 4.15.0.\n ...\n ... Test will upgrade the system with provided reference, create ConfigMap,\n ... roll system back to initial deployment, verify that ConfigMap exists,\n ... create additional ConfigMap, roll system back to upgrade deployment\n ... and verify that both ConfigMaps exist.\n\n ${initial_deploy_backup}= Get Future Backup Name For Current Boot\n ${initial_deploy_id}= Get Booted Deployment Id\n\n Deploy Commit Not Expecting A Rollback ${UPGRADE_REF}\n Backup Should Exist ${initial_deploy_backup}\n\n ${upgrade_deploy_backup}= Get Future Backup Name For Current Boot\n ${upgrade_deploy_id}= Get Booted Deployment Id\n\n ConfigMap Create rollback-test\n\n Rollback System And Verify ${upgrade_deploy_backup} ${initial_deploy_id}\n ${rolled_back_deploy_backup}= Get Future Backup Name For Current Boot\n\n ConfigMap Should Exist rollback-test\n ConfigMap Create rollback-test-2\n\n Rollback System And Verify ${rolled_back_deploy_backup} ${upgrade_deploy_id}\n ConfigMap Should Exist rollback-test\n ConfigMap Should Exist rollback-test-2","name":"Manual Rollback Does Not Restore Data","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/upgrade\/rollback-manual.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'UPGRADE_REF': {'text': '${UPGRADE_REF} ${EMPTY}'}}","documentation":""} {"code":"Setup\n [Documentation] Test suite setup\n Check Required Env Variables\n Should Not Be Empty ${UPGRADE_REF} UPGRADE_REF variable is required\n Login MicroShift Host\n Setup Kubeconfig\n Wait Until Greenboot Health Check Exited","name":"Setup","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/upgrade\/rollback-manual.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'UPGRADE_REF': {'text': '${UPGRADE_REF} ${EMPTY}'}}","documentation":"Check Required Env Variables"} {"code":"Teardown\n [Documentation] Test suite teardown\n Oc Delete configmap -n default rollback-test\n Remove Kubeconfig\n Logout MicroShift Host","name":"Teardown","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/upgrade\/rollback-manual.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Oc Delete configmap -n default rollback-test"} {"code":"Rollback System And Verify\n [Documentation] Rolls back and waits for OSTree system to be healthy\n [Arguments] ${backup_that_should_exist} ${expected_deployment_id}\n\n libostree.Rpm Ostree Rollback\n Reboot MicroShift Host\n Wait Until Greenboot Health Check Exited\n\n Backup Should Exist ${backup_that_should_exist}\n Current Deployment Should Be ${expected_deployment_id}","name":"Rollback System And Verify","imports_file_locations":"{'..\/..\/resources\/ostree.resource': 'test\/resources\/ostree.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/upgrade\/rollback-manual.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"[Arguments] ${backup_that_should_exist} ${expected_deployment_id}"} {"code":"ConfigMap Create\n [Documentation] Create config map in namespace\n [Arguments] ${config_map_name}\n Oc Create configmap -n ${TEST_NAMESPACE} ${config_map_name}","name":"ConfigMap Create","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/upgrade\/rollback-manual.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'TEST_NAMESPACE': {'text': '${TEST_NAMESPACE} default'}}","documentation":"[Arguments] ${config_map_name}"} {"code":"ConfigMap Should Exist\n [Documentation] Verify config map exists in namespace\n [Arguments] ${config_map_name}\n Oc Get configmap ${TEST_NAMESPACE} ${config_map_name}","name":"ConfigMap Should Exist","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/upgrade\/rollback-manual.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'TEST_NAMESPACE': {'text': '${TEST_NAMESPACE} default'}}","documentation":"[Arguments] ${config_map_name}"} {"code":"*** Settings ***\nDocumentation Tests related to upgrading MicroShift\n\nResource ..\/..\/resources\/common.resource\nResource ..\/..\/resources\/ostree.resource\nLibrary Collections\n\nSuite Setup Setup\nSuite Teardown Teardown\n\nTest Tags ostree\n\n\n*** Variables ***\n${FAILING_REF} ${EMPTY}\n${REASON} ${EMPTY}\n${BOOTC_REGISTRY} ${EMPTY}\n\n\n*** Test Cases ***\nNew Deployment Is Consistently Unhealthy And Rolls Back\n [Documentation] Verifies that whether the new deployment\n ... cannot create a backup or is simply unhealthy,\n ... system will rollback and become healthy.\n\n Wait Until Greenboot Health Check Exited\n ${backup}= Get Future Backup Name For Current Boot\n\n Oc Create configmap -n default unhealthy-upgrade-test\n\n TestAgent.Add Action For Next Deployment every ${REASON}\n Deploy Commit Expecting A Rollback\n ... ${FAILING_REF}\n ... True\n ... ${BOOTC_REGISTRY}\n\n Wait For MicroShift Service\n Backup Should Exist ${backup}\n Expected Boot Count 5\n Oc Get configmap default unhealthy-upgrade-test\n\n\n*** Keywords ***\nSetup\n [Documentation] Test suite setup\n Check Required Env Variables\n Should Not Be Empty ${FAILING_REF} FAILING_REF variable is required\n Should Not Be Empty ${REASON} REASON variable is required\n Login MicroShift Host\n Setup Kubeconfig\n\nTeardown\n [Documentation] Test suite teardown\n Logout MicroShift Host\n Remove Kubeconfig\n","name":"\/tmp\/repos\/microshift\/test\/suites\/upgrade\/upgrade-fails-and-rolls-back.robot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/upgrade\/upgrade-fails-and-rolls-back.robot","element_type":"test","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"New Deployment Is Consistently Unhealthy And Rolls Back\n [Documentation] Verifies that whether the new deployment\n ... cannot create a backup or is simply unhealthy,\n ... system will rollback and become healthy.\n\n Wait Until Greenboot Health Check Exited\n ${backup}= Get Future Backup Name For Current Boot\n\n Oc Create configmap -n default unhealthy-upgrade-test\n\n TestAgent.Add Action For Next Deployment every ${REASON}\n Deploy Commit Expecting A Rollback\n ... ${FAILING_REF}\n ... True\n ... ${BOOTC_REGISTRY}\n\n Wait For MicroShift Service\n Backup Should Exist ${backup}\n Expected Boot Count 5\n Oc Get configmap default unhealthy-upgrade-test","name":"New Deployment Is Consistently Unhealthy And Rolls Back","imports_file_locations":"{'..\/..\/resources\/ostree.resource': 'test\/resources\/ostree.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/upgrade\/upgrade-fails-and-rolls-back.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'REASON': {'text': '${REASON} ${EMPTY}'}, 'FAILING_REF': {'text': '${FAILING_REF} ${EMPTY}'}, 'BOOTC_REGISTRY': {'text': '${BOOTC_REGISTRY} ${EMPTY}'}}","documentation":""} {"code":"Setup\n [Documentation] Test suite setup\n Check Required Env Variables\n Should Not Be Empty ${FAILING_REF} FAILING_REF variable is required\n Should Not Be Empty ${REASON} REASON variable is required\n Login MicroShift Host\n Setup Kubeconfig","name":"Setup","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/upgrade\/upgrade-fails-and-rolls-back.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'FAILING_REF': {'text': '${FAILING_REF} ${EMPTY}'}, 'REASON': {'text': '${REASON} ${EMPTY}'}}","documentation":"Check Required Env Variables"} {"code":"Teardown\n [Documentation] Test suite teardown\n Logout MicroShift Host\n Remove Kubeconfig","name":"Teardown","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/upgrade\/upgrade-fails-and-rolls-back.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Logout MicroShift Host"} {"code":"*** Settings ***\nDocumentation Tests related to upgrading MicroShift\n\nResource ..\/..\/resources\/common.resource\nResource ..\/..\/resources\/ostree.resource\nLibrary Collections\n\nSuite Setup Setup\nSuite Teardown Teardown\n\nTest Tags ostree\n\n\n*** Variables ***\n${TARGET_REF} ${EMPTY}\n${BOOTC_REGISTRY} ${EMPTY}\n\n\n*** Test Cases ***\nFirst Failed Staged Upgrade Should Not Restore Backup\n [Documentation] Staged deployment is unhealthy on first boot.\n ... After auto-greenboot-reboot MicroShift should not restore\n ... rollback deployment's backup, instead it should just carry on with\n ... the existing data.\n\n Wait Until Greenboot Health Check Exited\n\n ${initial_backup}= Get Future Backup Name For Current Boot\n Create Backup ${initial_backup} ${TRUE}\n\n TestAgent.Add Action For Next Deployment 1 fail_greenboot\n\n # We don't expect a rollback here since after the first failure\n # MicroShift should continue with business as usual\n Deploy Commit Not Expecting A Rollback\n ... ${TARGET_REF}\n ... ${TRUE}\n ... ${BOOTC_REGISTRY}\n\n Wait Until Greenboot Health Check Exited\n\n Validate Backup Is Not Restored ${initial_backup}\n Expected Boot Count 3\n\n\n*** Keywords ***\nSetup\n [Documentation] Test suite setup\n Check Required Env Variables\n Should Not Be Empty ${TARGET_REF} TARGET_REF variable is required\n Login MicroShift Host\n\nTeardown\n [Documentation] Test suite teardown\n Logout MicroShift Host\n\nValidate Backup Is Not Restored\n [Documentation] Validate that two backups exist - one for rollback\n ... deployment (with marker), and second for current deployment\n ... (despite failing greenboot on first boot).\n [Arguments] ${backup_name}\n\n Backup Should Exist ${backup_name}\n\n ${stdout}= Execute Command\n ... find \"${BACKUP_STORAGE}\" -maxdepth 1 -type d \"(\" -name \"rhel-*\" -o -name \"default-*\" \")\" | wc -l\n ... sudo=False return_rc=False\n\n ${mark_stdout} ${mark_stderr} ${mark_rc}= Execute Command\n ... stat ${DATA_DIR}\/marker\n ... sudo=True return_stderr=True return_rc=True\n\n Should Be Equal As Strings ${stdout} 2\n Should Be Equal As Integers 1 ${mark_rc}\n","name":"\/tmp\/repos\/microshift\/test\/suites\/upgrade\/upgrade-fails-then-recovers.robot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/upgrade\/upgrade-fails-then-recovers.robot","element_type":"test","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"First Failed Staged Upgrade Should Not Restore Backup\n [Documentation] Staged deployment is unhealthy on first boot.\n ... After auto-greenboot-reboot MicroShift should not restore\n ... rollback deployment's backup, instead it should just carry on with\n ... the existing data.\n\n Wait Until Greenboot Health Check Exited\n\n ${initial_backup}= Get Future Backup Name For Current Boot\n Create Backup ${initial_backup} ${TRUE}\n\n TestAgent.Add Action For Next Deployment 1 fail_greenboot\n\n # We don't expect a rollback here since after the first failure\n # MicroShift should continue with business as usual\n Deploy Commit Not Expecting A Rollback\n ... ${TARGET_REF}\n ... ${TRUE}\n ... ${BOOTC_REGISTRY}\n\n Wait Until Greenboot Health Check Exited\n\n Validate Backup Is Not Restored ${initial_backup}\n Expected Boot Count 3","name":"First Failed Staged Upgrade Should Not Restore Backup","imports_file_locations":"{'..\/..\/resources\/ostree.resource': 'test\/resources\/ostree.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/upgrade\/upgrade-fails-then-recovers.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'TARGET_REF': {'text': '${TARGET_REF} ${EMPTY}'}, 'BOOTC_REGISTRY': {'text': '${BOOTC_REGISTRY} ${EMPTY}'}}","documentation":""} {"code":"Setup\n [Documentation] Test suite setup\n Check Required Env Variables\n Should Not Be Empty ${TARGET_REF} TARGET_REF variable is required\n Login MicroShift Host","name":"Setup","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/upgrade\/upgrade-fails-then-recovers.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'TARGET_REF': {'text': '${TARGET_REF} ${EMPTY}'}}","documentation":"Check Required Env Variables"} {"code":"Teardown\n [Documentation] Test suite teardown\n Logout MicroShift Host","name":"Teardown","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/upgrade\/upgrade-fails-then-recovers.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Logout MicroShift Host"} {"code":"Validate Backup Is Not Restored\n [Documentation] Validate that two backups exist - one for rollback\n ... deployment (with marker), and second for current deployment\n ... (despite failing greenboot on first boot).\n [Arguments] ${backup_name}\n\n Backup Should Exist ${backup_name}\n\n ${stdout}= Execute Command\n ... find \"${BACKUP_STORAGE}\" -maxdepth 1 -type d \"(\" -name \"rhel-*\" -o -name \"default-*\" \")\" | wc -l\n ... sudo=False return_rc=False\n\n ${mark_stdout} ${mark_stderr} ${mark_rc}= Execute Command\n ... stat ${DATA_DIR}\/marker\n ... sudo=True return_stderr=True return_rc=True\n\n Should Be Equal As Strings ${stdout} 2\n Should Be Equal As Integers 1 ${mark_rc}","name":"Validate Backup Is Not Restored","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/upgrade\/upgrade-fails-then-recovers.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"deployment (with marker), and second for current deployment\n ... (despite failing greenboot on first boot)."} {"code":"*** Settings ***\nDocumentation Tests related to upgrading MicroShift\n\nResource ..\/..\/resources\/common.resource\nResource ..\/..\/resources\/multus.resource\nResource ..\/..\/resources\/ostree.resource\n\nSuite Setup Setup\nSuite Teardown Teardown\n\n\n*** Variables ***\n${TARGET_REF} ${EMPTY}\n${BOOTC_REGISTRY} ${EMPTY}\n\n${BRIDGE_INTERFACE} br-test\n${BRIDGE_NAD_YAML} .\/assets\/multus\/bridge-nad.yaml\n${BRIDGE_POD_YAML} .\/assets\/multus\/bridge-pod.yaml\n${BRIDGE_POD_NAME} test-bridge\n${BRIDGE_IP} 10.10.0.10\/24\n\n\n*** Test Cases ***\nUpgrade With Multus Workload\n [Documentation] Performs an upgrade and verifies if Pod with extra network interface continues to work.\n\n Wait Until Greenboot Health Check Exited\n\n Create NAD And Pod ${BRIDGE_NAD_YAML} ${BRIDGE_POD_YAML}\n Named Pod Should Be Ready ${BRIDGE_POD_NAME} ${NAMESPACE}\n Set IP For Host Interface ${BRIDGE_INTERFACE} ${BRIDGE_IP}\n Connect To Pod Over Local Interface ${BRIDGE_POD_NAME} ${NAMESPACE} ${BRIDGE_INTERFACE}\n\n Deploy Commit Not Expecting A Rollback\n ... ${TARGET_REF}\n ... ${TRUE}\n ... ${BOOTC_REGISTRY}\n\n Named Pod Should Be Ready ${BRIDGE_POD_NAME} ${NAMESPACE}\n Set IP For Host Interface ${BRIDGE_INTERFACE} ${BRIDGE_IP}\n Connect To Pod Over Local Interface ${BRIDGE_POD_NAME} ${NAMESPACE} ${BRIDGE_INTERFACE}\n\n [Teardown] Remove NAD And Pod ${BRIDGE_NAD_YAML} ${BRIDGE_POD_YAML}\n\n\n*** Keywords ***\nSetup\n [Documentation] Test suite setup\n Should Not Be Empty ${TARGET_REF} TARGET_REF variable is required\n Setup Suite With Namespace\n\nTeardown\n [Documentation] Test suite teardown\n Teardown Suite With Namespace\n","name":"\/tmp\/repos\/microshift\/test\/suites\/upgrade\/upgrade-multus.robot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/upgrade\/upgrade-multus.robot","element_type":"test","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Upgrade With Multus Workload\n [Documentation] Performs an upgrade and verifies if Pod with extra network interface continues to work.\n\n Wait Until Greenboot Health Check Exited\n\n Create NAD And Pod ${BRIDGE_NAD_YAML} ${BRIDGE_POD_YAML}\n Named Pod Should Be Ready ${BRIDGE_POD_NAME} ${NAMESPACE}\n Set IP For Host Interface ${BRIDGE_INTERFACE} ${BRIDGE_IP}\n Connect To Pod Over Local Interface ${BRIDGE_POD_NAME} ${NAMESPACE} ${BRIDGE_INTERFACE}\n\n Deploy Commit Not Expecting A Rollback\n ... ${TARGET_REF}\n ... ${TRUE}\n ... ${BOOTC_REGISTRY}\n\n Named Pod Should Be Ready ${BRIDGE_POD_NAME} ${NAMESPACE}\n Set IP For Host Interface ${BRIDGE_INTERFACE} ${BRIDGE_IP}\n Connect To Pod Over Local Interface ${BRIDGE_POD_NAME} ${NAMESPACE} ${BRIDGE_INTERFACE}\n\n [Teardown] Remove NAD And Pod ${BRIDGE_NAD_YAML} ${BRIDGE_POD_YAML}","name":"Upgrade With Multus Workload","imports_file_locations":"{'..\/..\/resources\/multus.resource': 'test\/resources\/multus.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/upgrade\/upgrade-multus.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'BRIDGE_NAD_YAML': {'text': '${BRIDGE_NAD_YAML} .\/assets\/multus\/bridge-nad.yaml'}, 'BRIDGE_POD_YAML': {'text': '${BRIDGE_POD_YAML} .\/assets\/multus\/bridge-pod.yaml'}, 'BRIDGE_POD_NAME': {'text': '${BRIDGE_POD_NAME} test-bridge'}, 'BRIDGE_INTERFACE': {'text': '${BRIDGE_INTERFACE} br-test'}, 'BRIDGE_IP': {'text': '${BRIDGE_IP} 10.10.0.10\/24'}, 'TARGET_REF': {'text': '${TARGET_REF} ${EMPTY}'}, 'BOOTC_REGISTRY': {'text': '${BOOTC_REGISTRY} ${EMPTY}'}}","documentation":""} {"code":"Setup\n [Documentation] Test suite setup\n Should Not Be Empty ${TARGET_REF} TARGET_REF variable is required\n Setup Suite With Namespace","name":"Setup","imports_file_locations":"{'..\/..\/resources\/common.resource': 'test\/resources\/common.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/upgrade\/upgrade-multus.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'TARGET_REF': {'text': '${TARGET_REF} ${EMPTY}'}}","documentation":"Should Not Be Empty ${TARGET_REF} TARGET_REF variable is required"} {"code":"Teardown\n [Documentation] Test suite teardown\n Teardown Suite With Namespace","name":"Teardown","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/upgrade\/upgrade-multus.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Teardown Suite With Namespace"} {"code":"*** Settings ***\nDocumentation Tests related to upgrading MicroShift\n\nResource ..\/..\/resources\/common.resource\nResource ..\/..\/resources\/microshift-host.resource\nResource ..\/..\/resources\/ostree.resource\nResource ..\/..\/resources\/oc.resource\nResource ..\/..\/resources\/selinux.resource\nLibrary Collections\n\nSuite Setup Setup\nSuite Teardown Teardown\n\nTest Tags ostree\n\n\n*** Variables ***\n${TARGET_REF} ${EMPTY}\n${BOOTC_REGISTRY} ${EMPTY}\n\n${CSI_WEBHOOK_DIFF} .\/assets\/storage\/csi-webhook-deletion-diff.yaml\n\n\n*** Test Cases ***\nUpgrade\n [Documentation] Performs an upgrade to given reference\n ... and verifies if it was successful, with SELinux validation\n\n Wait Until Greenboot Health Check Exited\n\n ${future_backup}= Get Future Backup Name For Current Boot\n Deploy Commit Not Expecting A Rollback\n ... ${TARGET_REF}\n ... False\n ... ${BOOTC_REGISTRY}\n Backup Should Exist ${future_backup}\n\n # SELinux tests do not pass on bootc images yet.\n # Run the following test on bootc systems when the problem is fixed.\n ${is_bootc}= Is System Bootc\n IF ${is_bootc} == ${FALSE}\n Validate SELinux With Backup ${future_backup}\n END\n\n # Verifies that CSI Snapshot Webhook resources are cleaned up after migration\n Oc Wait -f ${CSI_WEBHOOK_DIFF} --for=Delete --timeout=${DEFAULT_WAIT_TIMEOUT}\n\n\n*** Keywords ***\nSetup\n [Documentation] Test suite setup\n Check Required Env Variables\n Should Not Be Empty ${TARGET_REF} TARGET_REF variable is required\n Login MicroShift Host\n Setup Kubeconfig\n\nTeardown\n [Documentation] Test suite teardown\n Logout MicroShift Host\n","name":"\/tmp\/repos\/microshift\/test\/suites\/upgrade\/upgrade-successful.robot","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/upgrade\/upgrade-successful.robot","element_type":"test","project_name":"openshift\/microshift","settings":null,"variables":null,"documentation":null} {"code":"Upgrade\n [Documentation] Performs an upgrade to given reference\n ... and verifies if it was successful, with SELinux validation\n\n Wait Until Greenboot Health Check Exited\n\n ${future_backup}= Get Future Backup Name For Current Boot\n Deploy Commit Not Expecting A Rollback\n ... ${TARGET_REF}\n ... False\n ... ${BOOTC_REGISTRY}\n Backup Should Exist ${future_backup}\n\n # SELinux tests do not pass on bootc images yet.\n # Run the following test on bootc systems when the problem is fixed.\n ${is_bootc}= Is System Bootc\n IF ${is_bootc} == ${FALSE}\n Validate SELinux With Backup ${future_backup}\n END\n\n # Verifies that CSI Snapshot Webhook resources are cleaned up after migration\n Oc Wait -f ${CSI_WEBHOOK_DIFF} --for=Delete --timeout=${DEFAULT_WAIT_TIMEOUT}","name":"Upgrade","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource', '..\/..\/resources\/oc.resource': 'test\/resources\/oc.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/upgrade\/upgrade-successful.robot","element_type":"test_case","project_name":"openshift\/microshift","settings":"{}","variables":"{'TARGET_REF': {'text': '${TARGET_REF} ${EMPTY}'}, 'BOOTC_REGISTRY': {'text': '${BOOTC_REGISTRY} ${EMPTY}'}, 'CSI_WEBHOOK_DIFF': {'text': '${CSI_WEBHOOK_DIFF} .\/assets\/storage\/csi-webhook-deletion-diff.yaml'}}","documentation":""} {"code":"Setup\n [Documentation] Test suite setup\n Check Required Env Variables\n Should Not Be Empty ${TARGET_REF} TARGET_REF variable is required\n Login MicroShift Host\n Setup Kubeconfig","name":"Setup","imports_file_locations":"{'..\/..\/resources\/microshift-host.resource': 'test\/resources\/microshift-host.resource'}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/upgrade\/upgrade-successful.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{'TARGET_REF': {'text': '${TARGET_REF} ${EMPTY}'}}","documentation":"Check Required Env Variables"} {"code":"Teardown\n [Documentation] Test suite teardown\n Logout MicroShift Host","name":"Teardown","imports_file_locations":"{}","file_location":"https:\/\/scm.cci.nokia.net\/cia\/automation-tests-ncs\/24\/\/tmp\/repos\/microshift\/test\/suites\/upgrade\/upgrade-successful.robot","element_type":"keyword","project_name":"openshift\/microshift","settings":"{}","variables":"{}","documentation":"Logout MicroShift Host"}