Alerting: Add doc comments to classic.go (#56724)
This commit is contained in:
@@ -49,8 +49,8 @@ func TestUnmarshalConditionCMD(t *testing.T) {
|
||||
expectedCommand: &ConditionsCmd{
|
||||
Conditions: []condition{
|
||||
{
|
||||
QueryRefID: "A",
|
||||
Reducer: classicReducer("avg"),
|
||||
InputRefID: "A",
|
||||
Reducer: reducer("avg"),
|
||||
Operator: "and",
|
||||
Evaluator: &thresholdEvaluator{Type: "gt", Threshold: 2},
|
||||
},
|
||||
@@ -89,8 +89,8 @@ func TestUnmarshalConditionCMD(t *testing.T) {
|
||||
expectedCommand: &ConditionsCmd{
|
||||
Conditions: []condition{
|
||||
{
|
||||
QueryRefID: "A",
|
||||
Reducer: classicReducer("diff"),
|
||||
InputRefID: "A",
|
||||
Reducer: reducer("diff"),
|
||||
Operator: "or",
|
||||
Evaluator: &rangedEvaluator{Type: "within_range", Lower: 2, Upper: 3},
|
||||
},
|
||||
@@ -134,8 +134,8 @@ func TestConditionsCmdExecute(t *testing.T) {
|
||||
conditionsCmd: &ConditionsCmd{
|
||||
Conditions: []condition{
|
||||
{
|
||||
QueryRefID: "A",
|
||||
Reducer: classicReducer("avg"),
|
||||
InputRefID: "A",
|
||||
Reducer: reducer("avg"),
|
||||
Operator: "and",
|
||||
Evaluator: &thresholdEvaluator{Type: "gt", Threshold: 34},
|
||||
},
|
||||
@@ -158,8 +158,8 @@ func TestConditionsCmdExecute(t *testing.T) {
|
||||
conditionsCmd: &ConditionsCmd{
|
||||
Conditions: []condition{
|
||||
{
|
||||
QueryRefID: "A",
|
||||
Reducer: classicReducer("avg"),
|
||||
InputRefID: "A",
|
||||
Reducer: reducer("avg"),
|
||||
Operator: "and",
|
||||
Evaluator: &thresholdEvaluator{Type: "gt", Threshold: 34},
|
||||
},
|
||||
@@ -183,8 +183,8 @@ func TestConditionsCmdExecute(t *testing.T) {
|
||||
conditionsCmd: &ConditionsCmd{
|
||||
Conditions: []condition{
|
||||
{
|
||||
QueryRefID: "A",
|
||||
Reducer: classicReducer("avg"),
|
||||
InputRefID: "A",
|
||||
Reducer: reducer("avg"),
|
||||
Operator: "and",
|
||||
Evaluator: &thresholdEvaluator{Type: "gt", Threshold: .5},
|
||||
},
|
||||
@@ -207,13 +207,13 @@ func TestConditionsCmdExecute(t *testing.T) {
|
||||
conditionsCmd: &ConditionsCmd{
|
||||
Conditions: []condition{
|
||||
{
|
||||
QueryRefID: "A",
|
||||
Reducer: classicReducer("max"),
|
||||
InputRefID: "A",
|
||||
Reducer: reducer("max"),
|
||||
Evaluator: &thresholdEvaluator{Type: "gt", Threshold: 34},
|
||||
},
|
||||
{
|
||||
QueryRefID: "A",
|
||||
Reducer: classicReducer("min"),
|
||||
InputRefID: "A",
|
||||
Reducer: reducer("min"),
|
||||
Operator: "or",
|
||||
Evaluator: &thresholdEvaluator{Type: "gt", Threshold: 12},
|
||||
},
|
||||
@@ -237,8 +237,8 @@ func TestConditionsCmdExecute(t *testing.T) {
|
||||
conditionsCmd: &ConditionsCmd{
|
||||
Conditions: []condition{
|
||||
{
|
||||
QueryRefID: "A",
|
||||
Reducer: classicReducer("avg"),
|
||||
InputRefID: "A",
|
||||
Reducer: reducer("avg"),
|
||||
Operator: "and",
|
||||
Evaluator: &thresholdEvaluator{Type: "gt", Threshold: 34},
|
||||
},
|
||||
@@ -262,8 +262,8 @@ func TestConditionsCmdExecute(t *testing.T) {
|
||||
conditionsCmd: &ConditionsCmd{
|
||||
Conditions: []condition{
|
||||
{
|
||||
QueryRefID: "A",
|
||||
Reducer: classicReducer("avg"),
|
||||
InputRefID: "A",
|
||||
Reducer: reducer("avg"),
|
||||
Operator: "and",
|
||||
Evaluator: &thresholdEvaluator{Type: "gt", Threshold: 34},
|
||||
},
|
||||
@@ -287,8 +287,8 @@ func TestConditionsCmdExecute(t *testing.T) {
|
||||
conditionsCmd: &ConditionsCmd{
|
||||
Conditions: []condition{
|
||||
{
|
||||
QueryRefID: "A",
|
||||
Reducer: classicReducer("avg"),
|
||||
InputRefID: "A",
|
||||
Reducer: reducer("avg"),
|
||||
Operator: "and",
|
||||
Evaluator: &thresholdEvaluator{Type: "gt", Threshold: 34},
|
||||
},
|
||||
@@ -311,8 +311,8 @@ func TestConditionsCmdExecute(t *testing.T) {
|
||||
conditionsCmd: &ConditionsCmd{
|
||||
Conditions: []condition{
|
||||
{
|
||||
QueryRefID: "A",
|
||||
Reducer: classicReducer("diff"),
|
||||
InputRefID: "A",
|
||||
Reducer: reducer("diff"),
|
||||
Operator: "and",
|
||||
Evaluator: &rangedEvaluator{Type: "within_range", Lower: 2, Upper: 3},
|
||||
},
|
||||
@@ -334,8 +334,8 @@ func TestConditionsCmdExecute(t *testing.T) {
|
||||
conditionsCmd: &ConditionsCmd{
|
||||
Conditions: []condition{
|
||||
{
|
||||
QueryRefID: "A",
|
||||
Reducer: classicReducer("avg"),
|
||||
InputRefID: "A",
|
||||
Reducer: reducer("avg"),
|
||||
Operator: "and",
|
||||
Evaluator: &thresholdEvaluator{"gt", 1},
|
||||
},
|
||||
@@ -361,8 +361,8 @@ func TestConditionsCmdExecute(t *testing.T) {
|
||||
conditionsCmd: &ConditionsCmd{
|
||||
Conditions: []condition{
|
||||
{
|
||||
QueryRefID: "A",
|
||||
Reducer: classicReducer("avg"),
|
||||
InputRefID: "A",
|
||||
Reducer: reducer("avg"),
|
||||
Operator: "and",
|
||||
Evaluator: &thresholdEvaluator{"gt", 1},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user