Rasmus Dencker
06/22/2023, 8:49 AMrequest failed: rpc error: code = Internal desc = Policy check failed
. I'm sure it's a silly mistake I made, but how do I get the test server to log the actual error to further debug?Charith (Cerbos)
Charith (Cerbos)
logger := zaptest.NewLogger(t)
zap.ReplaceGlobals(logger)
Full code listing is on this gist: https://gist.github.com/charithe/f060269f676fde8f8a54374cf8a36eeaRasmus Dencker
06/22/2023, 9:45 AMRasmus Dencker
06/22/2023, 10:00 AMfailed to get check for [john.default]: failed to get compilation units: SQL logic error: no such table: policy_ancestor (1)
When I changed :memory:
to file:CERBOS?mode=memory&cache=shared&_fk=1
it started working consistently. I'm not entirely sure what the difference is, but the latter is what I usually use for in-memory sqlites (as I didn't know about the first option).Charith (Cerbos)
:memory:
should be a distinct database according to https://www.sqlite.org/inmemorydb.html 🤔 Not sure why that didn't work. Anyway, I am glad you found a fix.Rasmus Dencker
06/22/2023, 10:05 AMRasmus Dencker
06/22/2023, 10:06 AM