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

feat(model): add test command #131

Merged
merged 4 commits into from
Aug 22, 2023
Merged

feat(model): add test command #131

merged 4 commits into from
Aug 22, 2023

Conversation

rhamzeh
Copy link
Member

@rhamzeh rhamzeh commented Aug 16, 2023

Description

  • Add model test command
  • Update Readme
  • Friendlier output of model test
  • Sort before comparing response arrays from list objects

To test:

  • make build
  • ./dist/fga model test --file example/model.fga --tests example/tests.fga.yaml to write and test a model
  • ./dist/fga model test --tests example/tests.fga.yaml to test a previously written model
  • ./dist/fga model test --tests example/tests.fga.yaml --verbose to see the full JSON output
Screenshot 2023-08-21 at 6 12 21 PM Screenshot 2023-08-21 at 6 42 02 PM

References

Closes #136

Review Checklist

  • I have clicked on "allow edits by maintainers".
  • I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
  • The correct base branch is being used, if not main
  • I have added tests to validate that the change in functionality is working as expected

@rhamzeh rhamzeh force-pushed the chore/add-model-test branch from 213c794 to d9871ac Compare August 21, 2023 22:39
@rhamzeh rhamzeh marked this pull request as ready for review August 21, 2023 22:44
@rhamzeh rhamzeh requested a review from a team as a code owner August 21, 2023 22:44
@rhamzeh rhamzeh added this pull request to the merge queue Aug 22, 2023
Merged via the queue into main with commit 80f8a89 Aug 22, 2023
@rhamzeh rhamzeh deleted the chore/add-model-test branch August 22, 2023 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide a way for users to test their models
3 participants