@@ -14,13 +14,14 @@ func TestConfigConnParams(t *testing.T) {
1414 input * Config
1515 want []string
1616 }{
17- {& Config {ConnectTimeoutSec : 10 }, []string {"connect_timeout=10" }},
17+ {& Config {Scheme : "postgres" , SSLMode : "require" , ConnectTimeoutSec : 10 }, []string {"connect_timeout=10" , "sslmode=require " }},
1818 {& Config {Scheme : "postgres" , SSLMode : "disable" }, []string {"connect_timeout=0" , "sslmode=disable" }},
19- {& Config {Scheme : "awspostgres" , SSLMode : "disable" }, []string {"connect_timeout=0" }},
20- {& Config {ExpectedVersion : semver .MustParse ("9.0.0" ), ApplicationName : "Terraform provider" }, []string {"connect_timeout=0" , "fallback_application_name=Terraform+provider" }},
21- {& Config {ExpectedVersion : semver .MustParse ("8.0.0" ), ApplicationName : "Terraform provider" }, []string {"connect_timeout=0" }},
22- {& Config {SSLClientCert : & ClientCertificateConfig {CertificatePath : "/path/to/public-certificate.pem" , KeyPath : "/path/to/private-key.pem" }}, []string {"connect_timeout=0" , "sslcert=%2Fpath%2Fto%2Fpublic-certificate.pem" , "sslkey=%2Fpath%2Fto%2Fprivate-key.pem" }},
23- {& Config {SSLRootCertPath : "/path/to/root.pem" }, []string {"connect_timeout=0" , "sslrootcert=%2Fpath%2Fto%2Froot.pem" }},
19+ {& Config {Scheme : "awspostgres" , ConnectTimeoutSec : 10 }, []string {}},
20+ {& Config {Scheme : "awspostgres" , SSLMode : "disable" }, []string {}},
21+ {& Config {ExpectedVersion : semver .MustParse ("9.0.0" ), ApplicationName : "Terraform provider" }, []string {"fallback_application_name=Terraform+provider" }},
22+ {& Config {ExpectedVersion : semver .MustParse ("8.0.0" ), ApplicationName : "Terraform provider" }, []string {}},
23+ {& Config {SSLClientCert : & ClientCertificateConfig {CertificatePath : "/path/to/public-certificate.pem" , KeyPath : "/path/to/private-key.pem" }}, []string {"sslcert=%2Fpath%2Fto%2Fpublic-certificate.pem" , "sslkey=%2Fpath%2Fto%2Fprivate-key.pem" }},
24+ {& Config {SSLRootCertPath : "/path/to/root.pem" }, []string {"sslrootcert=%2Fpath%2Fto%2Froot.pem" }},
2425 }
2526
2627 for _ , test := range tests {
0 commit comments