(t *testing.T)
| 81 | } |
| 82 | |
| 83 | func TestGetDBUri(t *testing.T) { |
| 84 | c := NewConnectionConfig() |
| 85 | c.Key = InstanceKey{Hostname: "myhost", Port: 3306} |
| 86 | c.User = "gromit" |
| 87 | c.Password = "penguin" |
| 88 | c.Timeout = 1.2345 |
| 89 | c.TransactionIsolation = transactionIsolation |
| 90 | c.Charset = "utf8mb4,utf8,latin1" |
| 91 | |
| 92 | uri := c.GetDBUri("test") |
| 93 | require.Equal(t, `gromit:penguin@tcp(myhost:3306)/test?autocommit=true&interpolateParams=true&charset=utf8mb4,utf8,latin1&tls=false&transaction_isolation="REPEATABLE-READ"&timeout=1.234500s&readTimeout=1.234500s&writeTimeout=1.234500s`, uri) |
| 94 | } |
| 95 | |
| 96 | func TestGetDBUriWithTLSSetup(t *testing.T) { |
| 97 | c := NewConnectionConfig() |
nothing calls this directly
no test coverage detected
searching dependent graphs…