forked from airbnb/streamalert
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[testing] sample fixtures/rules/conf, test runner scripts, and more
* Add functional test fixtures, rules, and conf for users to work off of * Fix a bug in the CLI test to strip all records of newline characters * Abstract the testing commands into shell scripts to be used by devs and Travis CI
- Loading branch information
Jack Naglieri
committed
Feb 14, 2017
1 parent
95f8019
commit 38ba931
Showing
14 changed files
with
161 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"kinesis": { | ||
"prefix_cluster1_stream_alert_kinesis": { | ||
"logs": [ | ||
"json_log", | ||
"syslog_log", | ||
"kv_log", | ||
"csv_log" | ||
] | ||
}, | ||
"prefix_cluster2_stream_alert_kinesis": { | ||
"logs": [ | ||
"json_log" | ||
] | ||
} | ||
}, | ||
"s3": { | ||
"my-s3-bucket-id": { | ||
"logs": [ | ||
"syslog_log" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
1 change: 1 addition & 0 deletions
1
...integration/fixtures/kinesis/prefix_cluster1_stream_alert_kinesis/non_trigger_events.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"name": "name-1", "host": "test-host-2", "data": {"time": "Jan 01, 2017"}} |
4 changes: 4 additions & 0 deletions
4
test/integration/fixtures/kinesis/prefix_cluster1_stream_alert_kinesis/trigger_events.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{"name": "name-1", "host": "test-host-1", "data": {"time": "Jan 01, 2017"}} | ||
Jan 01 12:00:12 test-host-1 sudo[151]: COMMAND sudo rm /tmp/test | ||
Jan 01 2017,1487095529,test-host-2,this is test data for rules,cluster 5 | ||
type=comm msg=fatal uid=100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"Records": [ | ||
{ | ||
"eventSource": "aws:kinesis", | ||
"eventSourceARN": "arn:aws:kinesis:region:account-id:stream/prefix_cluster1_stream_alert_kinesis", | ||
"kinesis": { | ||
"data": "eyJuYW1lIjogIm5hbWUtMSIsICJob3N0IjogInRlc3QtaG9zdC0yIiwgImRhdGEiOiB7InRpbWUiOiAiSmFuIDAxLCAyMDE3In19" | ||
} | ||
}, | ||
{ | ||
"eventSource": "aws:kinesis", | ||
"eventSourceARN": "arn:aws:kinesis:region:account-id:stream/prefix_cluster1_stream_alert_kinesis", | ||
"kinesis": { | ||
"data": "eyJuYW1lIjogIm5hbWUtMSIsICJob3N0IjogInRlc3QtaG9zdC0xIiwgImRhdGEiOiB7InRpbWUiOiAiSmFuIDAxLCAyMDE3In19" | ||
} | ||
}, | ||
{ | ||
"eventSource": "aws:kinesis", | ||
"eventSourceARN": "arn:aws:kinesis:region:account-id:stream/prefix_cluster1_stream_alert_kinesis", | ||
"kinesis": { | ||
"data": "SmFuIDAxIDEyOjAwOjEyIHRlc3QtaG9zdC0xIHN1ZG9bMTUxXTogQ09NTUFORCBzdWRvIHJtIC90bXAvdGVzdA==" | ||
} | ||
}, | ||
{ | ||
"eventSource": "aws:kinesis", | ||
"eventSourceARN": "arn:aws:kinesis:region:account-id:stream/prefix_cluster1_stream_alert_kinesis", | ||
"kinesis": { | ||
"data": "SmFuIDAxIDIwMTcsMTQ4NzA5NTUyOSx0ZXN0LWhvc3QtMix0aGlzIGlzIHRlc3QgZGF0YSBmb3IgcnVsZXMsY2x1c3RlciA1" | ||
} | ||
}, | ||
{ | ||
"eventSource": "aws:kinesis", | ||
"eventSourceARN": "arn:aws:kinesis:region:account-id:stream/prefix_cluster1_stream_alert_kinesis", | ||
"kinesis": { | ||
"data": "dHlwZT1jb21tIG1zZz1mYXRhbCB1aWQ9MTAw" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#! /bin/bash | ||
./stream_alert_cli.py lambda test --source kinesis --func alert |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#! /bin/bash | ||
nosetests test/unit --with-coverage --cover-package=stream_alert |