-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Description
The glob support for the --tests option in fga model test uses the Go filepath.Glob, which uses filepath.Match under the hood to match the glob pattern.
The means that we're missing support for ** in the glob pattern (golang/go#11862) as the Go API is intended to mirror the C std lib rather than the bash globbing that some might expect.
** is especially useful as it would allow matching any number of path segments meaning that in a structure like in the test fixtures:
ls ./tests/fixtures/**/*.fga.yamlresolves both thebasic-store.fga.yamlandrelative-path/relative-path-store.fga.yamlfga model test --tests "./tests/fixtures/**/*.fga.yaml"will only resolverelative-path-store.fga.yaml
Given that it might be expected for the globbing to match the behaviour of bash, this might lead to folks accidentally not running their entire tests if they use a tool like ls to help determine the globbing pattern used.
We should either:
- Document this limitation
- Improve the globbing to match what is most likely expected
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Intake