@@ -30,6 +30,7 @@ func TestAlertingExecutor(t *testing.T) {
30
30
31
31
handler .Eval (context )
32
32
So (context .Firing , ShouldEqual , true )
33
+ So (context .FiringEval , ShouldEqual , "true = true" )
33
34
})
34
35
35
36
Convey ("Show return false with not passing asdf" , func () {
@@ -42,6 +43,7 @@ func TestAlertingExecutor(t *testing.T) {
42
43
43
44
handler .Eval (context )
44
45
So (context .Firing , ShouldEqual , false )
46
+ So (context .FiringEval , ShouldEqual , "[true AND false] = false" )
45
47
})
46
48
47
49
Convey ("Show return true if any of the condition is passing with OR operator" , func () {
@@ -54,6 +56,7 @@ func TestAlertingExecutor(t *testing.T) {
54
56
55
57
handler .Eval (context )
56
58
So (context .Firing , ShouldEqual , true )
59
+ So (context .FiringEval , ShouldEqual , "[true OR false] = true" )
57
60
})
58
61
59
62
Convey ("Show return false if any of the condition is failing with AND operator" , func () {
@@ -66,6 +69,7 @@ func TestAlertingExecutor(t *testing.T) {
66
69
67
70
handler .Eval (context )
68
71
So (context .Firing , ShouldEqual , false )
72
+ So (context .FiringEval , ShouldEqual , "[true AND false] = false" )
69
73
})
70
74
71
75
Convey ("Show return true if one condition is failing with nested OR operator" , func () {
@@ -79,6 +83,7 @@ func TestAlertingExecutor(t *testing.T) {
79
83
80
84
handler .Eval (context )
81
85
So (context .Firing , ShouldEqual , true )
86
+ So (context .FiringEval , ShouldEqual , "[[true AND true] OR false] = true" )
82
87
})
83
88
84
89
Convey ("Show return false if one condition is passing with nested OR operator" , func () {
@@ -92,6 +97,7 @@ func TestAlertingExecutor(t *testing.T) {
92
97
93
98
handler .Eval (context )
94
99
So (context .Firing , ShouldEqual , false )
100
+ So (context .FiringEval , ShouldEqual , "[[true AND false] OR false] = false" )
95
101
})
96
102
97
103
Convey ("Show return false if a condition is failing with nested AND operator" , func () {
@@ -105,6 +111,7 @@ func TestAlertingExecutor(t *testing.T) {
105
111
106
112
handler .Eval (context )
107
113
So (context .Firing , ShouldEqual , false )
114
+ So (context .FiringEval , ShouldEqual , "[[true AND false] AND true] = false" )
108
115
})
109
116
110
117
Convey ("Show return true if a condition is passing with nested OR operator" , func () {
@@ -118,6 +125,7 @@ func TestAlertingExecutor(t *testing.T) {
118
125
119
126
handler .Eval (context )
120
127
So (context .Firing , ShouldEqual , true )
128
+ So (context .FiringEval , ShouldEqual , "[[true OR false] OR true] = true" )
121
129
})
122
130
})
123
131
}
0 commit comments