Files
EdgeAPI/internal/db/models/metric_sum_stat_dao_test.go

25 lines
543 B
Go
Raw Permalink Normal View History

2022-03-30 15:35:42 +08:00
package models_test
2021-07-01 10:39:42 +08:00
import (
2024-07-27 14:15:25 +08:00
"testing"
2022-03-30 15:35:42 +08:00
"github.com/TeaOSLab/EdgeAPI/internal/db/models"
2021-07-01 10:39:42 +08:00
_ "github.com/go-sql-driver/mysql"
_ "github.com/iwind/TeaGo/bootstrap"
2021-12-03 12:06:13 +08:00
"github.com/iwind/TeaGo/dbs"
2022-03-30 15:35:42 +08:00
timeutil "github.com/iwind/TeaGo/utils/time"
2021-07-01 10:39:42 +08:00
)
2021-12-03 10:57:40 +08:00
2022-03-30 15:35:42 +08:00
func TestMetricSumStatDAO_FindNodeSum(t *testing.T) {
t.Log(models.NewMetricSumStatDAO().FindNodeSum(nil, 46, timeutil.Format("Ymd"), 1, 1))
}
2021-12-03 10:57:40 +08:00
func TestMetricSumStatDAO_Clean(t *testing.T) {
2021-12-03 12:06:13 +08:00
dbs.NotifyReady()
2022-03-30 15:35:42 +08:00
err := models.NewMetricSumStatDAO().Clean(nil)
2021-12-03 10:57:40 +08:00
if err != nil {
t.Fatal(err)
}
}