You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When defining the location of the model_file in a test yaml file, the expected behaviour is that the path to the model_file is relative to the test file where it is referenced but seems to be relative to the directory where the command originated.
For example: I have a folder structure as below:
src
schema.fga
tests
tests.yaml
data.yaml
In my tests.yaml file I define the location of the model_file as ../src/schema.fga.
If I execute this command: fga model test --tests .\tests\tests.fga.yaml
from the root directory of the repo I get the below error: Error: failed to read file ../src/schema.fga due to open ../src/schema.fga: The system cannot find the path specified.
If I execute the similar command: fga model test --tests .\tests.fga.yaml then the command successfully executes.
The text was updated successfully, but these errors were encountered:
I’ve tested the issue by forking the repository, building and running the CLI as described.
After reproducing the steps in a clean environment, I found that the behavior
aligns with the expected output and the issue appears to be non-existent.
Here are the details I tested:
downloaded your sample data with git clone https://github.com/openfga/sample-stores.git openfga-sample-stores
reproduced the directory structure in the issue using your sample data (see below)
When defining the location of the
model_file
in a test yaml file, the expected behaviour is that the path to themodel_file
is relative to the test file where it is referenced but seems to be relative to the directory where the command originated.For example: I have a folder structure as below:
In my
tests.yaml
file I define the location of themodel_file
as../src/schema.fga
.If I execute this command:
fga model test --tests .\tests\tests.fga.yaml
from the root directory of the repo I get the below error:
Error: failed to read file ../src/schema.fga due to open ../src/schema.fga: The system cannot find the path specified.
If I execute the similar command:
fga model test --tests .\tests.fga.yaml
then the command successfully executes.The text was updated successfully, but these errors were encountered: