hashicorp / sentinel-sdk

This SDK allows developers to extend Sentinel to source external information for use in their policies.
Mozilla Public License 2.0
51 stars 13 forks source link

framework: Report keys properly on Get error messages #13

Closed vancluever closed 5 years ago

vancluever commented 6 years ago

There's currently an off-by-one error on the error reporting with keys. Example: A get or call error on import.foo.bar("baz") would only report "foo", and import.foo("bar") would just return a blank string ("").

This corrects that. It also shifts the tests over to allow the validation of the error message as well, and adds a little bit more coverage.