aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/Test/Graylog/UDP.hs
diff options
context:
space:
mode:
Diffstat (limited to 'test/Test/Graylog/UDP.hs')
-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!"