-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(test): support referenvcing a tuple_file instead of tuples #212
Conversation
5932a95
to
19281ff
Compare
@@ -43,6 +50,7 @@ type ModelTest struct { | |||
Name string `json:"name" yaml:"name"` | |||
Description string `json:"description" yaml:"description"` | |||
Tuples []client.ClientContextualTupleKey `json:"tuples" yaml:"tuples"` | |||
TupleFile string `json:"tuple_file" yaml:"tuple_file"` //nolint:tagliatelle |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would a more appropriate name for this have been TuplesFile
? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I considered that as it will most likely always contain multiple tuples but I wasn't entirely sold on it, happy to PR changing it if there's consensus for that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description
Adds support for using
tuple_file
instead oftuples
in a test file. The file can be either ayaml
orjson
syntax. All tuple files are loaded upfront before running tests so that we can ensure that the test run will be functional and all errors are collated and presented to the user like below.The
model.fga.yaml
example has been updated to show this and also demonstrate the two file types that are supported.References
Closes #179
Review Checklist
main