... 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}
... 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)
${reference}= String.Replace_String_Using_Regexp ${SUITE_NAME}_${TEST_NAME} [ /\.-] _
${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}
Log ${resp.content}
Should Be Equal As Strings ${resp.status_code} ${status_code}
[Return] ${resp}
+
+Get Log File Name
+ [Arguments] ${testtool}
+ [Documentation] Get the name of the suite sanitized to be usable as a part of filename.
+ ... These names are used to constructs names of the log files produced
+ ... by the testing tools so two suites using a tool wont overwrite the
+ ... log files if they happen to run in one job.
+ ${name}= BuiltIn.Evaluate """${SUITE_NAME}""".replace(" ","-").replace("/","-").replace(".","-")
+ [Return] ${testtool}--${name}.log