Skip to content

Commit

Permalink
add generic keyword for checking metrics existance UWM
Browse files Browse the repository at this point in the history
  • Loading branch information
bdattoma committed Jan 23, 2024
1 parent 9af45e3 commit 95afcef
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion ods_ci/tests/Resources/OCP.resource
Original file line number Diff line number Diff line change
Expand Up @@ -167,4 +167,19 @@ Wait Until CRD Exists
[Documentation] Repeatedly searches for the expected CRD. Stops when it finds it
[Arguments] ${crd_fullname}
Wait Until Keyword Succeeds 15 times 5s
... Oc Get kind=CustomResourceDefinition name=${crd_fullname}
... Oc Get kind=CustomResourceDefinition name=${crd_fullname}

Metrics Should Exist In UserWorkloadMonitoring
[Documentation] Checks that the given ${metrics_searches} exists. It also accepts partial names.
... Returns the complete list of metrics found with the given search texts
[Arguments] ${thanos_url} ${thanos_token} ${search_metrics}
${metrics}= Create List
FOR ${index} ${metric_search_text} IN ENUMERATE @{search_metrics}
Log ${index}: ${metric_search_text}
${metrics_names}= Get Thanos Metrics List thanos_url=${thanos_url} thanos_token=${thanos_token}
... search_text=${metric_search_text}
Should Not Be Empty ${metrics_names}
${metrics_names}= Split To Lines ${metrics_names}
${metrics}= Append To List ${metrics} @{metrics_names}
END
RETURN ${metrics}

0 comments on commit 95afcef

Please sign in to comment.