Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ianlongden committed Jan 27, 2023
1 parent d679de5 commit abce76a
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 9 deletions.
56 changes: 56 additions & 0 deletions .env.local.deb
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
COMPOSE_PROJECT_NAME=agr-literature-test

REG=100225593120.dkr.ecr.us-east-1.amazonaws.com
TAG=latest
ALLIANCE_RELEASE=latest

RESOURCE_DESCRIPTOR_URL='https://raw.githubusercontent.com/alliance-genome/agr_schemas/master/resourceDescriptors.yaml'

OKTA_DOMAIN='dev-30456587.okta.com/oauth2/default'
OKTA_API_AUDIENCE='api://default'

# Envstate should either be build or prod
ENV_STATE=test
HOST=agr_literature

PSQL_USERNAME=postgres
PSQL_PASSWORD=postgres
# postgres as internal to docker network
PSQL_HOST=postgres
PSQL_PORT=5433
PSQL_DATABASE=literature_subset

[email protected]
PGADMIN_DEFAULT_PASSWORD=password
PGADMIN_PORT=8882

SCHEMA='/path/to/schema.json'

ELASTICSEARCH_HOST=elasticsearch
ELASTICSEARCH_PORT=9200
ELASTICSEARCH_INDEX=test_references_index

REDIS_HOST=redis
REDIS_PORT=6379
REDIS_DB=0
REDIS_AUTH=password

API_PORT=8080
API_SERVER=literature_api

DEBEZIUM_VERSION=1.9
DEBEZIUM_CONNECTOR_HOST=dbz_connector
DEBEZIUM_CONNECTOR_PORT=8083
DEBEZIUM_INDEX_NAME=test_references_index
DEBEZIUM_KSQLDB_HOST=dbz_ksql_server
DEBEZIUM_KSQLDB_PORT=8088

OKTA_CLIENT_ID=
OKTA_CLIENT_SECRET=

TEST_CLEANUP=true

ALLIANCE_FMS_RELEASE=5.2.2
ID_MATI_URL=
LOG_PATH=./
XML_PATH=./
18 changes: 9 additions & 9 deletions tests/api/test_search_dates.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def initialize_elasticsearch():
date5_str = '2022-12-31'
date1 = int(datetime.strptime(date1_str, '%Y-%m-%d').timestamp()) * 1000000
date2 = int(datetime.strptime(date2_str, '%Y-%m-%d').timestamp()) * 1000000
date3 = int(datetime.strptime(date3_str, '%Y-%m-%d').timestamp()) * 1000000
# date3 = int(datetime.strptime(date3_str, '%Y-%m-%d').timestamp()) * 1000000
date4 = int(datetime.strptime(date4_str, '%Y-%m-%d').timestamp()) * 1000000
date5 = int(datetime.strptime(date5_str, '%Y-%m-%d').timestamp()) * 1000000
doc1 = {
Expand Down Expand Up @@ -107,14 +107,14 @@ def test_search_references_with_date_pubmed_arrive(self, initialize_elasticsearc
with TestClient(app) as client:
search_data = {
"query": "",
"facets_limits":{"pubmed_types.keyword":10,
"category.keyword":10,
"pubmed_publication_status.keyword":10,
"authors.name.keyword":10},
"author_filter":"",
"query_fields":"All",
"date_pubmed_arrive":["2022-01-01T00:00:00.000Z",
"2022-03-31T03:59:59.999Z"]
"facets_limits": {"pubmed_types.keyword": 10,
"category.keyword": 10,
"pubmed_publication_status.keyword": 10,
"authors.name.keyword": 10},
"author_filter": "",
"query_fields": "All",
"date_pubmed_arrive": ["2022-01-01T00:00:00.000Z",
"2022-03-31T03:59:59.999Z"]
}
res = client.post(url="/search/references/", json=search_data, headers=auth_headers).json()
assert "hits" in res
Expand Down

0 comments on commit abce76a

Please sign in to comment.