diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/Test/Graylog/UDP.hs | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/test/Test/Graylog/UDP.hs b/test/Test/Graylog/UDP.hs index 67da6fe..d62f11a 100644 --- a/test/Test/Graylog/UDP.hs +++ b/test/Test/Graylog/UDP.hs | |||
@@ -1,13 +1,23 @@ | |||
1 | {-# LANGUAGE OverloadedStrings #-} | ||
2 | |||
1 | module Test.Graylog.UDP where | 3 | module Test.Graylog.UDP where |
2 | 4 | ||
3 | import Test.Tasty | 5 | import Test.Tasty |
4 | import Test.Tasty.HUnit | 6 | import Test.Tasty.HUnit |
5 | 7 | ||
8 | import Graylog.UDP | ||
9 | |||
6 | tests :: TestTree | 10 | tests :: TestTree |
7 | tests = testGroup "Test.Graylog.UDP" | 11 | tests = testGroup "Test.Graylog.UDP" |
8 | [ testCase "Validation: Something" case_validateSomething | 12 | {-[ testCase "Send: Sample" case_validateSomething-} |
13 | [ testCase "Send sample message." case_sendSample | ||
9 | ] | 14 | ] |
10 | 15 | ||
11 | case_validateSomething :: IO () | 16 | case_sendSample :: IO () |
12 | case_validateSomething = return () | 17 | case_sendSample = do |
13 | 18 | eglog <- openGraylog "192.168.99.100" "12201" defaultChunkSize | |
19 | case eglog of | ||
20 | Left e -> assertFailure e | ||
21 | Right g -> sendLog g sample | ||
22 | where | ||
23 | sample = simpleGelf "localhost" "hello world!" | ||