@@ -25,6 +25,7 @@ t.test('open connection and retrieves standard pg tables', async t => {
2525 const connector = new Connector ( ) ;
2626 const clientOpts = await connector . getOptions ( {
2727 instanceConnectionName : String ( process . env . POSTGRES_CONNECTION_NAME ) ,
28+ ipType : process . env . IP_TYPE || IpAddressTypes . PUBLIC ,
2829 } ) ;
2930 const client = new Client ( {
3031 ...clientOpts ,
@@ -53,7 +54,7 @@ t.test('open IAM connection and retrieves standard pg tables', async t => {
5354 const connector = new Connector ( ) ;
5455 const clientOpts = await connector . getOptions ( {
5556 instanceConnectionName : String ( process . env . POSTGRES_CONNECTION_NAME ) ,
56- ipType : IpAddressTypes . PUBLIC ,
57+ ipType : process . env . IP_TYPE || IpAddressTypes . PUBLIC ,
5758 authType : AuthTypes . IAM ,
5859 } ) ;
5960 const client = new Client ( {
@@ -83,6 +84,7 @@ t.test(
8384 const connector = new Connector ( ) ;
8485 const clientOpts = await connector . getOptions ( {
8586 instanceConnectionName : String ( process . env . POSTGRES_CAS_CONNECTION_NAME ) ,
87+ ipType : process . env . IP_TYPE || IpAddressTypes . PUBLIC ,
8688 } ) ;
8789 const client = new Client ( {
8890 ...clientOpts ,
@@ -116,6 +118,7 @@ t.test(
116118 instanceConnectionName : String (
117119 process . env . POSTGRES_CUSTOMER_CAS_CONNECTION_NAME
118120 ) ,
121+ ipType : process . env . IP_TYPE || IpAddressTypes . PUBLIC ,
119122 } ) ;
120123 const client = new Client ( {
121124 ...clientOpts ,
@@ -146,6 +149,7 @@ t.test(
146149 const connector = new Connector ( ) ;
147150 const clientOpts = await connector . getOptions ( {
148151 domainName : String ( process . env . POSTGRES_CUSTOMER_CAS_DOMAIN_NAME ) ,
152+ ipType : process . env . IP_TYPE || IpAddressTypes . PUBLIC ,
149153 } ) ;
150154 const client = new Client ( {
151155 ...clientOpts ,
@@ -176,6 +180,7 @@ t.test(
176180 const connector = new Connector ( ) ;
177181 const clientOpts = await connector . getOptions ( {
178182 domainName : String ( process . env . POSTGRES_CUSTOMER_CAS_INVALID_DOMAIN_NAME ) ,
183+ ipType : process . env . IP_TYPE || IpAddressTypes . PUBLIC ,
179184 } ) ;
180185 const client = new Client ( {
181186 ...clientOpts ,
0 commit comments