-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Test severity #978
base: master
Are you sure you want to change the base?
feat: Test severity #978
Conversation
✅ Deploy Preview for elaborate-horse-ac1743 ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
5a49443
to
09b9f45
Compare
09b9f45
to
2966c04
Compare
95510e1
to
f4c6899
Compare
204be9a
to
d4a1cdc
Compare
3d06d31
to
d52a5ce
Compare
[skip ci]
[skip ci]
[skip ci]
[skip ci]
d52a5ce
to
da453a8
Compare
@@ -104,10 +105,14 @@ func processTemplates(ctx *context.Context, r *pkg.CheckResult) *pkg.CheckResult | |||
|
|||
switch v := r.Check.(type) { | |||
case v1.TestFunction: | |||
tpl := v.GetTestFunction() | |||
data := map[string]any{"duration": r.Duration} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
duration should be appended into the default check results object e.g. for a junit it might be:
test:
threshold:
high: duration > 10000 || failed / passed > 0.1
warning: duration >20000 || failed / passed > 0.02
info: duration >20000 || failed / passed > 0.01
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
canary-checker/checks/runchecks.go
Lines 89 to 92 in da453a8
func processTemplates(ctx *context.Context, r *pkg.CheckResult) *pkg.CheckResult { | |
if r.Duration == 0 && r.GetDuration() > 0 { | |
r.Duration = r.GetDuration() | |
} |
Duration is added to the check result object at the top of the func
Resolves: #370