Unreviewed changes
4 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: src/database/sql/sql_test.go
Insertions: 4, Deletions: 1.
@@ -231,9 +231,12 @@
func (c *basicConnector) Connect(ctx context.Context) (driver.Conn, error) {
conn, err := c.fakeConnector.Connect(ctx)
+ if err != nil {
+ return nil, err
+ }
fc := getFakeConn(conn)
fc.skipDirtySession = true // Conn won't implement ResetSession
- return &basicConn{fc}, err
+ return &basicConn{fc}, nil
}
func TestOpenDB(t *testing.T) {
```
Change information
Commit message:
database/sql: run tests with different driver variants
Database drivers can support a variety of optional features.
For example, a driver.Conn can optionally implement the
Queryer and/or QueryerContext interfaces.
We currently run most database/sql tests with a general-purpose
test driver which implements most optional interfaces.
Add support for running tests with a variety of different drivers.
To start with, use two variations: A "basic" driver which only
implements the minimal mandatory interfaces, and a "default"
driver which implements most optional interfaces.
For #67546
Change-Id: I60bd02260810b6468e6b02a1ac7544406a6a6964
Files:
- M src/database/sql/fakedb_test.go
- M src/database/sql/sql_test.go
Change size: L
Delta: 2 files changed, 409 insertions(+), 324 deletions(-)
Branch: refs/heads/master