Skip to content

Commit

Permalink
Added metrics/engine unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
codebien committed Jan 27, 2023
1 parent 28e4040 commit 3bbd9f9
Show file tree
Hide file tree
Showing 3 changed files with 240 additions and 696 deletions.
3 changes: 2 additions & 1 deletion metrics/engine/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,9 @@ func (me *MetricsEngine) getThresholdMetricOrSubmetric(name string) (*metrics.Me

metric := me.test.Registry.Get(nameParts[0])
if metric == nil {
return nil, fmt.Errorf("metric '%s' does not exist in the script", nameParts[1])
return nil, fmt.Errorf("metric '%s' does not exist in the script", nameParts[0])
}

if len(nameParts) == 1 { // no sub-metric
return metric, nil
}
Expand Down
Loading

0 comments on commit 3bbd9f9

Please sign in to comment.