Skip to content

fix(tests): use correct env var name for PostgreSQL server#782

Open
haoyu-haoyu wants to merge 1 commit intoOHDSI:mainfrom
haoyu-haoyu:fix/test-env-var-mismatch
Open

fix(tests): use correct env var name for PostgreSQL server#782
haoyu-haoyu wants to merge 1 commit intoOHDSI:mainfrom
haoyu-haoyu:fix/test-env-var-mismatch

Conversation

@haoyu-haoyu
Copy link
Copy Markdown

The skip guard in setup.R and test-executeDdl.R checks CDM5_POSTGRESQL_SERVER, but all actual connection details use CDMDDLBASE_POSTGRESQL_SERVER. This mismatch means tests try to run in environments where CDM5_POSTGRESQL_SERVER is set (common in OHDSI CI) but CDMDDLBASE_POSTGRESQL_SERVER is not, leading to failures instead of a clean skip.

Changed both occurrences to CDMDDLBASE_POSTGRESQL_SERVER so the guard matches the actual variable that getConnectionDetails() reads.

Closes #719

The skip guard checks CDM5_POSTGRESQL_SERVER, but the actual
connection details use CDMDDLBASE_POSTGRESQL_SERVER.  This causes
tests to run (not skip) in environments where CDM5_POSTGRESQL_SERVER
is set but CDMDDLBASE_POSTGRESQL_SERVER is not, leading to failures.

Closes OHDSI#719
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.

Unit tests check if CDM5_POSTGRESQL_SERVER exists, but then use CDMDDLBASE_POSTGRESQL_SERVER

1 participant