Class ConnectorStackProvider


  • public abstract class ConnectorStackProvider
    extends Object
    Responsible for providing a CloudFormation stack for the connector being tested.
    • Constructor Detail

      • ConnectorStackProvider

        public ConnectorStackProvider​(String stackName,
                                      TestConfig testConfig)
    • Method Detail

      • getAccessPolicy

        protected abstract Optional<software.amazon.awscdk.services.iam.PolicyDocument> getAccessPolicy()
        Must be overridden to facilitate getting the lambda function's IAM access policy. The latter sets up access to multiple connector-specific AWS services (e.g. DynamoDB, Elasticsearch etc...)
        Returns:
        A policy document object.
      • setEnvironmentVars

        protected abstract void setEnvironmentVars​(Map environmentVars)
        Must be overridden to facilitate the setting of the lambda function's environment variables key-value pairs (e.g. "connection_string":"redshift://jdbc:redshift://..."). See individual connector for the expected list of environment variables.
      • setSpecificResource

        protected abstract void setSpecificResource​(software.amazon.awscdk.core.Stack stack)
        Must be overridden (can be a no-op) to facilitate the creation of a connector-specific CloudFormation stack resource (e.g. DB table) using AWS CDK.
        Parameters:
        stack - The current CloudFormation stack.
      • getLambdaFunctionName

        protected String getLambdaFunctionName()
        Gets the name of the lambda function generated by the Integration-Test module.
        Returns:
        The name of the lambda function.
      • getStack

        protected org.testng.internal.collections.Pair<software.amazon.awscdk.core.App,​software.amazon.awscdk.core.Stack> getStack()
        Gets the CloudFormation stack programmatically using AWS CDK.
        Returns:
        CloudFormation stack object.