Intergate OpenPitrix metrics into metering.

Signed-off-by: Rao Yunkun <yunkunrao@yunify.com>
This commit is contained in:
Rao Yunkun
2021-03-29 15:53:22 +08:00
parent ea93f3832d
commit 845f6bbe89
15 changed files with 551 additions and 151 deletions

View File

@@ -372,7 +372,7 @@ func TestExportMetrics(t *testing.T) {
for i, tt := range tests {
t.Run(fmt.Sprintf("%d", i), func(t *testing.T) {
_, err := exportMetrics(tt.metrics)
_, err := exportMetrics(tt.metrics, time.Now().Add(-time.Hour), time.Now())
if err != nil && !tt.expectedErr {
t.Fatal("Failed to export metering metrics", err)
}