File tree 2 files changed +19
-16
lines changed
2 files changed +19
-16
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,8 @@ import { $ } from "bun";
4
4
import { bunExe , isCI , withoutAggressiveGC } from "harness" ;
5
5
import path from "path" ;
6
6
7
- if ( ! isCI ) {
7
+ const hasPsql = Bun . which ( "psql" ) ;
8
+ if ( ! isCI && hasPsql ) {
8
9
require ( "./bootstrap.js" ) ;
9
10
10
11
// macOS location: /opt/homebrew/var/postgresql@14/pg_hba.conf
Original file line number Diff line number Diff line change @@ -4,20 +4,22 @@ import { sql as SQL } from "bun";
4
4
5
5
const TLS_POSTGRES_DATABASE_URL = getSecret ( "TLS_POSTGRES_DATABASE_URL" ) ;
6
6
7
- test ( "tls (explicit)" , async ( ) => {
8
- const sql = new SQL ( {
9
- url : TLS_POSTGRES_DATABASE_URL ! ,
10
- tls : true ,
11
- adapter : "postgresql" ,
12
- } ) ;
7
+ if ( TLS_POSTGRES_DATABASE_URL ) {
8
+ test ( "tls (explicit)" , async ( ) => {
9
+ const sql = new SQL ( {
10
+ url : TLS_POSTGRES_DATABASE_URL ! ,
11
+ tls : true ,
12
+ adapter : "postgresql" ,
13
+ } ) ;
13
14
14
- const [ { one, two } ] = await sql `SELECT 1 as one, '2' as two` ;
15
- expect ( one ) . toBe ( 1 ) ;
16
- expect ( two ) . toBe ( "2" ) ;
17
- } ) ;
15
+ const [ { one, two } ] = await sql `SELECT 1 as one, '2' as two` ;
16
+ expect ( one ) . toBe ( 1 ) ;
17
+ expect ( two ) . toBe ( "2" ) ;
18
+ } ) ;
18
19
19
- test ( "tls (implicit)" , async ( ) => {
20
- const [ { one, two } ] = await SQL `SELECT 1 as one, '2' as two` ;
21
- expect ( one ) . toBe ( 1 ) ;
22
- expect ( two ) . toBe ( "2" ) ;
23
- } ) ;
20
+ test ( "tls (implicit)" , async ( ) => {
21
+ const [ { one, two } ] = await SQL `SELECT 1 as one, '2' as two` ;
22
+ expect ( one ) . toBe ( 1 ) ;
23
+ expect ( two ) . toBe ( "2" ) ;
24
+ } ) ;
25
+ }
You can’t perform that action at this time.
0 commit comments