You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need to test the refresh. And we probably need a good set of unit tests to run on the database to check integrity. They can be ran after the refresh from datasets, refresh from objects, regularly, or ad hoc.
Will need to think through this, but basically we should run a set of tests on every table/view.
Two approaches
Testing with existing data
Make concept set TermHub Test Static -- just one version
Make sure it's not already in the database (make the test agnostic to using live or test databases)
Update modified_at for container and version (by updating a field like notes or limitations using actions update api)
Set archived = false
Launch db-refresh
Wait a little
Check for presence of expected data
a. concept_set_container, code_sets, concept_set_members, concept_set version_item
b. also derived table all_csets, cset_members_items, ... (not sure what else)
Check front end for presence of this concept set
Delete data from database
a. concept set container, codesets, conceptset version item, concept set members
a. rerun ddl tables (done in refresh.py)
Update archived = true on the container
Testing with new data
Have one concept set that we keep adding new versions to: TermHub Test New Version
Upload new version, include datetime in some metadata field
Update archived = false on the container
Launch db-refresh
Wait a little
Check for presence of expected data
a. concept_set_container, code_sets, concept_set version_item -- NOT concept_set_members, which won't be ready for a while
b. keep checking until concept_set_members records for new codeset_id show up
c. also check derived table all_csets, cset_members_items, ... (not sure what else)
Overview
We need to test the refresh. And we probably need a good set of unit tests to run on the database to check integrity. They can be ran after the refresh from datasets, refresh from objects, regularly, or ad hoc.
Will need to think through this, but basically we should run a set of tests on every table/view.
Two approaches
Testing with existing data
a. concept_set_container, code_sets, concept_set_members, concept_set version_item
b. also derived table all_csets, cset_members_items, ... (not sure what else)
a. concept set container, codesets, conceptset version item, concept set members
a. rerun ddl tables (done in refresh.py)
Testing with new data
a. concept_set_container, code_sets, concept_set version_item -- NOT concept_set_members, which won't be ready for a while
b. keep checking until concept_set_members records for new codeset_id show up
c. also check derived table all_csets, cset_members_items, ... (not sure what else)
Solving this will solve :
Specific things to test
The text was updated successfully, but these errors were encountered: