mirror of
				https://github.com/TeaOSLab/EdgeAPI.git
				synced 2025-11-04 07:50:25 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			24 lines
		
	
	
		
			542 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			542 B
		
	
	
	
		
			Go
		
	
	
	
	
	
package models_test
 | 
						|
 | 
						|
import (
 | 
						|
	"github.com/TeaOSLab/EdgeAPI/internal/db/models"
 | 
						|
	_ "github.com/go-sql-driver/mysql"
 | 
						|
	_ "github.com/iwind/TeaGo/bootstrap"
 | 
						|
	"github.com/iwind/TeaGo/dbs"
 | 
						|
	timeutil "github.com/iwind/TeaGo/utils/time"
 | 
						|
	"testing"
 | 
						|
)
 | 
						|
 | 
						|
func TestMetricSumStatDAO_FindNodeSum(t *testing.T) {
 | 
						|
	t.Log(models.NewMetricSumStatDAO().FindNodeSum(nil, 46, timeutil.Format("Ymd"), 1, 1))
 | 
						|
}
 | 
						|
 | 
						|
func TestMetricSumStatDAO_Clean(t *testing.T) {
 | 
						|
	dbs.NotifyReady()
 | 
						|
 | 
						|
	err := models.NewMetricSumStatDAO().Clean(nil)
 | 
						|
	if err != nil {
 | 
						|
		t.Fatal(err)
 | 
						|
	}
 | 
						|
}
 |