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

Difference in output when tests fails or succeeds when running fga model test with --verbose flag. #360

Open
6 tasks done
magnusart opened this issue May 22, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@magnusart
Copy link

magnusart commented May 22, 2024

Checklist

  • I have looked into the README and have not found a suitable solution or answer.
  • I have looked into the documentation and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have upgraded to the latest version of OpenFGA and the issue still persists.
  • I have searched the OpenFGA Community and have not found a suitable solution or answer.
  • I agree to the terms within the OpenFGA Code of Conduct.

Description

When I run the command fga model test --test=.. I get the output:

# Test Summary #
Tests 24/24 passing
Checks 62/62 passing

When I run the command fga model test --test=.. --verbose I get the output:

[
 ... JSON output ...
]
# Test Summary #
Tests 24/24 passing
Checks 62/62 passing

However if I make a change to a test so one test fails and run the same command fga model test --test=.. --verbose I get the output:

[
 ... JSON output ...
]

Expectation

  1. The test summary should not be included when using the --verbose flag.
  2. The output should be identical in structure when using the --verbose flag regardless if the test suite fails or succeeds.

This creates problems when running the CLI tool from build scripts and I want to interpret the output.

Reproduction

  1. fga model test --test=.. --verbose
  2. Check output
  3. Make test fail
  4. Compare output

OpenFGA version

0.4.0 (latest from homebrew)

How are you running OpenFGA?

As a binary

What datastore are you using?

In-Memory

OpenFGA Flags

Nope

Logs

No

@magnusart magnusart added the bug Something isn't working label May 22, 2024
@miparnisari miparnisari transferred this issue from openfga/openfga Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Backlog
Development

No branches or pull requests

1 participant