1
1
mirror of https://github.com/github/semantic.git synced 2024-12-25 07:55:12 +03:00

Fix up test/spec

This commit is contained in:
Timothy Clem 2018-06-13 17:03:15 -07:00
parent d4e5c79119
commit 9b45928227

View File

@ -3,7 +3,8 @@ module Semantic.Stat.Spec (spec) where
import Control.Exception import Control.Exception
import Network.Socket hiding (recv) import Network.Socket hiding (recv)
import Network.Socket.ByteString import Network.Socket.ByteString
import Semantic.Stat import Semantic.Telemetry.Stat
import Semantic.Config
import System.Environment import System.Environment
import SpecHelpers import SpecHelpers
@ -80,3 +81,7 @@ spec = do
sendStat client { statsClientUDPSocket = clientSoc } (increment "app.metric" []) sendStat client { statsClientUDPSocket = clientSoc } (increment "app.metric" [])
info <- recv serverSoc 1024 info <- recv serverSoc 1024
info `shouldBe` "semantic.app.metric:1|c" info `shouldBe` "semantic.app.metric:1|c"
-- Defaults are all drive by defaultConfig.
defaultStatsClient :: IO StatsClient
defaultStatsClient = defaultConfig >>= \Config{..} -> statsClient (addrHost configStatsAddr) (addrPort configStatsAddr) configAppName