-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TST] Add integration test against local test graph (#357)
* Added `recipes` and `neurobagel_examples` as submodules * Set up test graph Co-authored-by: Sebastian Urchs <[email protected]> Co-authored-by: Alyssa Dai <[email protected]> * [ENH] Added integration test works only with the test graph enabled * [ENH] Default disable integration tests With a special flag. Otherwise the tests fail if we do not also launch the test graph * Add note in GH workflow to enable integration test * [FIX] Remove unused ENV variable * Mock fewer internal VARs to get the SPARQL query to run * register & set default behaviour for integration marker in pytest.ini * update instructions to run integration tests * update dependabot config --------- Co-authored-by: rmanaem <[email protected]> Co-authored-by: Alyssa Dai <[email protected]>
- Loading branch information
1 parent
101ff91
commit ea2ce77
Showing
11 changed files
with
117 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[submodule "recipes"] | ||
path = recipes | ||
url = https://github.com/neurobagel/recipes | ||
[submodule "neurobagel_examples"] | ||
path = neurobagel_examples | ||
url = https://github.com/neurobagel/neurobagel_examples |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# ---- PROJECT NAME ---- | ||
COMPOSE_PROJECT_NAME=neurobagel_test_node | ||
|
||
# ---- CONFIGURATION FOR graph ---- | ||
# Replace DBUSER with the username you want to set for your graph database user | ||
# NB_GRAPH_USERNAME=DBUSER | ||
# Replace my_db with the name you want to give your graph database | ||
# NB_GRAPH_DB=repositories/my_db | ||
# Replace ./data with the path to your JSONLD files | ||
LOCAL_GRAPH_DATA=./recipes/data | ||
|
||
# Additional configurable parameters - uncomment to change the defaults | ||
# Change NB_GRAPH_PORT_HOST if port 7200 is already in use on the machine | ||
# NB_GRAPH_PORT_HOST=7200 | ||
# Replace ./secrets with the directory path containing the text files with your desired | ||
# secure passwords for GraphDB (NB_GRAPH_ADMIN_PASSWORD.txt and NB_GRAPH_PASSWORD.txt) | ||
# NB_GRAPH_SECRETS_PATH=./secrets | ||
# --------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
services: | ||
test_graph: | ||
extends: | ||
file: recipes/docker-compose.yml | ||
service: graph | ||
volumes: | ||
- "graphdb_home:/opt/graphdb/home" | ||
- "./recipes/scripts:/usr/src/neurobagel/scripts" | ||
- ".test_env:/usr/src/neurobagel/.env" | ||
- "./recipes/vocab:/usr/src/neurobagel/vocab" | ||
- "./neurobagel_examples/data-upload/pheno-bids-derivatives:/data" | ||
environment: | ||
NB_GRAPH_USERNAME: "DBUSER" | ||
NB_GRAPH_DB: "repositories/my_db" | ||
secrets: | ||
- db_admin_password | ||
- db_user_password | ||
|
||
secrets: | ||
db_admin_password: | ||
file: ./recipes/secrets/NB_GRAPH_ADMIN_PASSWORD.txt | ||
db_user_password: | ||
file: ./recipes/secrets/NB_GRAPH_PASSWORD.txt | ||
|
||
volumes: | ||
graphdb_home: |
Submodule neurobagel_examples
added at
d44875
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[pytest] | ||
markers = | ||
integration: mark integration tests that need the test graph to run | ||
; Default to not running tests with the integration marker | ||
addopts = -m "not integration" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters