X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=csit%2Flibraries%2FUtils.robot;h=919da36a04d5850d5b6e44eac767741dbcc5ba0c;hb=566a5541cc299aa9e0f68c1abac6f8f06764a8fb;hp=0d6f09ec2b4166473750357969350f86cd4f1c1d;hpb=d9d549a6ef4081096f0d17e57aff1c015e3a5b05;p=integration%2Ftest.git diff --git a/csit/libraries/Utils.robot b/csit/libraries/Utils.robot index 0d6f09ec2b..919da36a04 100644 --- a/csit/libraries/Utils.robot +++ b/csit/libraries/Utils.robot @@ -70,7 +70,7 @@ Report_Failure_Due_To_Bug ... or as the first line of the test if FastFail module is not being ... used. It reports the URL of the bug on console and also puts it ... into the Robot log file. - ${test_skipped}= BuiltIn.Evaluate len(re.findall('SKIPPED', '''${TEST_MESSAGE}''')) > 0 modules=re + ${test_skipped}= BuiltIn.Evaluate len(re.findall('SKIPPED', """${TEST_MESSAGE}""")) > 0 modules=re BuiltIn.Return From Keyword If ('${TEST_STATUS}' != 'FAIL') or ${test_skipped} ${newline}= BuiltIn.Evaluate chr(10) ${msg}= BuiltIn.Set_Variable This test fails due to https://bugs.opendaylight.org/show_bug.cgi?id=${number} @@ -336,6 +336,21 @@ Add Elements To URI From File ${resp} RequestsLibrary.Put Request session ${dest_uri} data=${body} headers=${headers} Should Be Equal As Strings ${resp.status_code} 200 +Add Elements To URI From File And Verify + [Arguments] ${dest_uri} ${data_file} ${headers}=${headers} + ${body} OperatingSystem.Get File ${data_file} + ${resp} RequestsLibrary.Put Request session ${dest_uri} data=${body} headers=${headers} + Should Be Equal As Strings ${resp.status_code} 200 + ${resp} RequestsLibrary.Get Request session ${dest_uri} + Should Not Be Equal ${resp.status_code} 404 + +Add Elements To URI And Verify + [Arguments] ${dest_uri} ${data_file} ${headers}=${headers} + ${resp} RequestsLibrary.Put Request session ${dest_uri} ${data_file} headers=${headers} + Should Be Equal As Strings ${resp.status_code} 200 + ${resp} RequestsLibrary.Get Request session ${dest_uri} + Should Not Be Equal ${resp.status_code} 404 + Post Elements To URI From File [Arguments] ${dest_uri} ${data_file} ${headers}=${headers} ${body} OperatingSystem.Get File ${data_file}