Skip to content
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

Use Relative Path in model_file in Tests #349

Open
RichardWhitfield opened this issue Jun 17, 2024 · 0 comments
Open

Use Relative Path in model_file in Tests #349

RichardWhitfield opened this issue Jun 17, 2024 · 0 comments

Comments

@RichardWhitfield
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

1 participant