, aeson
, aeson-casing
+ , network
, scientific
, text
, time
, vector
+
+test-suite test-state
+ type: exitcode-stdio-1.0
+ main-is: Main.hs
+ hs-source-dirs: test
+ default-language: Haskell2010
+
+ ghc-options: -Wall -threaded -with-rtsopts=-N -rtsopts
+
+ other-modules: Test.Graylog.UDP
+
+ build-depends: base ==4.*
+
+ , graylog
+
+ , aeson
+ , aeson-casing
+ , network
+ , scientific
+ , tasty
+ , tasty-hunit
+ , text
+ , time
+ , vector
+
import Data.Aeson (ToJSON (..), Value (..), genericToJSON,
toJSON)
import Data.Aeson.Casing
-import Data.Scientific
import Data.Text (Text)
import Data.Time
import Data.Typeable
-import Data.Vector
import GHC.Generics
data GELF
= GELF
- { _gelfVersion :: Version
- , _gelfHost :: Text
- , _gelfShortMessage :: Text
- , _gelfFullMessage :: Maybe Text
- , _gelfTimestamp :: Maybe UTCTime
- , _gelfLevel :: Maybe SyslogLevel
- , _gelfLine :: Maybe Word
- , _gelfFile :: Maybe Text
- , _gelfAdditionalFields :: Vector Field
+ { _gelfVersion :: Version
+ , _gelfHost :: Text
+ , _gelfShortMessage :: Text
+ , _gelfFullMessage :: Maybe Text
+ , _gelfTimestamp :: Maybe UTCTime
+ , _gelfLevel :: Maybe SyslogLevel
+ , _gelfLine :: Maybe Word
+ , _gelfFile :: Maybe Text
}
deriving (Show, Typeable, Generic)
toJSON Notice = Number 5
toJSON Informational = Number 6
toJSON Debug = Number 7
-
---
-
-data Field
- = FieldString Text
- | FieldNumber Scientific
- deriving (Eq, Show, Typeable, Generic)
-
-instance ToJSON Field where
- toJSON (FieldString s) = String s
- toJSON (FieldNumber n) = Number n
-
--- /dev/null
+module Test.Graylog.UDP where
+
+import Test.Tasty
+import Test.Tasty.HUnit
+
+tests :: TestTree
+tests = testGroup "Test.Graylog.UDP"
+ [ testCase "Validation: Something" case_validateSomething
+ ]
+
+case_validateSomething :: IO ()
+case_validateSomething = return ()
+