aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/Test
diff options
context:
space:
mode:
authorAndrewRademacher <andrewrademacher@gmail.com>2016-02-27 21:54:20 -0600
committerAndrewRademacher <andrewrademacher@gmail.com>2016-02-27 21:54:20 -0600
commitb23afe7b9089b3177d9aee994464f72e52efbd2a (patch)
tree8769449a7268c8f3e9c3cfb1eb666ce6c7735189 /test/Test
parent640e69ef77aea530af800741e453b05e2802d188 (diff)
downloadhaskell-graylog-b23afe7b9089b3177d9aee994464f72e52efbd2a.tar.gz
haskell-graylog-b23afe7b9089b3177d9aee994464f72e52efbd2a.tar.zst
haskell-graylog-b23afe7b9089b3177d9aee994464f72e52efbd2a.zip
Successful test of un-chunked message.
Diffstat (limited to 'test/Test')
-rw-r--r--test/Test/Graylog/UDP.hs18
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
1module Test.Graylog.UDP where 3module Test.Graylog.UDP where
2 4
3import Test.Tasty 5import Test.Tasty
4import Test.Tasty.HUnit 6import Test.Tasty.HUnit
5 7
8import Graylog.UDP
9
6tests :: TestTree 10tests :: TestTree
7tests = testGroup "Test.Graylog.UDP" 11tests = 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
11case_validateSomething :: IO () 16case_sendSample :: IO ()
12case_validateSomething = return () 17case_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!"