Type ordinary integration probe HTTP traffic
This commit is contained in:
parent
390434bed1
commit
cc5c47f2ce
1 changed files with 1022 additions and 661 deletions
|
|
@ -11,7 +11,7 @@ import Database.PostgreSQL.Simple (Only (..))
|
|||
import Nuthatch.Config (Config (..), loadConfig)
|
||||
import qualified Nuthatch.Db as Db
|
||||
import Nuthatch.Probe.Assert
|
||||
import Nuthatch.Probe.Curl
|
||||
import Nuthatch.Probe.Http
|
||||
import Nuthatch.Redis
|
||||
import Nuthatch.S3
|
||||
import Nuthatch.Types
|
||||
|
|
@ -19,6 +19,7 @@ import System.Environment (setEnv)
|
|||
|
||||
main :: IO ()
|
||||
main = do
|
||||
client <- newProbeClient
|
||||
profile <- requireEnv "NUTHATCH_FIXTURE_PROFILE"
|
||||
lane <- requireEnv "NUTHATCH_FIXTURE_LANE"
|
||||
pgConnection <- requireEnv "NUTHATCH_PG_CONN"
|
||||
|
|
@ -39,9 +40,9 @@ main = do
|
|||
cacheGet redis "lane-canary" >>=
|
||||
assertEqual "coordination lane canary" (Just (B8.pack profile))
|
||||
issuer <- requireEnv "NUTHATCH_OIDC_ISSUER"
|
||||
discovery <- curl [issuer <> "/.well-known/openid-configuration"]
|
||||
assertEqual "OIDC discovery status" 200 (curlStatus discovery)
|
||||
assertContains "OIDC discovery issuer" "\"issuer\"" (curlBody discovery)
|
||||
discovery <- get client (issuer <> "/.well-known/openid-configuration")
|
||||
assertEqual "OIDC discovery status" 200 (probeStatus discovery)
|
||||
assertContains "OIDC discovery issuer" "\"issuer\"" (probeBody discovery)
|
||||
store <- newS3 (cfgS3 config)
|
||||
let key = ObjectKey "lane-canary"
|
||||
body = BL.fromStrict (B8.pack profile)
|
||||
|
|
|
|||
Loading…
Reference in a new issue