@@ -6,7 +6,7 @@ import { parse, toClientConfig, parseIntoClientConfig } from '../'
66
77describe ( 'toClientConfig' , function ( ) {
88 it ( 'converts connection info' , function ( ) {
9- const config = parse ( 'postgres ://brian:pw@boom:381/lala' )
9+ const config = parse ( 'gaussdb ://brian:pw@boom:381/lala' )
1010 const clientConfig = toClientConfig ( config )
1111
1212 clientConfig . user ?. should . equal ( 'brian' )
@@ -18,7 +18,7 @@ describe('toClientConfig', function () {
1818
1919 it ( 'converts query params' , function ( ) {
2020 const config = parse (
21- 'postgres :///?application_name=TheApp&fallback_application_name=TheAppFallback&client_encoding=utf8&options=-c geqo=off'
21+ 'gaussdb :///?application_name=TheApp&fallback_application_name=TheAppFallback&client_encoding=utf8&options=-c geqo=off'
2222 )
2323 const clientConfig = toClientConfig ( config )
2424
@@ -29,21 +29,21 @@ describe('toClientConfig', function () {
2929 } )
3030
3131 it ( 'converts SSL boolean' , function ( ) {
32- const config = parse ( 'pg :///?ssl=true' )
32+ const config = parse ( 'gaussdb :///?ssl=true' )
3333 const clientConfig = toClientConfig ( config )
3434
3535 clientConfig . ssl ?. should . equal ( true )
3636 } )
3737
3838 it ( 'converts sslmode=disable' , function ( ) {
39- const config = parse ( 'pg :///?sslmode=disable' )
39+ const config = parse ( 'gaussdb :///?sslmode=disable' )
4040 const clientConfig = toClientConfig ( config )
4141
4242 clientConfig . ssl ?. should . equal ( false )
4343 } )
4444
4545 it ( 'converts sslmode=noverify' , function ( ) {
46- const config = parse ( 'pg :///?sslmode=no-verify' )
46+ const config = parse ( 'gaussdb :///?sslmode=no-verify' )
4747 const clientConfig = toClientConfig ( config )
4848
4949 clientConfig . ssl ?. should . deep . equal ( {
@@ -52,22 +52,22 @@ describe('toClientConfig', function () {
5252 } )
5353
5454 it ( 'converts other sslmode options' , function ( ) {
55- const config = parse ( 'pg :///?sslmode=verify-ca' )
55+ const config = parse ( 'gaussdb :///?sslmode=verify-ca' )
5656 const clientConfig = toClientConfig ( config )
5757
5858 clientConfig . ssl ?. should . deep . equal ( { } )
5959 } )
6060
6161 it ( 'converts other sslmode options' , function ( ) {
62- const config = parse ( 'pg :///?sslmode=verify-ca' )
62+ const config = parse ( 'gaussdb :///?sslmode=verify-ca' )
6363 const clientConfig = toClientConfig ( config )
6464
6565 clientConfig . ssl ?. should . deep . equal ( { } )
6666 } )
6767
6868 it ( 'converts ssl cert options' , function ( ) {
6969 const connectionString =
70- 'pg :///?sslcert=' +
70+ 'gaussdb :///?sslcert=' +
7171 __dirname +
7272 '/example.cert&sslkey=' +
7373 __dirname +
@@ -93,13 +93,13 @@ describe('toClientConfig', function () {
9393 } )
9494
9595 it ( 'handles invalid port' , function ( ) {
96- const config = parse ( 'postgres ://@boom:381/lala' )
96+ const config = parse ( 'gaussdb ://@boom:381/lala' )
9797 config . port = 'bogus'
9898 expect ( ( ) => toClientConfig ( config ) ) . to . throw ( )
9999 } )
100100
101101 it ( 'handles invalid sslconfig values' , function ( ) {
102- const config = parse ( 'postgres ://@boom/lala' )
102+ const config = parse ( 'gaussdb ://@boom/lala' )
103103 config . ssl = { }
104104 config . ssl . cert = null
105105 config . ssl . key = undefined
@@ -114,7 +114,7 @@ describe('toClientConfig', function () {
114114
115115describe ( 'parseIntoClientConfig' , function ( ) {
116116 it ( 'converts url' , function ( ) {
117- const clientConfig = parseIntoClientConfig ( 'postgres ://brian:pw@boom:381/lala' )
117+ const clientConfig = parseIntoClientConfig ( 'gaussdb ://brian:pw@boom:381/lala' )
118118
119119 clientConfig . user ?. should . equal ( 'brian' )
120120 clientConfig . password ?. should . equal ( 'pw' )
0 commit comments