Skip to content

Commit be0d532

Browse files
committed
test: correctly handle MYSQL_HOST environment variable
1 parent f5bcc65 commit be0d532

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/options.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// test/options.php -- HotCRP conference options for test databases
33

44
global $Opt;
5+
$Opt["dbHost"] = getenv("MYSQL_HOST") ?: "localhost";
56
$Opt["dbName"] = "hotcrp_testdb";
67
$Opt["dbPassword"] = "m5LuaN23j26g";
78
$Opt["shortName"] = "Testconf I";
@@ -16,7 +17,7 @@
1617
$Opt["smartScoreCompare"] = true;
1718
$Opt["timezone"] = "America/New_York";
1819
$Opt["postfixEOL"] = "\n";
19-
$Opt["contactdbDsn"] = "mysql://hotcrp_testdb:m5LuaN23j26g@localhost/hotcrp_testdb_cdb";
20+
$Opt["contactdbDsn"] = "mysql://hotcrp_testdb:m5LuaN23j26g@" . $Opt["dbHost"] . "/hotcrp_testdb_cdb";
2021
$Opt["obsoletePasswordInterval"] = 1;
2122
$Opt["include"][] = "?test/localoptions.php";
2223
$Opt["hooks"]["send_mail"] = "MailChecker::send_hook";

0 commit comments

Comments
 (0)