6
6
7
7
"github.com/flanksource/canary-checker/api/context"
8
8
v1 "github.com/flanksource/canary-checker/api/v1"
9
- "github.com/flanksource/canary-checker/pkg "
9
+ "github.com/flanksource/duty/models "
10
10
)
11
11
12
12
func Test_measureTestSeverity (t * testing.T ) {
@@ -17,7 +17,7 @@ func Test_measureTestSeverity(t *testing.T) {
17
17
tests := []struct {
18
18
name string
19
19
args args
20
- want pkg .Severity
20
+ want models .Severity
21
21
}{
22
22
{
23
23
name : "simple - critical" ,
@@ -27,7 +27,7 @@ func Test_measureTestSeverity(t *testing.T) {
27
27
Critical : "duration > 1500" ,
28
28
},
29
29
},
30
- want : pkg .SeverityCritical ,
30
+ want : models .SeverityCritical ,
31
31
},
32
32
{
33
33
name : "simple - high" ,
@@ -38,7 +38,7 @@ func Test_measureTestSeverity(t *testing.T) {
38
38
High : "duration > 1000" ,
39
39
},
40
40
},
41
- want : pkg .SeverityHigh ,
41
+ want : models .SeverityHigh ,
42
42
},
43
43
{
44
44
name : "simple - medium" ,
@@ -51,7 +51,7 @@ func Test_measureTestSeverity(t *testing.T) {
51
51
Low : "duration > 500" ,
52
52
},
53
53
},
54
- want : pkg .SeverityMedium ,
54
+ want : models .SeverityMedium ,
55
55
},
56
56
{
57
57
name : "simple - low" ,
@@ -63,7 +63,7 @@ func Test_measureTestSeverity(t *testing.T) {
63
63
Low : "duration > 500" ,
64
64
},
65
65
},
66
- want : pkg .SeverityLow ,
66
+ want : models .SeverityLow ,
67
67
},
68
68
{
69
69
name : "complex expression" ,
@@ -75,14 +75,14 @@ func Test_measureTestSeverity(t *testing.T) {
75
75
Low : "duration > 500 && duration < 1000" ,
76
76
},
77
77
},
78
- want : pkg .SeverityInfo ,
78
+ want : models .SeverityInfo ,
79
79
},
80
80
{
81
81
name : "no threshold defined" ,
82
82
args : args {
83
83
duration : 600 ,
84
84
},
85
- want : pkg .SeverityInfo ,
85
+ want : models .SeverityInfo ,
86
86
},
87
87
{
88
88
name : "no severity match" ,
@@ -94,7 +94,7 @@ func Test_measureTestSeverity(t *testing.T) {
94
94
Low : "duration > 500" ,
95
95
},
96
96
},
97
- want : pkg .SeverityInfo ,
97
+ want : models .SeverityInfo ,
98
98
},
99
99
{
100
100
name : "invalid expression" ,
@@ -106,7 +106,7 @@ func Test_measureTestSeverity(t *testing.T) {
106
106
Low : "duration > 500" ,
107
107
},
108
108
},
109
- want : pkg .SeverityInfo ,
109
+ want : models .SeverityInfo ,
110
110
},
111
111
{
112
112
name : "use of undefined var" ,
@@ -118,7 +118,7 @@ func Test_measureTestSeverity(t *testing.T) {
118
118
Low : "Duration > 500" ,
119
119
},
120
120
},
121
- want : pkg .SeverityInfo ,
121
+ want : models .SeverityInfo ,
122
122
},
123
123
}
124
124
for _ , tt := range tests {
0 commit comments