All tests were passing before, but I updated a couple packages and now a bunch of tests are failing because the tests can't find any of the tables in my local/testing database (issue is not just with the users table but with all tables in my db). The package updates happened via Dependabot security fixes, and when the tests were run on the TravisCI server they all passed. Because everything was passing, I already merged the updates into the development branch. Nothing was failing until I pulled the branch and tried to run tests locally.
I can see the database and all the tables it can't find in pgAdmin. I have tried:
- uninstalling/reinstalling Postgres
- dropping/recreating the database and re-running migrations in
knexto recreate all tables - re-installing
pgandknex - ensuring that the schema is in the
search_pathas suggested here - ensuring that my psql user has schema-level privileges as suggested here
Any other ideas what I could try?
\conninfoat thepsqlprompt it shows me the expected user and database name, but i don't know how to confirm if that's how my tests are connection. i do see the correct username and database name in the.envvariables that are populating myknexfile.jsbut if there's somewhere else I should check let me know.config/knex.jspulls its config fromknexfile.js, which is populated by variables in.env. everything in those files looks correct and nothing in any of them has changed recently -- this app has been live for several years and this problem just started yesterday so i don't think it's a base configuration issue. any other ideas about why the tests might not be able to find the tables?