Difference in output when tests fails or succeeds when running fga model test with --verbose flag.
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 102
- Forks
- 49
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 16
Description
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
- The test summary should not be included when using the
--verboseflag. - The output should be identical in structure when using the
--verboseflag 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
- fga model test --test=.. --verbose
- Check output
- Make test fail
- 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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the CLI entry point for fga model test and reproduce the commands with and without --verbose, first with all tests passing and then with one test failing. Trace how verbose results and the test summary are emitted; done means the verbose output has the same structure in both cases and omits the summary as requested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100