Skip to content

Commit

Permalink
local files in case travis or similar is running
Browse files Browse the repository at this point in the history
  • Loading branch information
daisieh committed Apr 18, 2023
1 parent 07ca8d6 commit 746f790
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services:
- docker

env:
- MINIO_ROOT_USER=minioadmin MINIO_ROOT_PASSWORD=minioadmin MINIO_URL=http://localhost:9000 MINIO_ACCESS_KEY=minioadmin MINIO_SECRET_KEY=minioadmin HTSGET_TEST_KEY=thisisatest USE_MINIO_SANDBOX=True DB_PATH=data/files.db
- MINIO_ROOT_USER=minioadmin MINIO_ROOT_PASSWORD=minioadmin MINIO_URL=http://localhost:9000 MINIO_ACCESS_KEY=minioadmin MINIO_SECRET_KEY=minioadmin HTSGET_TEST_KEY=thisisatest USE_MINIO_SANDBOX=True DB_PATH=data/files.db SERVER_LOCAL_DATA=/home/travis/build/CanDIG/htsget_app/data

before_install:
- docker pull minio/minio
Expand Down
3 changes: 2 additions & 1 deletion tests/test_htsget_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
REPO_DIR = os.path.abspath(f"{os.path.dirname(os.path.realpath(__file__))}/..")
sys.path.insert(0, os.path.abspath(f"{REPO_DIR}/htsget_server"))
LOCAL_FILE_PATH = os.path.abspath(f"{REPO_DIR}/data/files")
SERVER_LOCAL_DATA = os.getenv("SERVER_LOCAL_DATA", "/app/htsget_server/data")
from config import PORT

HOST = os.getenv("TESTENV_URL", f"http://localhost:{PORT}")
Expand Down Expand Up @@ -126,7 +127,7 @@ def test_post_update():
obj = response.json()

url = f"{HOST}/ga4gh/drs/v1/objects"
access_url = f"file:////app/htsget_server/data/files/NA18537.vcf.gz" # this is local within the htsget server container, not from where we're running pytest
access_url = f"file:///{SERVER_LOCAL_DATA}/files/NA18537.vcf.gz" # this is local within the htsget server container, not from where we're running pytest
obj["access_methods"] = [
{
"type": "file",
Expand Down

0 comments on commit 746f790

Please sign in to comment.