https://cerbos.dev logo
Title
r

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.
c

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.
r

Rob Crowe

08/15/2022, 10:29 AM
👍🏻 want me to add an issue?
c

Charith (Cerbos)

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

Charith (Cerbos)

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

Alex Olivier (Cerbos)

08/22/2022, 2:34 PM
r

Rob Crowe

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