From ecae11a2a1947e900b45c7b192eb82f4185f40bc Mon Sep 17 00:00:00 2001 From: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com> Date: Wed, 2 Nov 2022 20:38:15 +0000 Subject: [PATCH] debug --- tests/NtfServerTests.hs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/NtfServerTests.hs b/tests/NtfServerTests.hs index 9e20cb9b3..b55004e7b 100644 --- a/tests/NtfServerTests.hs +++ b/tests/NtfServerTests.hs @@ -127,6 +127,7 @@ testNotificationSubscription (ATransport t) = print 5 -- receive notification APNSMockRequest {notification, sendApnsResponse = send'} <- atomically $ readTBQueue apnsQ + print 5.1 let APNSNotification {aps = APNSMutableContent {}, notificationData = Just ntfData'} = notification Right nonce' = C.cbNonce <$> ntfData' .-> "nonce" Right message = ntfData' .-> "message" @@ -135,12 +136,16 @@ testNotificationSubscription (ATransport t) = parse strP (AP.INTERNAL "error parsing PNMessageData") ntfDataDecrypted Right nMsgMeta = C.cbDecrypt rcvNtfDhSecret nmsgNonce encNMsgMeta Right NMsgMeta {msgId, msgTs} = parse smpP (AP.INTERNAL "error parsing NMsgMeta") nMsgMeta + print 5.2 smpServer `shouldBe` srv notifierId `shouldBe` nId send' APNSRespOk + print 5.3 -- receive message Resp "" _ (MSG RcvMessage {msgId = mId1, msgBody = EncRcvMsgBody body}) <- tGet1 rh + print 5.4 Right ClientRcvMsgBody {msgTs = mTs, msgBody} <- pure $ parseAll clientRcvMsgBodyP =<< first show (C.cbDecrypt rcvDhSecret (C.cbNonce mId1) body) + print 5.5 mId1 `shouldBe` msgId mTs `shouldBe` msgTs (msgBody, "hello") #== "delivered from queue"