Skip to content

Silence noisy db-tests runs #1548

Open
Open
@skovati

Description

@skovati

When running :db-tests:e2eTests, init_*.sql files are run over and over again, since we entirely clear out DB schemas after each test class. Some artifacts aren't being cleaned up correctly though, so psql emits warnings that either there is a transaction in progress:

psql:./aerie/deployment/postgres-init-db/sql/init_permissions.sql:8: WARNING:  there is already a transaction in progress
psql:./aerie/deployment/postgres-init-db/sql/init_db_users.sql:28: WARNING:  no privileges could be revoked for "public"

Additionally, it looks like env vars for permission users aren't being passed / substituted correctly, since we get a sql syntax error:

psql:./aerie/deployment/postgres-init-db/sql/init_db_users.sql:34: ERROR:  syntax error at or near ":"
LINE 1: ...ant select on all tables in schema permissions to :"gateway_...

Weirdly, this doesn't cause any failing tests, but is certainly leaky and incorrect to some extent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    databaseAnything related to the databasetestAdding missing tests, correcting existing tests, or test infrastructure

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions