diff options
Diffstat (limited to 'csit/resources/tests/common-library.robot')
-rw-r--r-- | csit/resources/tests/common-library.robot | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/csit/resources/tests/common-library.robot b/csit/resources/tests/common-library.robot index 4d69b349..e0b1c0f1 100644 --- a/csit/resources/tests/common-library.robot +++ b/csit/resources/tests/common-library.robot @@ -157,3 +157,11 @@ GetKafkaTopic [Arguments] ${topic} ${resp}= Run Process ${CURDIR}/make_topics.py ${topic} ${KAFKA_IP} Log ${resp.stdout} + +ValidatePolicyExecution + [Arguments] ${url} ${executionTime} + [Documentation] Check that policy execution under X milliseconds + ${resp}= QueryPrometheus ${url} + ${rawNumber}= Evaluate ${resp['data']['result'][0]['value'][1]} + ${actualTime}= Set Variable ${rawNumber * ${1000}} + Should Be True ${actualTime} <= ${executionTime}
\ No newline at end of file |