vend with
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package with_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"fmt"
|
||||
"path"
|
||||
"testing"
|
||||
|
||||
"gitea.bel.blue/bel/with"
|
||||
)
|
||||
|
||||
func TestSqlite(t *testing.T) {
|
||||
d := t.TempDir()
|
||||
myErr := fmt.Errorf("my err")
|
||||
if err := with.Sqlite(context.Background(), "sqlite://"+path.Join(d, "db"), func(db *sql.DB) error {
|
||||
return myErr
|
||||
}); err != myErr {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user