Fix: llmapi use same db conn, delete old test;
This commit is contained in:
		| @@ -1,24 +0,0 @@ | ||||
| package repos | ||||
|  | ||||
| import ( | ||||
| 	"os" | ||||
| 	"testing" | ||||
|  | ||||
| 	"github.com/stretchr/testify/assert" | ||||
| ) | ||||
|  | ||||
| func TestNewRepoProvider(t *testing.T) { | ||||
| 	// Create a temporary SQLite database file for testing | ||||
| 	tmpDBFile := "./test_gralias.db" | ||||
| 	defer os.Remove(tmpDBFile) // Clean up the temporary file after the test | ||||
|  | ||||
| 	// Initialize a new RepoProvider | ||||
| 	repoProvider := NewRepoProvider(tmpDBFile) | ||||
|  | ||||
| 	// Assert that the DB connection is not nil | ||||
| 	assert.NotNil(t, repoProvider.DB, "DB connection should not be nil") | ||||
|  | ||||
| 	// Close the database connection | ||||
| 	err := repoProvider.DB.Close() | ||||
| 	assert.NoError(t, err, "Error closing database connection") | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 Grail Finder
					Grail Finder