typelevel/cats-effect

TestKit: how to set the Clock?

Open

#3,309 建立於 2022年12月6日

在 GitHub 查看
 (7 留言) (0 反應) (0 負責人)Scala (572 fork)batch import
:mushroom: enhancementgood first issue

倉庫指標

Star
 (2,230 star)
PR 合併指標
 (平均合併 21天 23小時) (30 天內合併 18 個 PR)

描述

Use case: I have am writing an implementation of IETF http message signatures. The spec has a lot of examples of signed HTTP messages signed with a validity period. To test the library I would like to set the Clock to a specific valid time and to invalid times, to check that the implementation is correct, i.e. that it fails a correct signature when the date is no longer valid.

I have spent at a few hours looking through the isses that led to the test runtime including the very nice documentation, looked at the source code, issues that led to it. But I could not find out how to do that... I may be missing something obvious...

貢獻者指南