From 6604d78d5f679fc5be2e29d10cfe8aaf605b63d1 Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Fri, 22 Mar 2024 14:30:18 +0100 Subject: [PATCH] Fix expected_status types expected_status needs to be a String, otherwise it leads to: InvalidExpectedStatus: 200 Signed-off-by: Robert Varga Change-Id: Ia95baf7b4bbf0869b466576c25f0527592a9c227 --- csit/libraries/BGPSpeaker.robot | 2 +- csit/suites/bgpcep/bgpclustering/PrefixcountKeywords.robot | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/csit/libraries/BGPSpeaker.robot b/csit/libraries/BGPSpeaker.robot index f1a1d62a63..17d5f6789e 100644 --- a/csit/libraries/BGPSpeaker.robot +++ b/csit/libraries/BGPSpeaker.robot @@ -62,7 +62,7 @@ Start_BGP_Speaker_And_Verify_Connected Verify_BGP_Speaker_Connection [Documentation] Verifies peer's presence in bgp rib. [Arguments] ${session} ${ip} ${connected}=${True} - ${exp_status_code}= BuiltIn.Set_Variable_If ${connected} ${200} ${404} + ${exp_status_code}= BuiltIn.Set_Variable_If ${connected} 200 404 ${url}= BuiltIn.Set_Variable ... ${REST_API}/bgp-rib:bgp-rib/rib=example-bgp-rib/peer=bgp:%2F%2F${ip}?content=nonconfig ${response}= RequestsLibrary.GET On Session ${session} ${url} expected_status=${exp_status_code} diff --git a/csit/suites/bgpcep/bgpclustering/PrefixcountKeywords.robot b/csit/suites/bgpcep/bgpclustering/PrefixcountKeywords.robot index a856f23d98..51c25ea53c 100644 --- a/csit/suites/bgpcep/bgpclustering/PrefixcountKeywords.robot +++ b/csit/suites/bgpcep/bgpclustering/PrefixcountKeywords.robot @@ -136,7 +136,7 @@ Verify_Bgp_Peer_Connection [Arguments] ${session} ${peer_ip} ${connected}=${True} # TODO: This keyword is not specific to prefix counting. Find a better place for it. ${peer_check_url} = BuiltIn.Set_Variable ${REST_API}/bgp-rib:bgp-rib/rib=example-bgp-rib/peer=bgp:%2F%2F - ${exp_status_code} = BuiltIn.Set_Variable_If ${connected} ${200} ${404} + ${exp_status_code} = BuiltIn.Set_Variable_If ${connected} 200 404 ${rsp} = RequestsLibrary.GET On Session ${session} ${peer_check_url}${peer_ip}?content=nonconfig expected_status=${exp_status_code} BuiltIn.Log ${rsp.content} -- 2.36.6