@@ -54,23 +54,23 @@ testMetricsEndpoint :: Brig -> Http ()
54
54
testMetricsEndpoint brig = do
55
55
let p1 = " /self"
56
56
p2 uid = " /users/" <> uid <> " /clients"
57
- p3 = " /onboarding/v3 "
57
+ p3 = " /login "
58
58
beforeSelf <- getCount " /self" " GET"
59
59
beforeClients <- getCount " /users/:uid/clients" " GET"
60
- beforeProperties <- getCount " /onboarding/v3 " " POST"
61
- uid <- userId <$> randomUser brig
60
+ beforeProperties <- getCount " /login " " POST"
61
+ ( uid, Just email) <- ( \ u -> ( userId u, userEmail u)) <$> randomUser brig
62
62
uid' <- userId <$> randomUser brig
63
63
_ <- get (brig . path p1 . zAuthAccess uid " conn" . expect2xx)
64
64
_ <- get (brig . path (p2 $ toByteString' uid) . zAuthAccess uid " conn" . expect2xx)
65
65
_ <- get (brig . path (p2 $ toByteString' uid') . zAuthAccess uid " conn" . expect2xx)
66
- _ <- post (brig . path p3 . zAuthAccess uid " conn " . json ' x ' . expect2xx)
67
- _ <- post (brig . path p3 . zAuthAccess uid " conn " . json ' x ' . expect2xx)
66
+ _ <- post (brig . path p3 . contentJson . queryItem " persist " " true " . json (defEmailLogin email) . expect2xx)
67
+ _ <- post (brig . path p3 . contentJson . queryItem " persist " " true " . json (defEmailLogin email) . expect2xx)
68
68
countSelf <- getCount " /self" " GET"
69
69
liftIO $ assertEqual " /self was called once" (beforeSelf + 1 ) countSelf
70
70
countClients <- getCount " /users/:uid/clients" " GET"
71
71
liftIO $ assertEqual " /users/:uid/clients was called twice" (beforeClients + 2 ) countClients
72
- countProperties <- getCount " /onboarding/v3 " " POST"
73
- liftIO $ assertEqual " /onboarding/v3 was called twice" (beforeProperties + 2 ) countProperties
72
+ countProperties <- getCount " /login " " POST"
73
+ liftIO $ assertEqual " /login was called twice" (beforeProperties + 2 ) countProperties
74
74
where
75
75
getCount endpoint m = do
76
76
rsp <- responseBody <$> get (brig . path " i/metrics" )
0 commit comments