Skip to content

Commit f91311a

Browse files
committed
Refactor metric value conversion to store result in a variable before pushing to metrics
1 parent 39eff86 commit f91311a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

codebundles/aws-c7n-service-usage/sli.robot

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ Check for AWS Service Usage Exceeding defined threshold in AWS Account `${AWS_AC
2727
... secret__aws_secret_access_key=${AWS_SECRET_ACCESS_KEY}
2828
${count}= RW.CLI.Run Cli
2929
... cmd=cat ${OUTPUT_DIR}/aws-c7n-service-usage/service-usage/metadata.json | jq '.metrics[] | select(.MetricName == "ResourceCount") | .Value'
30-
RW.Core.Push Metric Convert to Number ${count.stdout} 2
30+
${score}= Convert to Number ${count.stdout} 2
31+
RW.Core.Push Metric ${score}
3132

3233
** Keywords ***
3334
Suite Initialization

0 commit comments

Comments
 (0)