Skip to content

fix(tests): add qc to ALL_SCHEMA_ROLES in conftest to prevent DuplicateObject on re-runs#181

Open
Vishmayraj wants to merge 1 commit into
istSOS:mainfrom
Vishmayraj:fix/tests-including-qc-role
Open

fix(tests): add qc to ALL_SCHEMA_ROLES in conftest to prevent DuplicateObject on re-runs#181
Vishmayraj wants to merge 1 commit into
istSOS:mainfrom
Vishmayraj:fix/tests-including-qc-role

Conversation

@Vishmayraj
Copy link
Copy Markdown
Contributor

All TestAuth tests were erroring at setup with psycopg2.errors.DuplicateObject: role "qc" already exists.

Tracing the failure back, the qc role was introduced in the auth SQL to support Quality Control workflows (SELECT/UPDATE on Observation, INSERT on Commit), but ALL_SCHEMA_ROLES in conftest was never updated to include it. This meant recreate_database never cleaned up qc between runs, and the second run would crash when istsos_auth.sql tried to CREATE ROLE "qc" again.

Fix is a one-liner: add "qc" to ALL_SCHEMA_ROLES so the cleanup loop in recreate_database drops and re-creates it along with the other roles on every test run.

The commit in context is 03d3235

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant