Skip to content

Commit e247edb

Browse files
committed
Remove single + auto values for connect URI option
GODRIVER-665 Change-Id: Id18b90151d867283073020a19316d0ec3820ec0e
1 parent 5004250 commit e247edb

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

x/network/connstring/connstring.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -486,8 +486,8 @@ func (p *parser) addOption(pair string) error {
486486
p.Compressors = compressors
487487
case "connect":
488488
switch strings.ToLower(value) {
489-
case "auto", "automatic":
490-
case "direct", "single":
489+
case "automatic":
490+
case "direct":
491491
p.Connect = SingleConnect
492492
default:
493493
return fmt.Errorf("invalid 'connect' value: %s", value)

x/network/connstring/connstring_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,8 @@ func TestConnect(t *testing.T) {
9898
expected connstring.ConnectMode
9999
err bool
100100
}{
101-
{s: "connect=auto", expected: connstring.AutoConnect},
102101
{s: "connect=automatic", expected: connstring.AutoConnect},
103-
{s: "connect=AUTO", expected: connstring.AutoConnect},
104-
{s: "connect=single", expected: connstring.SingleConnect},
102+
{s: "connect=AUTOMATIC", expected: connstring.AutoConnect},
105103
{s: "connect=direct", expected: connstring.SingleConnect},
106104
{s: "connect=blah", err: true},
107105
}

0 commit comments

Comments
 (0)