mirror of
				https://github.com/TeaOSLab/EdgeAPI.git
				synced 2025-11-04 07:50:25 +08:00 
			
		
		
		
	修复测试用例
This commit is contained in:
		@@ -11,7 +11,7 @@ import (
 | 
			
		||||
func TestHTTPCacheTaskDAO_Clean(t *testing.T) {
 | 
			
		||||
	dbs.NotifyReady()
 | 
			
		||||
 | 
			
		||||
	err := models.SharedHTTPCacheTaskDAO.Clean(nil, 30)
 | 
			
		||||
	err := models.SharedHTTPCacheTaskDAO.CleanDays(nil, 30)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		t.Fatal(err)
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
@@ -72,11 +72,11 @@ func TestServerBandwidthStatDAO_FindAllServerStatsWithDay(t *testing.T) {
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func TestServerBandwidthStatDAO_Clean(t *testing.T) {
 | 
			
		||||
func TestServerBandwidthStatDAO_CleanDays(t *testing.T) {
 | 
			
		||||
	var dao = models.NewServerBandwidthStatDAO()
 | 
			
		||||
	var tx *dbs.Tx
 | 
			
		||||
	var before = time.Now()
 | 
			
		||||
	err := dao.Clean(tx)
 | 
			
		||||
	err := dao.CleanDays(tx, 100)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		t.Fatal(err)
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
@@ -57,10 +57,10 @@ func TestUserBandwidthStatDAO_UpdateServerBandwidth(t *testing.T) {
 | 
			
		||||
	t.Log("ok")
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func TestUserBandwidthStatDAO_Clean(t *testing.T) {
 | 
			
		||||
func TestUserBandwidthStatDAO_CleanDays(t *testing.T) {
 | 
			
		||||
	var dao = models.NewUserBandwidthStatDAO()
 | 
			
		||||
	var tx *dbs.Tx
 | 
			
		||||
	err := dao.Clean(tx)
 | 
			
		||||
	err := dao.CleanDays(tx, 100)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		t.Fatal(err)
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user