Skip to content

Commit f7452c5

Browse files
committed
try this
1 parent 5104cda commit f7452c5

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

.github/workflows/test.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,15 @@ jobs:
4646
4747
echo "/usr/lib/postgresql/18/bin" >> $GITHUB_PATH
4848
sudo systemctl start postgresql
49-
sudo -u postgres psql -c "ALTER USER postgres PASSWORD NULL;"
50-
PG_HBA="/etc/postgresql/18/main/pg_hba.conf" grep -q '127.0.0.1/32 trust' "$PG_HBA" ||echo "host all all 127.0.0.1/32 trust" | sudo tee -a "$PG_HBA" >/dev/null
51-
grep -q '::1/128 trust' "$PG_HBA" || echo "host all all ::1/128 trust" | sudo tee -a "$PG_HBA" >/dev/null
49+
50+
51+
sudo -u postgres psql -tAc "select version(); show data_directory; show port; show listen_addresses;"
52+
sudo -u postgres createuser --superuser --createdb --createrole golden_axe
53+
sudo tee -a /etc/postgresql/18/main/pg_hba.conf >/dev/null <<'EOF'
54+
local all all trust
55+
host all all 127.0.0.1/32 trust
56+
host all all ::1/128 trust
57+
EOF
5258
sudo systemctl reload postgresql
5359
sudo -u postgres psql -c "SELECT version();"
5460
sudo -u postgres psql -tAc "SHOW port;"

shared/src/pg.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ pub mod test {
4747
const MAX_AGE: Duration = Duration::from_secs(300);
4848

4949
pub async fn new(schema: &str) -> Pool {
50-
let admin_db_url = "postgres://postgres:@localhost:5432/golden_axe_test";
50+
let admin_db_url = "postgres://golden_axe:@localhost:5432/golden_axe_test";
5151
let admin = super::new_pool(admin_db_url, 1).unwrap();
5252
cleanup_old_dbs(&admin).await;
5353

0 commit comments

Comments
 (0)