On Sep 6, 2025, at 22:22, 'Matt DeLuco' via pgTAP Users <
pgtap...@googlegroups.com> wrote:
> Is there any means of specifying a Postgres user to pass along to the installcheck target?
Yes, pgTAP supports all of the usual libpq environment variables, including PGUSER. The test workflow takes advantage of this feature:
https://github.com/theory/pgtap/blob/5b0daf5922b2991ff83bbf5ba68c678eae71a408/.github/workflows/test.yml#L35
> I'm building a Docker image and it's convenient to just run everything as root including the installation of pgtap. However make installcheck fails because there is no "root" user in my instance of Postgres - can I pass a different username e.g. "postgres" to installcheck? (Auth is set to trust.)
You cannot start Postgres as root, so that user is not available to you. What Postgres image are you basing it on?
Best,
David