From b23afe7b9089b3177d9aee994464f72e52efbd2a Mon Sep 17 00:00:00 2001 From: AndrewRademacher Date: Sat, 27 Feb 2016 21:54:20 -0600 Subject: Successful test of un-chunked message. --- test/Test/Graylog/UDP.hs | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'test') 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 @@ +{-# LANGUAGE OverloadedStrings #-} + module Test.Graylog.UDP where import Test.Tasty import Test.Tasty.HUnit +import Graylog.UDP + tests :: TestTree tests = testGroup "Test.Graylog.UDP" - [ testCase "Validation: Something" case_validateSomething + {-[ testCase "Send: Sample" case_validateSomething-} + [ testCase "Send sample message." case_sendSample ] -case_validateSomething :: IO () -case_validateSomething = return () - +case_sendSample :: IO () +case_sendSample = do + eglog <- openGraylog "192.168.99.100" "12201" defaultChunkSize + case eglog of + Left e -> assertFailure e + Right g -> sendLog g sample + where + sample = simpleGelf "localhost" "hello world!" -- cgit v1.2.3