diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 00b9586..c7d27f4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -88,6 +88,7 @@ jobs: pip3 install -U pip pytest pip3 install -U pip connexion pip3 install -U pip flask_testing + pip3 install -U pip pytest-dynamodb - name: Lint run: | diff --git a/terraform/README.md b/terraform/README.md index 06cd4a6..b68faa2 100644 --- a/terraform/README.md +++ b/terraform/README.md @@ -3,14 +3,14 @@ ## Dependencies -There are a handful of dependencies needed to deploy the entire Feature Translation Service +There are a handful of dependencies needed to deploy the entire Hydrocron * Terraform - deployment technology. >= Terraform v0.12.7 * AWS CLI - Amazon Web Service command line interface. >= aws-cli/1.11.120 * python3 environment - tested with python 3.7, needed for packaging the lambda functions. ## Soft dependencies -These are dependencies for deploying the entire Feature Translation Service that exist outside of this build. +These are dependencies for deploying the entire Hydrocron that exist outside of this build. * access key for NGAP environment * Terraform variables defined below diff --git a/terraform/feature-translation-service-lambda-iam.tf b/terraform/hydrocron-lambda-iam.tf similarity index 100% rename from terraform/feature-translation-service-lambda-iam.tf rename to terraform/hydrocron-lambda-iam.tf diff --git a/terraform/feature-translation-service-main.tf b/terraform/hydrocron-main.tf similarity index 99% rename from terraform/feature-translation-service-main.tf rename to terraform/hydrocron-main.tf index c0f5686..1a305ca 100644 --- a/terraform/feature-translation-service-main.tf +++ b/terraform/hydrocron-main.tf @@ -144,7 +144,7 @@ resource "aws_lambda_permission" "allow_hydrocron" { # API Gateway resource "aws_api_gateway_rest_api" "hydrocron-api-gateway" { name = "${local.ec2_resources_name}-api-gateway" - description = "API to access Feature Translation Service" + description = "API to access Hydrocron" body = templatefile( "${path.module}/api-specification-templates/hydrocron_aws_api.yml", { diff --git a/terraform/main.tf b/terraform/main.tf index 678c559..6c42f2d 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -2,7 +2,7 @@ # team members to control and update terraform state. terraform { backend "s3" { - key = "services/feature-translation-service/terraform.tfstate" + key = "services/hydrocron/terraform.tfstate" region = "us-west-2" } } diff --git a/tests/example_load_data.py b/tests/example_load_data.py index aa89d44..0a5f634 100644 --- a/tests/example_load_data.py +++ b/tests/example_load_data.py @@ -9,7 +9,8 @@ from decimal import Decimal import geopandas as gpd -from hydrocron_database import Hydrocron_DB +from pytest_dynamodb import factories + # ## Set up the connection to dynamoDB @@ -21,11 +22,12 @@ aws_secret_access_key='a', aws_session_token='fake_session_token', region_name='us-west-2') - -dyndb_resource = session.resource('dynamodb', endpoint_url='http://localhost:8000') -dynamo_instance = Hydrocron_DB(dyn_resource=dyndb_resource) +dyndb_resource = session.resource('dynamodb', endpoint_url='http://localhost:8001') + +dynamodb_my_proc = factories.dynamodb_proc(dynamodb_dir="/", port=8001, delay=True) +dyndb_resource = factories.dynamodb('dynamodb') # ## Create the table & load data diff --git a/tests/pytest.ini b/tests/pytest.ini new file mode 100644 index 0000000..606be16 --- /dev/null +++ b/tests/pytest.ini @@ -0,0 +1 @@ +dynamodb_port = 8000 \ No newline at end of file