MCPcopy
hub / github.com/jackc/pgx / TestConfigCopyCanBeUsedToConnect

Function TestConfigCopyCanBeUsedToConnect

pgconn/config_test.go:866–876  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

864}
865
866func TestConfigCopyCanBeUsedToConnect(t *testing.T) {
867 connString := os.Getenv("PGX_TEST_DATABASE")
868 original, err := pgconn.ParseConfig(connString)
869 require.NoError(t, err)
870
871 copied := original.Copy()
872 assert.NotPanics(t, func() {
873 _, err = pgconn.ConnectConfig(context.Background(), copied)
874 })
875 assert.NoError(t, err)
876}
877
878func TestNetworkAddress(t *testing.T) {
879 tests := []struct {

Callers

nothing calls this directly

Calls 3

ParseConfigFunction · 0.92
ConnectConfigFunction · 0.92
CopyMethod · 0.45

Tested by

no test coverage detected