mirror of
				https://github.com/TeaOSLab/EdgeAPI.git
				synced 2025-11-04 16:00:24 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			22 lines
		
	
	
		
			435 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			435 B
		
	
	
	
		
			Go
		
	
	
	
	
	
package models
 | 
						|
 | 
						|
import (
 | 
						|
	_ "github.com/go-sql-driver/mysql"
 | 
						|
	"github.com/iwind/TeaGo/dbs"
 | 
						|
	"testing"
 | 
						|
	"time"
 | 
						|
)
 | 
						|
 | 
						|
func TestHTTPFirewallRuleSetDAO_FindRuleSetIdWithRuleId(t *testing.T) {
 | 
						|
	dbs.NotifyReady()
 | 
						|
 | 
						|
	var tx *dbs.Tx
 | 
						|
	before := time.Now()
 | 
						|
	setId, err := SharedHTTPFirewallRuleSetDAO.FindEnabledRuleSetIdWithRuleId(tx, 20)
 | 
						|
	if err != nil {
 | 
						|
		t.Fatal(err)
 | 
						|
	}
 | 
						|
	t.Log("setId:", setId)
 | 
						|
	t.Log(time.Since(before).Seconds()*1000, "ms")
 | 
						|
}
 |