go-pg / pg

Golang ORM with focus on PostgreSQL features and performance
https://pg.uptrace.dev/
BSD 2-Clause "Simplified" License
5.65k stars 401 forks source link

Add password environment variable for customizing running tests #1996

Closed DarrylWong closed 7 months ago

DarrylWong commented 7 months ago

In #1429, environment variables were added to read in postgres connection details for customizing tests. This change does the same but with a password variable.

It also removes the explicit user and password values from pgOptions, as Options init() will set it as postgres anyway if not specified. This also enables env variables to be used instead for those values.

elliotcourant commented 7 months ago

Seems reasonable to me, thank you @DarrylWong