Replace 'Run Keyword Unless'
[integration/test.git] / csit / libraries / Genius.robot
index 6cc208d06ae65a51273ac36cfc80fbf095570d2d..7e499e6c33673a58cce1b948d3b7cb135a219db8 100644 (file)
@@ -236,7 +236,7 @@ Get Tunnel
     BuiltIn.Should Contain    ${resp.text}    ${dst}
     BuiltIn.Run Keyword If    '${config_api_type}' == '${EMPTY}'    BuiltIn.Should Contain    ${resp.text}    ${src}
     ${tunnel_interface_name} =    BuiltIn.Run Keyword If    "tunnel-interface-names" in "${json}"    Genius.Get Tunnel Interface Name    ${json["internal-tunnel"][0]}    tunnel-interface-names
-    ${tunnel_name_output}    ${tunnel_name} =    BuiltIn.Run Keyword Unless    '${config_api_type}' == '${EMPTY}'    BuiltIn.Should Match Regexp    ${resp.text}    "tunnel-name":"(tun[\\w\\d]+)"
+    ${tunnel_name_output}    ${tunnel_name} =    BuiltIn.Run Keyword If    '${config_api_type}' != '${EMPTY}'    BuiltIn.Should Match Regexp    ${resp.text}    "tunnel-name":"(tun[\\w\\d]+)"
     ${tunnel} =    BuiltIn.Set Variable If    '${config_api_type}' == '${EMPTY}'    ${tunnel_interface_name}    ${tunnel_name}
     [Return]    ${tunnel}