fix: filter perf metrics summary by active groups (#4976)

This commit is contained in:
Seefs
2026-05-20 11:38:09 +08:00
committed by GitHub
parent 2d1ca15384
commit 20d3e73734
4 changed files with 40 additions and 14 deletions
+3
View File
@@ -26,6 +26,7 @@ func TestMain(m *testing.M) {
common.RedisEnabled = false
common.BatchUpdateEnabled = false
common.LogConsumeEnabled = true
initCol()
sqlDB, err := db.DB()
if err != nil {
@@ -43,6 +44,7 @@ func TestMain(m *testing.M) {
&SubscriptionPlan{},
&SubscriptionOrder{},
&UserSubscription{},
&PerfMetric{},
); err != nil {
panic("failed to migrate: " + err.Error())
}
@@ -62,6 +64,7 @@ func truncateTables(t *testing.T) {
DB.Exec("DELETE FROM subscription_orders")
DB.Exec("DELETE FROM subscription_plans")
DB.Exec("DELETE FROM user_subscriptions")
DB.Exec("DELETE FROM perf_metrics")
})
}