mirror of
				https://github.com/TeaOSLab/EdgeAPI.git
				synced 2025-11-04 16:00:24 +08:00 
			
		
		
		
	
		
			
	
	
		
			20 lines
		
	
	
		
			394 B
		
	
	
	
		
			Go
		
	
	
	
	
	
		
		
			
		
	
	
			20 lines
		
	
	
		
			394 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"
							 | 
						||
| 
								 | 
							
									"testing"
							 | 
						||
| 
								 | 
							
								)
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								func TestIPLibraryFileDAO_GenerateIPLibrary(t *testing.T) {
							 | 
						||
| 
								 | 
							
									dbs.NotifyReady()
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
									var tx *dbs.Tx
							 | 
						||
| 
								 | 
							
									err := models.SharedIPLibraryFileDAO.GenerateIPLibrary(tx, 3)
							 | 
						||
| 
								 | 
							
									if err != nil {
							 | 
						||
| 
								 | 
							
										t.Fatal(err)
							 | 
						||
| 
								 | 
							
									}
							 | 
						||
| 
								 | 
							
								}
							 |