def test_config_invalid_datasources(): """Shared - Config Validator - Invalid Datasources""" # Load a valid config config = get_valid_config() # Set the sources value to contain an invalid data source ('sqs') config['sources'] = {'sqs': {'queue_1': {}}} _validate_config(config)
def test_config_no_logs_key(): """Shared - Config Validator - No Logs Key in Source""" # Load a valid config config = get_valid_config() # Remove everything from the sources entry config['sources']['kinesis']['stream_1'] = {} _validate_config(config)
def test_config_empty_logs_list(): """Shared - Config Validator - Empty Logs List in Source""" # Load a valid config config = get_valid_config() # Set the logs key to an empty list config['sources']['kinesis']['stream_1']['logs'] = [] _validate_config(config)
def test_config_no_schema(): """Shared - Config Validator - No Schema in Log""" # Load a valid config config = get_valid_config() # Remove the 'schema' keys from the config config['logs']['json_log'].pop('schema') config['logs']['csv_log'].pop('schema') _validate_config(config)
def test_config_no_parsers(): """Shared - Config Validator - No Parser in Log""" # Load a valid config config = get_valid_config() # Remove the 'parser' keys from the config config['logs']['json_log'].pop('parser') config['logs']['csv_log'].pop('parser') _validate_config(config)