diff options
author | diosmosis <benakamoorthi@fastmail.fm> | 2014-02-15 20:32:12 +0400 |
---|---|---|
committer | diosmosis <benakamoorthi@fastmail.fm> | 2014-02-15 20:32:12 +0400 |
commit | 37aa9c131865e8a7905977c1a1bdad0ded5a05e1 (patch) | |
tree | a268e8c33b1579177d6e491c681652f85643a1a3 /misc | |
parent | 48218768d826ba305049e408fb4f0b1761bbecaa (diff) |
Fix import_logs python tests.
Diffstat (limited to 'misc')
-rw-r--r-- | misc/log-analytics/tests/logs/icecast2.log | 30 | ||||
-rw-r--r-- | misc/log-analytics/tests/tests.py | 10 |
2 files changed, 10 insertions, 30 deletions
diff --git a/misc/log-analytics/tests/logs/icecast2.log b/misc/log-analytics/tests/logs/icecast2.log index e95b2be12d..095f83d574 100644 --- a/misc/log-analytics/tests/logs/icecast2.log +++ b/misc/log-analytics/tests/logs/icecast2.log @@ -1,29 +1 @@ -190.173.174.50 - - [06/Nov/2013:07:01:11 -0300] "GET /Mitre790.mp3 HTTP/1.1" 200 12605220 "http://tunein.com/radio/Radio-Mitre-(Buenos-Aires)-790-s25151/" "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.101 Safari/537.36" 1807 -187.59.60.129 - - [06/Nov/2013:07:01:11 -0300] "GET /la100.mp3 HTTP/1.1" 200 100800 "-" "Mozilla/1.0 SHOUTcast example" 74 -190.195.176.128 - - [06/Nov/2013:07:01:11 -0300] "GET /Mitre790.mp3 HTTP/1.1" 200 94120 "-" "Mozilla/1.0 SHOUTcast example" 79 -186.52.31.168 - - [06/Nov/2013:07:01:12 -0300] "GET /Mitre790.mp3 HTTP/1.1" 200 65180 "-" "Mozilla/1.0 SHOUTcast example" 1 -190.245.91.244 - - [06/Nov/2013:07:01:12 -0300] "GET /favicon.ico HTTP/1.1" 200 1566 "-" "Mozilla/5.0 (BlackBerry; U; BlackBerry 9300; es) AppleWebKit/534.8+ (KHTML, like Gecko) Version/6.0.0.534 Mobile Safari/534.8+" 0 -186.57.0.248 - - [06/Nov/2013:07:01:12 -0300] "GET /Mitre790.mp3 HTTP/1.1" 200 67592 "-" "Mozilla/1.0 SHOUTcast example" 0 -190.229.138.250 - - [06/Nov/2013:07:01:13 -0300] "GET /Mitre790.mp3 HTTP/1.1" 200 17593776 "-" "stagefright/1.2 (Linux;Android 4.2.2)" 2584 -190.195.176.128 - - [06/Nov/2013:07:01:13 -0300] "GET /Mitre790.mp3 HTTP/1.0" 200 65072 "-" "-" 1 -190.3.145.2 - - [06/Nov/2013:07:01:13 -0300] "GET /Mitre790.mp3 HTTP/1.0" 200 66332 "-" "-" 0 -96.8.4.106 - - [06/Nov/2013:07:01:13 -0300] "GET /Mitre790.mp3 HTTP/1.0" 200 65108 "-" "NSPlayer/10.0.0.3702 WMFSDK/10.0" 0 -200.81.124.150 - - [06/Nov/2013:07:01:14 -0300] "GET /Mitre790.mp3 HTTP/1.1" 200 101360 "-" "Lavf52.111.0" 81 -181.168.218.179 - - [06/Nov/2013:07:01:14 -0300] "GET /Mitre790.aac?type=.flv HTTP/1.1" 200 100462 "http://reproductor.cienradios.com.ar/player/Mitre_AM790" "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.101 Safari/537.36" 11 -181.164.252.181 - - [06/Nov/2013:07:01:14 -0300] "GET /la100.mp3 HTTP/1.0" 200 64460 "-" "-" 0 -200.117.4.69 - - [06/Nov/2013:07:01:14 -0300] "GET /Hot_100_32000.aac?type=.flv HTTP/1.1" 200 310899 "http://reproductor.cienradios.com.ar/player/Hot_100" "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.101 Safari/537.36" 57 -190.194.182.253 - - [06/Nov/2013:07:01:15 -0300] "GET /Mitre790.mp3 HTTP/1.0" 200 65324 "-" "-" 1 -190.3.133.92 - - [06/Nov/2013:07:01:15 -0300] "GET /Mitre790.mp3 HTTP/1.1" 200 65412 "-" "AppleCoreMedia/1.0.0.11B511 (iPad; U; CPU OS 7_0_3 like Mac OS X; es_es)" 1 -201.253.37.210 - - [06/Nov/2013:07:01:15 -0300] "GET /Mitre790.mp3 HTTP/1.1" 200 11282684 "-" "Lavf52.111.0" 1692 -200.81.38.242 - - [06/Nov/2013:07:01:16 -0300] "GET /Mitre790.mp3 HTTP/1.1" 200 66692 "-" "Mozilla/1.0 SHOUTcast example" 1 -181.28.140.212 - - [06/Nov/2013:07:01:16 -0300] "GET /Mitre790.mp3 HTTP/1.1" 200 548573 "-" "Lavf52.111.0" 145 -186.0.199.34 - - [06/Nov/2013:07:01:17 -0300] "GET /Mitre790.mp3 HTTP/1.0" 200 60461 "-" "Mozilla/1.0 SHOUTcast example" 0 -186.57.0.248 - - [06/Nov/2013:07:01:17 -0300] "GET /Mitre790.mp3 HTTP/1.0" 200 67484 "-" "-" 75 -190.225.47.112 - - [06/Nov/2013:07:01:18 -0300] "GET /Mitre790.mp3 HTTP/1.1" 200 20160 "-" "Dalvik/1.6.0 (Linux; U; Android 4.0.4; ST21a Build/11.0.A.4.22)" 1 -190.220.59.10 - - [06/Nov/2013:07:01:18 -0300] "GET /mitre810.mp3 HTTP/1.1" 200 934605 "file:///Applications/Install/7F7E3F68-BA3A-E011-854C-00237DE2DB9E/Install/" "WMPlayer/10.0.0.364 guid/3300AD50-2C39-46C0-AE0A-AC7B8159E203" 79 -181.46.26.81 - - [06/Nov/2013:07:01:19 -0300] "GET /Mitre790.mp3 HTTP/1.1" 200 43440 "-" "stagefright/1.2 (Linux;Android 4.0.4)" 4 -181.47.135.187 - - [06/Nov/2013:07:01:20 -0300] "GET /la100.mp3 HTTP/1.0" 200 65144 "-" "-" 69 -186.62.130.56 - - [06/Nov/2013:07:01:20 -0300] "GET /Mitre790.aac?type=.flv HTTP/1.1" 200 11681411 "http://reproductor.cienradios.com.ar/player/Scripts/jwPlayer/jwplayer.flash.swf" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/6.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; InfoPath." 4277 -74.82.68.161 - - [06/Nov/2013:07:01:20 -0300] "GET /la100.mp3 HTTP/1.1" 200 846420 "-" "Mozilla/5.0 (BlackBerry; U; BlackBerry 9780; es) AppleWebKit/534.8+ (KHTML, like Gecko) Version/6.0.0.448 Mobile Safari/534.8+" 170 -186.13.3.54 - - [06/Nov/2013:07:01:21 -0300] "GET /Mitre790.mp3 HTTP/1.1" 200 65360 "-" "Mozilla/1.0 SHOUTcast example" 0 -179.210.11.51 - - [06/Nov/2013:07:01:22 -0300] "GET /Mitre790.mp3 HTTP/1.1" 200 66728 "-" "Dalvik/1.6.0 (Linux; U; Android 4.2.2; GT-I9192 Build/JDQ39)" 1
\ No newline at end of file +1.2.3.4 - - [10/Feb/2012:16:42:07 -0500] "GET / HTTP/1.0" 301 368 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11" 1807
\ No newline at end of file diff --git a/misc/log-analytics/tests/tests.py b/misc/log-analytics/tests/tests.py index 477334c3fe..5499a509bd 100644 --- a/misc/log-analytics/tests/tests.py +++ b/misc/log-analytics/tests/tests.py @@ -61,6 +61,9 @@ class Options(object): excluded_paths = [] excluded_useragents = [] enable_bots = [] + force_lowercase_path = False + included_paths = [] + enable_http_errors = False class Config(object): @@ -248,7 +251,12 @@ def check_nginx_json_groups(groups): assert groups['length'] == 192 assert groups['user_agent'] == 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17' assert groups['date'] == '2013-10-10T16:52:00+02:00' - + +def check_icecast2_groups(groups): + check_ncsa_extended_groups(groups) + + assert groups['session_time'] == '1807' + def check_match_groups(format_name, groups): symbols = globals() check_function = symbols['check_' + format_name + '_groups'] |