mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
added compressing for metrics on trends
This commit is contained in:
committed by
Dan Christian Bogos
parent
69f4f08770
commit
3dccb44511
@@ -179,13 +179,13 @@ func testScheduledTrends(t *testing.T) {
|
||||
},
|
||||
{
|
||||
TrendID: "TREND_2",
|
||||
Next: time.Now().Add(3 * time.Second),
|
||||
Next: time.Now().Add(4 * time.Second),
|
||||
},
|
||||
}
|
||||
|
||||
if err := trendAuQRpc.Call(context.Background(), utils.TrendSv1GetScheduledTrends, &utils.ArgScheduledTrends{TenantIDWithAPIOpts: utils.TenantIDWithAPIOpts{TenantID: &utils.TenantID{Tenant: "cgrates.org"}}, TrendIDPrefix: []string{"TREND"}}, &schedTrends); err != nil {
|
||||
t.Error(err)
|
||||
} else if diff := cmp.Diff(schedTrends, expTrends, cmpopts.EquateApproxTime(3*time.Second), cmpopts.IgnoreFields(utils.ScheduledTrend{}, "Prev")); diff != utils.EmptyString {
|
||||
} else if diff := cmp.Diff(schedTrends, expTrends, cmpopts.EquateApproxTime(4*time.Second), cmpopts.IgnoreFields(utils.ScheduledTrend{}, "Prev")); diff != utils.EmptyString {
|
||||
t.Errorf("unexpected scheduled trends (-want +got)\n%s", diff)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user