feat: tipos TestServer y TestDB para utilidades de testing en Go core
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
package core
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
)
|
||||
|
||||
// TestDB encapsula una base de datos SQLite de test con su path y cleanup.
|
||||
type TestDB struct {
|
||||
DB *sql.DB
|
||||
Path string
|
||||
Cleanup func()
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package core
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// TestServer encapsula un servidor HTTP de test con su cliente y cleanup.
|
||||
type TestServer struct {
|
||||
URL string
|
||||
Client *http.Client
|
||||
Cleanup func()
|
||||
}
|
||||
Reference in New Issue
Block a user