Commit 1c42fabf authored by Matt Wise's avatar Matt Wise
Browse files

Use RESOURCE_PREFIX instead of ENVIRONMENT for dynamodb in integration tests...

Use RESOURCE_PREFIX instead of ENVIRONMENT for dynamodb in integration tests as ENVIRONMENT is reserved
parent 7d4f07b1
Pipeline #11353 failed with stages
in 25 minutes and 9 seconds
......@@ -63,4 +63,4 @@ DOMAIN=<YOUR_DOMAIN>
WORKFLOW_HOST=<YOUR_API_URL>/api/workflow/v1/
DYNAMO_DB_REGION=<YOUR_REGION>
DYNAMO_DB_ENDPOINT=<YOUR_ENDPOINT>
ENVIRONMENT=<YOUR_ENVIRONMENT>
RESOURCE_PREFIX=<YOUR_ENVIRONMENT>
......@@ -58,3 +58,4 @@ AWS_COGNITO_AUTH_PARAMS_PASSWORD=<YOUR_AUTHORIZED_USER_PASSWORD>
DEFAULT_DATA_PARTITION_ID_TENANT1=<default-tenant>
WORKFLOW_HOST=http://localhost:8080
FINISHED_WORKFLOW_ID=finished-workflow-id
RESOURCE_PREFIX=<YOUR_ENVIRONMENT>
# Copyright 2020 Amazon Web Services
# Copyright 2020 Amazon Web Services
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
......
......@@ -36,7 +36,7 @@ export WORKFLOW_HOST=${WORKFLOW_URL%?}
export DOMAIN=example.com
export DYNAMO_DB_REGION=us-east-1
export DYNAMO_DB_ENDPOINT=https://dynamodb.us-east-1.amazonaws.com
export ENVIRONMENT=$RESOURCE_PREFIX
export RESOURCE_PREFIX=$RESOURCE_PREFIX
export INT_TEST_DAG_NAME=my_first_dag
export DEFAULT_DATA_PARTITION_ID_TENANT1=int-test-workflow
......
......@@ -18,7 +18,7 @@ import org.opengroup.osdu.core.aws.dynamodb.DynamoDBQueryHelper;
public class DynamoSetupUtil {
private final static String ENVIRONMENT = "ENVIRONMENT";
private final static String RESOURCE_PREFIX = "RESOURCE_PREFIX";
private final static String DYNAMO_DB_REGION = "DYNAMO_DB_REGION";
private final static String DYNAMO_DB_ENDPOINT = "DYNAMO_DB_ENDPOINT";
private final static String ADMIN_USER = "ADMIN_USER";
......@@ -31,7 +31,7 @@ public class DynamoSetupUtil {
DynamoDBQueryHelper queryHelper;
public String insertWorkflowStatus() throws Exception {
String tablePrefix = String.format("%s%s", System.getenv(ENVIRONMENT), "-");
String tablePrefix = String.format("%s%s", System.getenv(RESOURCE_PREFIX), "-");
String dynamoDbRegion = System.getenv(DYNAMO_DB_REGION);
String dynamoDbEndpoint = System.getenv(DYNAMO_DB_ENDPOINT);
queryHelper = new DynamoDBQueryHelper(dynamoDbEndpoint, dynamoDbRegion, tablePrefix);
......@@ -52,7 +52,7 @@ public class DynamoSetupUtil {
}
public String insertIngestionStrategy() throws Exception {
String tablePrefix = String.format("%s%s", System.getenv(ENVIRONMENT), "-");
String tablePrefix = String.format("%s%s", System.getenv(RESOURCE_PREFIX), "-");
String dynamoDbRegion = System.getenv(DYNAMO_DB_REGION);
String dynamoDbEndpoint = System.getenv(DYNAMO_DB_ENDPOINT);
queryHelper = new DynamoDBQueryHelper(dynamoDbEndpoint, dynamoDbRegion, tablePrefix);
......
......@@ -18,7 +18,7 @@ import org.opengroup.osdu.core.aws.dynamodb.DynamoDBQueryHelper;
public class WorkflowStatusUtil {
private final static String ENVIRONMENT = "ENVIRONMENT";
private final static String RESOURCE_PREFIX = "RESOURCE_PREFIX";
private final static String DYNAMO_DB_REGION = "DYNAMO_DB_REGION";
private final static String DYNAMO_DB_ENDPOINT = "DYNAMO_DB_ENDPOINT";
......@@ -29,7 +29,7 @@ public class WorkflowStatusUtil {
DynamoDBQueryHelper queryHelper;
public String insertWorkflowStatus() throws Exception {
String tablePrefix = String.format("%s%s", System.getenv(ENVIRONMENT), "-");
String tablePrefix = String.format("%s%s", System.getenv(RESOURCE_PREFIX), "-");
String dynamoDbRegion = System.getenv(DYNAMO_DB_REGION);
String dynamoDbEndpoint = System.getenv(DYNAMO_DB_ENDPOINT);
queryHelper = new DynamoDBQueryHelper(dynamoDbEndpoint, dynamoDbRegion, tablePrefix);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment