def test_generate_cluster_advanced(self): """CLI - Terraform Generate Advanced Cluster""" tf_cluster = generate.generate_cluster(config=self.config, cluster_name='advanced') cluster_keys = {'module', 'output'} advanced_modules = { 'classifier_advanced_lambda', 'classifier_advanced_iam', 'cloudwatch_logs_destination_advanced', # us-west-1 because of the flow logs module in the default (us-west-1) region 'cloudwatch_logs_destination_advanced_us-west-1', # us-east-2 and us-west-2 because of the explicit cloudwatch_destinations # in these regions 'cloudwatch_logs_destination_advanced_us-east-2', 'cloudwatch_logs_destination_advanced_us-west-2', 'cloudwatch_monitoring_advanced', 'kinesis_advanced', 'kinesis_events_advanced', 'flow_logs_advanced', 'cloudtrail_advanced', 'cloudtrail_s3_events_unit-test_advanced_unit-test-advanced-streamalert-cloudtrail', 'cloudwatch_events_advanced', 's3_events_unit-test_advanced_unit-test-bucket_data', 's3_events_unit-test_advanced_unit-test_cloudtrail_data' } assert_equal(set(tf_cluster['module'].keys()), advanced_modules) assert_equal(set(tf_cluster.keys()), cluster_keys)
def test_generate_cluster_test(self): """CLI - Terraform Generate Test Cluster""" tf_cluster = generate.generate_cluster(config=self.config, cluster_name='test') cluster_keys = {'module', 'output'} test_modules = { 'classifier_test_lambda', 'classifier_test_iam', 'cloudwatch_monitoring_test', 'kinesis_test', 'kinesis_events_test', 's3_events_unit-test_test_unit-test-bucket' } assert_equal(set(tf_cluster['module']), test_modules) assert_equal(set(tf_cluster), cluster_keys)