diff options
author | AndrewRademacher <andrewrademacher@gmail.com> | 2016-02-27 21:54:20 -0600 |
---|---|---|
committer | AndrewRademacher <andrewrademacher@gmail.com> | 2016-02-27 21:54:20 -0600 |
commit | b23afe7b9089b3177d9aee994464f72e52efbd2a (patch) | |
tree | 8769449a7268c8f3e9c3cfb1eb666ce6c7735189 /test | |
parent | 640e69ef77aea530af800741e453b05e2802d188 (diff) | |
download | haskell-graylog-b23afe7b9089b3177d9aee994464f72e52efbd2a.tar.gz haskell-graylog-b23afe7b9089b3177d9aee994464f72e52efbd2a.tar.zst haskell-graylog-b23afe7b9089b3177d9aee994464f72e52efbd2a.zip |
Successful test of un-chunked message.
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!" | ||