@@ -311,18 +311,10 @@ func Test_alertService_GetAlertConditionsValue(t *testing.T) {
311
311
defer ctrl .Finish ()
312
312
monitorService := NewMockAlertServiceServer (ctrl )
313
313
monitorService .EXPECT ().GetAlertConditionsValue (gomock .Any (), gomock .Any ()).AnyTimes ().Return (& monitor.GetAlertConditionsValueResponse {
314
- Data : []* monitor.AlertConditionsValue {
315
- {
316
- Key : "application_name" ,
317
- Options : []* structpb.Value {
318
- structpb .NewStringValue ("go-demo" ),
319
- },
320
- },
321
- {
322
- Key : "service_name" ,
323
- Options : []* structpb.Value {
324
- structpb .NewStringValue ("go-demo" ),
325
- },
314
+ Data : & monitor.AlertConditionsValue {
315
+ Key : "application-name" ,
316
+ Options : []* structpb.Value {
317
+ structpb .NewStringValue ("erda" ),
326
318
},
327
319
},
328
320
}, nil )
@@ -341,9 +333,13 @@ func Test_alertService_GetAlertConditionsValue(t *testing.T) {
341
333
}
342
334
pro .alertService .p = pro
343
335
_ , err := pro .alertService .GetAlertConditionsValue (context .Background (), & pb.GetAlertConditionsValueRequest {
344
- ProjectId : "3" ,
345
- TerminusKey : "3013939450553395c209ec92d1dda84a" ,
346
- ScopeType : "msp" ,
336
+ Condition : "application-name" ,
337
+ Filters : map [string ]string {
338
+ "org_name" : "erda" ,
339
+ "project_id" : "12" ,
340
+ "terminus_key" : "c393550824b3d50aa758fee4593d6e31" ,
341
+ },
342
+ Index : "application_service_node" ,
347
343
})
348
344
if err != nil {
349
345
fmt .Println ("should not err,err is " , err )
0 commit comments