Skip to content

Commit

Permalink
for kyle
Browse files Browse the repository at this point in the history
  • Loading branch information
ayan1229 committed Jan 28, 2025
1 parent 18c34f0 commit 353864a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 11 deletions.
19 changes: 10 additions & 9 deletions config/qa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@ ENVIRONMENT: qa
LOG_LEVEL: info

# POSTGRES CONNECTION DETAILS
# POSTGRES_USER, POSTGRES_PSWD, POSTGRES_ADMIN_USER and POSTGRES_ADMIN_PSWD must be configured in secrets file
# POSTGRES_USER, POSTGRES_PSWD, POSTGRES_ADMIN_USER and POSTGRES_ADMIN_PSWD must be configured in secrets file
POSTGRES_HOST: sfr-new-metadata-production-cluster.cluster-cvy7z512hcjg.us-east-1.rds.amazonaws.com
POSTGRES_NAME: dcdw_qa
POSTGRES_PORT: '5432'
POSTGRES_PORT: "5432"

# REDIS CONFIGURATION
# REDIS_HOST configured as part of ECS deployment
REDIS_PORT: '6379'
REDIS_PORT: "6379"

# ELASTICSEARCH CONFIGURATION
# ELASTICSEARCH_INDEX, ELASTICSEARCH_HOST, ELASTICSEARCH_SCHEME, ELASTICSEARCH_PORT must be configured in secrets file
ELASTICSEARCH_TIMEOUT: '10'
ELASTICSEARCH_TIMEOUT: "10"

# RABBITMQ CONFIGURATION
# RABBIT_USER and RABBIT_PSWD must be configured in secrets file
RABBIT_HOST: qa.rmq.aws.nypl.org
RABBIT_PORT: '5672'
RABBIT_PORT: "5672"
RABBIT_VIRTUAL_HOST: /sfr
RABBIT_EXCHANGE: sfrIngestExchange
OCLC_QUEUE: sfrOCLCCatalog
Expand All @@ -30,7 +30,7 @@ FILE_ROUTING_KEY: sfrS3Files

# OCLC CONFIGURATION
# OCLC API keys must be configured in secrets file
OCLC_QUERY_LIMIT: '390000'
OCLC_QUERY_LIMIT: "390000"

# AWS CONFIGURATION
# AWS_ACCESS and AWS_SECRET must be configured in secrets file
Expand All @@ -41,7 +41,7 @@ FILE_BUCKET: drb-files-qa
# NYPL_BIB_USER and NYPL_BIB_PSWD must be configured in secrets file
NYPL_BIB_HOST: bib-service-production-rep.cvy7z512hcjg.us-east-1.rds.amazonaws.com
NYPL_BIB_NAME: bib_service_production
NYPL_BIB_PORT: '5432'
NYPL_BIB_PORT: "5432"

# NYPL Location Code Lookup
NYPL_LOCATIONS_BY_CODE: https://nypl-core-objects-mapping-qa.s3.amazonaws.com/by_sierra_location.json
Expand All @@ -51,8 +51,9 @@ NYPL_LOCATIONS_BY_CODE: https://nypl-core-objects-mapping-qa.s3.amazonaws.com/by
NYPL_API_CLIENT_TOKEN_URL: https://isso.nypl.org/oauth/token

# DRB API Credentials
DRB_API_HOST: 'drb-api-qa.nypl.org'
DRB_API_PORT: '80'
DRB_API_HOST: "drb-api-qa.nypl.org"
DRB_API_PORT: "80"
DRB_API_URL: https://drb-api-qa.nypl.org

# Bardo CCE API URL
BARDO_CCE_API: http://sfr-c-ecsal-14v3injrieoy5-258691445.us-east-1.elb.amazonaws.com/search/
Expand Down
5 changes: 5 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ def seed_test_data(db_manager):
else:
test_record = Record(**test_data)
db_manager.session.add(test_record)

process_args = ('complete', None, None, str(test_data['uuid']), None)

cluster_process = ClusterProcess(*process_args)
cluster_process.runProcess()

db_manager.session.commit()

Expand Down
6 changes: 4 additions & 2 deletions tests/integration/api/test_get_edition.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import pytest
import os
import requests
import json
from .constants import API_URL
from .utils import assert_response_status

API_URL = os.getenv("DRB_API_URL")

@pytest.mark.integration
@pytest.mark.parametrize("endpoint, expected_status", [
("/editions/{seeded_edition_id}", 200),
Expand All @@ -12,7 +14,7 @@
("/editions/", 404),
("/editions/%$@!*", 400)
])
def test_get_edition(endpoint, expected_status, seeded_edition_id):
def test_get_edition(endpoint, expected_status, seeded_edition_id):
url = API_URL + endpoint.format(seeded_edition_id=seeded_edition_id)
response = requests.get(url)

Expand Down

0 comments on commit 353864a

Please sign in to comment.