-
Notifications
You must be signed in to change notification settings - Fork 65
/
results.go
39 lines (32 loc) · 877 Bytes
/
results.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package certification
import (
"time"
"github.com/redhat-openshift-ecosystem/openshift-preflight/internal/check"
"github.com/redhat-openshift-ecosystem/openshift-preflight/internal/runtime"
)
type openshiftClusterVersion = runtime.OpenshiftClusterVersion
type Result struct {
check.Check
ElapsedTime time.Duration
// Err contains the error a check itself throws if it failed to run.
// If populated, the expectation is that this Result is in the
// Results{}.Errors slice.
err error
}
type Results struct {
TestedImage string
PassedOverall bool
TestedOn openshiftClusterVersion
CertificationHash string
Passed []Result
Failed []Result
Errors []Result
Warned []Result
}
func (r Result) Error() error {
return r.err
}
func (r *Result) WithError(err error) *Result {
r.err = err
return r
}