MCPcopy Create free account
hub / github.com/sql-machine-learning/sqlflow / TestDatabaseParseURL

Function TestDatabaseParseURL

go/database/db_test.go:24–31  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

22)
23
24func TestDatabaseParseURL(t *testing.T) {
25 a := assert.New(t)
26 driver, dataSource, e := ParseURL(GetTestingMySQLURL())
27 a.EqualValues(driver, "mysql")
28 a.EqualValues(dataSource, fmt.Sprintf("%s:%s@%s(%s)/?maxAllowedPacket=0",
29 GetTestingMySQLConfig().User, GetTestingMySQLConfig().Passwd, GetTestingMySQLConfig().Net, GetTestingMySQLConfig().Addr))
30 a.NoError(e)
31}
32
33func TestDatabaseDriverList(t *testing.T) {
34 a := assert.New(t)

Callers

nothing calls this directly

Calls 3

ParseURLFunction · 0.85
GetTestingMySQLURLFunction · 0.85
GetTestingMySQLConfigFunction · 0.85

Tested by

no test coverage detected