11import { TestEnv } from "../../src/env" ;
22import { buildPhpApp } from "../../src/index" ;
33import * as fs from "node:fs" ;
4+ import path from "node:path" ;
5+ import { projectRoot } from "../utils/path" ;
46
57test . concurrent ( "sql-connectivity" , async ( ) => {
68 const env = TestEnv . fromEnv ( ) ;
7- const filePath = "./ fixtures/ php/ mysql-check.php";
9+ const filePath = path . join ( projectRoot , " fixtures" , " php" , " mysql-check.php") ;
810 const testCode = await fs . promises . readFile ( filePath , "utf-8" ) ;
911
1012 // Validate that DB credentials aren't setup without specifying to have it
1113 {
1214 console . log ( "== Setting up environment without SQL ==" ) ;
1315 const want = "Missing required SQL environment variables" ;
1416 const withoutSqlSpec = buildPhpApp ( testCode ) ;
15- const withoutSqlInfo = await env . deployApp ( withoutSqlSpec ) ;
17+ const withoutSqlInfo = await env . deployApp ( withoutSqlSpec , { noWait : true } ) ;
1618 const res = await env . fetchApp ( withoutSqlInfo , "/results" ) ;
1719 const got = await res . text ( ) ;
1820 expect ( got ) . toContain ( want ) ;
@@ -36,7 +38,7 @@ test.concurrent("sql-connectivity", async () => {
3638 } ,
3739 } ,
3840 } ) ;
39- const withSqlInfo = await env . deployApp ( withSqlSpec ) ;
41+ const withSqlInfo = await env . deployApp ( withSqlSpec , { noWait : true } ) ;
4042
4143 {
4244 const res = await env . fetchApp ( withSqlInfo , "/results" ) ;
0 commit comments