From 73b0946927eb74acd1b5241f7a032a80208a514d Mon Sep 17 00:00:00 2001 From: Mariia_Azbeleva Date: Fri, 6 Oct 2023 13:36:11 +0300 Subject: [PATCH] Change netvm name Change netvm to net-vm, set it as a variable Signed-off-by: Mariia Azbeleva --- Robot-Framework/config/variables.robot | 3 ++- Robot-Framework/test-suites/bat-tests/netvm.robot | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Robot-Framework/config/variables.robot b/Robot-Framework/config/variables.robot index b65edd0..f0890f9 100644 --- a/Robot-Framework/config/variables.robot +++ b/Robot-Framework/config/variables.robot @@ -13,8 +13,9 @@ Set Variables Set Global Variable ${SERIAL_PORT} ${config['addresses']['${DEVICE}']['serial_port']} Set Global Variable ${DEVICE_IP_ADDRESS} ${config['addresses']['${DEVICE}']['device_ip_address']} Set Global Variable ${SOCKET_IP_ADDRESS} ${config['addresses']['${DEVICE}']['socket_ip_address']} - Set Global Variable ${NETVM_SERVICE} microvm@netvm.service Set Global Variable ${THREADS_NUMBER} ${config['addresses']['${DEVICE}']['threads']} + Set Global Variable ${NETVM_NAME} net-vm + Set Global Variable ${NETVM_SERVICE} microvm@${NETVM_NAME}.service Read Config [Arguments] ${file_path}=../config/test_config.json diff --git a/Robot-Framework/test-suites/bat-tests/netvm.robot b/Robot-Framework/test-suites/bat-tests/netvm.robot index 4539eda..097f0a4 100644 --- a/Robot-Framework/test-suites/bat-tests/netvm.robot +++ b/Robot-Framework/test-suites/bat-tests/netvm.robot @@ -130,7 +130,7 @@ Connect to netvm via tunnel Clear iptables rules Create tunnel Log To Console Connecting to NEtVM via tunnel - ${connection}= Connect IP=${DEVICE_IP_ADDRESS} PORT=${local_port} target_output=ghaf@netvm + ${connection}= Connect IP=${DEVICE_IP_ADDRESS} PORT=${local_port} target_output=${LOGIN}@${NETVM_NAME} Set Global Variable ${netvm} ${connection} [Return] ${netvm} @@ -144,12 +144,12 @@ Copy keys Write ${\n} Read Until Enter same passphrase again: Write ${\n} - Read Until ghaf@ghaf-host: + Read Until ${LOGIN}@ghaf-host: Write ssh-copy-id -o StrictHostKeyChecking=no ${netvm_ip} ${output}= Read delay=30s Should Contain ${output} Password: Write ${password} - Read Until ghaf@ghaf-host: + Read Until ${LOGIN}@ghaf-host: Clear iptables rules [Documentation] Clear IP tables rules to open ports for creating tunnel @@ -168,12 +168,12 @@ Login into NetVM ${passw} Run Keyword And Return Status Should Contain ${output} Password IF ${passw} Write ${PASSWORD} - Read Until ghaf@netvm + Read Until ${LOGIN}@${NETVM_NAME} END Write sudo su Read Until password Write ${PASSWORD} - Read Until root@netvm + Read Until root@${NETVM_NAME} Configure wifi [Arguments] ${netvm} ${SSID} ${passw}