Open aaguiarz opened 4 months ago
Might be better to have a flag explicitly stating if we are running locally rather than coupling the store id as such
@yogendrav-flwls thanks for the feedback!
If we had a parameter that forced running it in the server (e.g. --server), we'll need to either:
model test
.The behavior coul be to always run it locally by default and have a flag to run it in the server. If the flag is specified we ignore the model/tuples. If store-id is specified without the flag, we'd return an error.
Something like:
$ fga model test --tests store.fga.yaml --store-id 01HYX4FWK9P2VFRQ0YABYNQ447
Please specify the --server option to run the tests on the FGA server
$ fga model test --tests store.fga.yaml --store-id 01HYX4FWK9P2VFRQ0YABYNQ447 --server
Ignoring model + tuples, running tests on the FGA server
# Test Summary #
Tests 2/2 passing
Checks 4/4 passing
Would that make sense?
When you run
model test
using a file that has a model and we specify thestore-id
, thestore-id
is ignored and tests are run locally on the CLI.fga model test --tests store.fga.yaml --store-id 01HYX4FWK9P2VFRQ0YABYNQ447
I think that's the right behavior, but we should display a message clarifying it:
Note that if the
fga.yaml
file does NOT have a model, tests are run in the OpenFGA server.