From 14445dd5e40bb7d70c6ac47bf3896d18bedee7bb Mon Sep 17 00:00:00 2001
From: EliChin <elizaveta@nspcc.ru>
Date: Mon, 9 Aug 2021 18:09:22 +0300
Subject: [PATCH] Fix networkinfo_rpc_method

Signed-off-by: EliChin <elizaveta@nspcc.ru>
---
 .../network/networkinfo_rpc_method.robot      |  8 +-
 .../network/networkinfor_rpc_method.robot     | 92 -------------------
 2 files changed, 4 insertions(+), 96 deletions(-)
 delete mode 100644 robot/testsuites/integration/network/networkinfor_rpc_method.robot

diff --git a/robot/testsuites/integration/network/networkinfo_rpc_method.robot b/robot/testsuites/integration/network/networkinfo_rpc_method.robot
index 5a7d3dd5..5c119212 100644
--- a/robot/testsuites/integration/network/networkinfo_rpc_method.robot
+++ b/robot/testsuites/integration/network/networkinfo_rpc_method.robot
@@ -24,9 +24,9 @@ NetworkInfo RPC Method
     # Checking if the command returns equal results for two storage nodes
     ######################################################################
 
-    ${RESULT1_S01}            Run Process    neofs-cli netmap netinfo -r ${SN_01_ADDR} -k ${MAINNET_WALLET_WIF}    shell=True
+    ${RESULT1_S01}            Run Process    neofs-cli netmap netinfo -r ${SN_01_ADDR} --wif ${MAINNET_WALLET_WIF}    shell=True
     Should Be Equal As Integers    ${RESULT1_S01.rc} 	0
-    ${RESULT1_S02}            Run Process    neofs-cli netmap netinfo -r ${SN_02_ADDR} -k ${MAINNET_WALLET_WIF}    shell=True
+    ${RESULT1_S02}            Run Process    neofs-cli netmap netinfo -r ${SN_02_ADDR} --wif ${MAINNET_WALLET_WIF}    shell=True
     Should Be Equal As Integers    ${RESULT1_S02.rc} 	0
 
     #############################################
@@ -53,9 +53,9 @@ NetworkInfo RPC Method
     
     Tick Epoch
 
-    ${RESULT2_S01}           Run Process    neofs-cli netmap netinfo -r ${SN_01_ADDR} -k ${MAINNET_WALLET_WIF}    shell=True
+    ${RESULT2_S01}           Run Process    neofs-cli netmap netinfo -r ${SN_01_ADDR} --wif ${MAINNET_WALLET_WIF}    shell=True
     Should Be Equal As Integers    ${RESULT2_S01.rc} 	0
-    ${RESULT2_S02}           Run Process    neofs-cli netmap netinfo -r ${SN_02_ADDR} -k ${MAINNET_WALLET_WIF}    shell=True
+    ${RESULT2_S02}           Run Process    neofs-cli netmap netinfo -r ${SN_02_ADDR} --wif ${MAINNET_WALLET_WIF}    shell=True
     Should Be Equal As Integers    ${RESULT2_S02.rc} 	0
 
     Should Be Equal As Strings    ${RESULT2_S01.stdout}    ${RESULT2_S02.stdout}
diff --git a/robot/testsuites/integration/network/networkinfor_rpc_method.robot b/robot/testsuites/integration/network/networkinfor_rpc_method.robot
deleted file mode 100644
index 5a7d3dd5..00000000
--- a/robot/testsuites/integration/network/networkinfor_rpc_method.robot
+++ /dev/null
@@ -1,92 +0,0 @@
-*** Settings ***
-Variables   ../../../variables/common.py
-
-Library    Collections
-Library    Process
-Library    String
-Library    ${KEYWORDS}/contract_keywords.py
-
-Resource    ../${RESOURCES}/setup_teardown.robot
-
-*** Variables ***
-${SN_01_ADDR} =    s01.neofs.devenv:8080
-${SN_02_ADDR} =    s02.neofs.devenv:8080
-
-*** Test cases ***
-NetworkInfo RPC Method
-    [Documentation]           Testcase to check NetworkInfo RPC method.
-    [Tags]                    RPC  NeoFS  NeoCLI    NetworkInfo
-    [Timeout]                 10 min
-
-    [Setup]                   Setup
-
-    ######################################################################
-    # Checking if the command returns equal results for two storage nodes
-    ######################################################################
-
-    ${RESULT1_S01}            Run Process    neofs-cli netmap netinfo -r ${SN_01_ADDR} -k ${MAINNET_WALLET_WIF}    shell=True
-    Should Be Equal As Integers    ${RESULT1_S01.rc} 	0
-    ${RESULT1_S02}            Run Process    neofs-cli netmap netinfo -r ${SN_02_ADDR} -k ${MAINNET_WALLET_WIF}    shell=True
-    Should Be Equal As Integers    ${RESULT1_S02.rc} 	0
-
-    #############################################
-    # Checking if morph magic number is relevant
-    #############################################
-    
-    ${NETWORK_MAGIC_S01} =    Parse Magic    ${RESULT1_S01.stdout}
-    Should Be Equal    ${NETWORK_MAGIC_S01}    ${MORPH_MAGIC}
-    
-    ${NETWORK_MAGIC_S02} =    Parse Magic    ${RESULT1_S02.stdout}
-    Should Be Equal    ${NETWORK_MAGIC_S02}    ${MORPH_MAGIC}
-
-    #######################################################################
-    # Checking if epoch numbers requested from two storage nodes are equal
-    #######################################################################
-
-    ${EPOCH1_S01} =          Parse Epoch    ${RESULT1_S01.stdout}
-    ${EPOCH1_S02} =          Parse Epoch    ${RESULT1_S02.stdout}
-    Should Be Equal As Integers    ${EPOCH1_S01}    ${EPOCH1_S02}
-
-    ########################################
-    # Ticking epoch and getting new netinfo
-    ########################################
-    
-    Tick Epoch
-
-    ${RESULT2_S01}           Run Process    neofs-cli netmap netinfo -r ${SN_01_ADDR} -k ${MAINNET_WALLET_WIF}    shell=True
-    Should Be Equal As Integers    ${RESULT2_S01.rc} 	0
-    ${RESULT2_S02}           Run Process    neofs-cli netmap netinfo -r ${SN_02_ADDR} -k ${MAINNET_WALLET_WIF}    shell=True
-    Should Be Equal As Integers    ${RESULT2_S02.rc} 	0
-
-    Should Be Equal As Strings    ${RESULT2_S01.stdout}    ${RESULT2_S02.stdout}
-
-    ${EPOCH2_S01} =          Parse Epoch    ${RESULT2_S01.stdout}
-
-    #################################################################
-    # Checking if the second epoch value is more than the first by 1
-    #################################################################
-
-    ${NEW_EPOCH} =           Evaluate    ${EPOCH1_S01}+${1}
-    Should Be Equal    ${EPOCH2_S01}    ${NEW_EPOCH}
-
-    
-    [Teardown]             Teardown    network_rpc_method  
-
-*** Keywords ***
-
-Parse Magic
-    [Arguments]    ${RESULT_STDOUT}     
-    @{MAGIC} =               Split String    ${RESULT_STDOUT}   ${\n}
-    ${NETWORK_MAGIC} =       Get From List    ${MAGIC}    ${1}
-    @{MAGIC_INFO} =          Split String    ${NETWORK_MAGIC}   ${SPACE}
-    ${MAGIC_VALUE} =         Get From List    ${MAGIC_INFO}    ${4}
-    [Return]    ${MAGIC_VALUE}
-
-Parse Epoch
-    [Arguments]    ${RESULT_STDOUT}     
-    @{EPOCH} =               Split String    ${RESULT_STDOUT}   ${\n}
-    ${NETWORK_EPOCH} =       Get From List    ${EPOCH}    ${0}
-    @{EPOCH_INFO} =          Split String    ${NETWORK_EPOCH}    ${SPACE}
-    ${EPOCH_VALUE} =         Get From List    ${EPOCH_INFO}    ${1}
-    ${EPOCH_VALUE_INT} =     Convert To Integer    ${EPOCH_VALUE}
-    [Return]    ${EPOCH_VALUE_INT}