File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ Note that IPR tests will try to use the BCGSC production GraphKB API by default.
5151If you want to test interaction with a different instance, you will need to
5252set the GraphKB variables.
5353
54- Set EXCLUDE vars to 1 if you don't want to run these tests.
54+ Set EXCLUDE vars to 1 if you don't want to run these tests.
5555ONCOKB and BCGSC tests are enabled by default.
5656
5757``` bash
@@ -61,17 +61,21 @@ export IPR_URL='http://localhost:8081/api'
6161export GRAPHKB_USER=' pori_admin'
6262export GRAPHKB_PASS=' pori_admin'
6363export GRAPHKB_URL=' http://localhost:8080/api'
64- EXCLUDE_BCGSC_TESTS = 1
65- EXCLUDE_ONCOKB_TESTS = 1
64+ export EXCLUDE_BCGSC_TESTS= 1
65+ export EXCLUDE_ONCOKB_TESTS= 1
6666```
6767
6868If you want to run tests that upload reports to a live IPR instance,
6969specify the url of the IPR API you want to use and set the test var to 1.
7070These tests are disabled by default.
7171
72+ The created reports are deleted by default. If you want to keep them,
73+ set DELETE_UPLOAD_TEST_REPORTS to 0 in the env.
74+
7275``` bash
7376export IPR_TEST_URL=' http://localhost:8081/api'
74- INCLUDE_UPLOAD_TESTS = 1
77+ export INCLUDE_UPLOAD_TESTS=1
78+ export DELETE_UPLOAD_TEST_REPORTS=0
7579```
7680
7781``` bash
Original file line number Diff line number Diff line change 1515
1616EXCLUDE_BCGSC_TESTS = os .environ .get ("EXCLUDE_BCGSC_TESTS" ) == "1"
1717EXCLUDE_ONCOKB_TESTS = os .environ .get ("EXCLUDE_ONCOKB_TESTS" ) == "1"
18- INCLUDE_UPLOAD_TESTS = os .environ .get ("INCLUDE_UPLOAD_TESTS" , 0 ) == "1"
18+ INCLUDE_UPLOAD_TESTS = os .environ .get ("INCLUDE_UPLOAD_TESTS" , "0" ) == "1"
19+ DELETE_UPLOAD_TEST_REPORTS = os .environ .get ("DELETE_UPLOAD_TEST_REPORTS" , "1" ) == "1"
1920
2021
2122def get_test_spec ():
@@ -154,9 +155,9 @@ def loaded_reports(tmp_path_factory) -> Generator:
154155 "async" : (async_patient_id , async_loaded_report ),
155156 }
156157 yield loaded_reports_result
157- return
158- ipr_conn .delete (uri = f"reports/{ loaded_report ['reports' ][0 ]['ident' ]} " )
159- ipr_conn .delete (uri = f"reports/{ async_loaded_report ['reports' ][0 ]['ident' ]} " )
158+ if DELETE_UPLOAD_TEST_REPORTS :
159+ ipr_conn .delete (uri = f"reports/{ loaded_report ['reports' ][0 ]['ident' ]} " )
160+ ipr_conn .delete (uri = f"reports/{ async_loaded_report ['reports' ][0 ]['ident' ]} " )
160161
161162
162163def get_section (loaded_report , section_name ):
You can’t perform that action at this time.
0 commit comments