Title
#community
Rob Crowe

Rob Crowe

08/15/2022, 9:43 AM
For policies that have a time based element to the condition, for example
timestamp(P.attr.some_claim).timeSince() < duration("1h")
. Is there a good way to make those policy tests deterministic?
P.attr.some_claim
is hardcoded RFC3339 in the test &
timeSince()
uses the current server time.
Charith (Cerbos)

Charith (Cerbos)

08/15/2022, 9:55 AM
Unfortunately, no. Thanks for raising it though. It's certainly useful to be able to control the time during tests.
Rob Crowe

Rob Crowe

08/15/2022, 10:29 AM
👍🏻 want me to add an issue?
Charith (Cerbos)

Charith (Cerbos)

08/15/2022, 10:51 AM
Sure. Go ahead.
9:47 AM
That was speedy @Charith (Cerbos) 🙂 🚀 Thanks
9:48 AM
Nice touch with global and local
Charith (Cerbos)

Charith (Cerbos)

08/16/2022, 9:53 AM
Thanks for raising the issue. We'll try to get a new release out soon.
Alex Olivier (Cerbos)

Alex Olivier (Cerbos)

08/22/2022, 2:34 PM
Rob Crowe

Rob Crowe

08/22/2022, 4:20 PM
As soon as I saw it in #announcements it went straight out to prod 😄
4:21 PM
thanks for coming back to me here, appreciated 🙇🏻