-
Notifications
You must be signed in to change notification settings - Fork 26
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
Improvement: Running multiple test files at once #423
Comments
is it okay if I pick this?:) |
@7h3-3mp7y-m4n I think it would be best for us to define this issue a little better before we ask someone to pick it up. But once we've done that it's all yours! @Oscmage I'm curious what type of file you're passing to the command, is it a file that solely contains tests (as the command states it supports) or are you passing a store file like this. My concern is that we may have overloaded the I believe that the value is more separating tests to help reduce file size, have individual "scenarios" per test file, or team ownership per test file, within a single authorization model project. I'm wondering whether this issue could be broken down into a few parts that would support running multiple test files and help separate some boundaries between test files vs store files and local testing vs remote testing:
|
@ewanharris even if i agree that receiving multiple store.fga.yaml files with different models is not very useful, I also don't see why supporting it would be an issue. The reason OpenFGA users end create multiple fga.yaml files is usually because each of them tests a specific set of types (or modules), and in that case it makes sense to reuse the same model, the same tuples, and have different tests per file. |
@ewanharris I would like to pass multiple files that looks like this https://github.com/openfga/cli/blob/main/example/model.fga.yaml . Or if you have a better way to achieve this I am happy to hear those! What I am trying to solve is that we have multiple types in a model, we'd just like to split the tests for readability reasons and maintenance reasons. Basically all of the different files that I want to run have the same If I have 10 types it is natural to have 10 different test files to easily see the tests for each type. One huge test file makes it harder to read/maintain and reason about. Happy to elaborate more if this is not clear enough. Again, there might be better ways to solve this problem, very open for that! |
@Oscmage thanks for that feedback! I had imagine that was your usecase but just wanted to confirm. I put together what the files could look like based on my comment this gist, instead of storing tests in a store file and running multiple store files you would instead list out your test files similar to how we support a The main benefit I see of splitting into tests files over multiple store files is that you wouldn't need to copy around the |
It would be lovely to run multiple test files at once similar to the github action.
Something like
The github action got this feature, example:
The text was updated successfully, but these errors were encountered: