Skip to content

Commit

Permalink
[pr] second round of feeback
Browse files Browse the repository at this point in the history
  • Loading branch information
ryandeivert committed Jul 17, 2017
1 parent 21cb539 commit d0de948
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 23 deletions.
2 changes: 1 addition & 1 deletion stream_alert/alert_processor/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def handler(event, context):
function_name = context.function_name

# Return the current list of statuses back to the caller
return list(status for status in run(event, region, function_name, config))
return list(run(event, region, function_name, config))

def run(alert, region, function_name, config):
"""Send an Alert to its described outputs.
Expand Down
15 changes: 0 additions & 15 deletions terraform/modules/tf_stream_alert/s3.tf

This file was deleted.

2 changes: 1 addition & 1 deletion test/unit/stream_alert_cli/test_outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

def test_load_output_config():
"""Load outputs configuration"""
config = load_outputs_config()
config = load_outputs_config('test/unit/conf')
loaded_config_keys = sorted(config.keys())

expected_config_keys = [u'aws-lambda', u'aws-s3', u'pagerduty', u'phantom', u'slack']
Expand Down
13 changes: 7 additions & 6 deletions test/unit/stream_alert_rule_processor/test_sink.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,13 @@ def test_json_from_dict():
json_message = sink._json_dump(alert)

# Test with single alert entry
assert_equal(json_message, '{"record": {"record_data_key02_01": ' \
'"record_data_value02_01", "record_data_key01_01": "record_data_value01_01"}, ' \
'"metadata": {"source": {"service": "payload_service_01", ' \
'"entity": "payload_entity_01"}, "rule_name": "test_rule_01", ' \
'"type": "payload_type_01", "log": "payload_data_01", ' \
'"outputs": "rule.outputs_01"}}')
assert_equal(json_message, '{"record": {"record_data_key02_01": '
'"record_data_value02_01", "record_data_key01_01": '
'"record_data_value01_01"}, "metadata": {"source": '
'{"service": "payload_service_01", "entity": '
'"payload_entity_01"}, "rule_name": "test_rule_01", '
'"type": "payload_type_01", "log": "payload_data_01", '
'"outputs": "rule.outputs_01"}}')

def get_payload(byte_size):
"""Returns a base64 encoded random payload of (roughly) byte_size length
Expand Down

0 comments on commit d0de948

Please sign in to comment.