Revert "fix: handle glob patterns when expanded by the shell"#588
Revert "fix: handle glob patterns when expanded by the shell"#588
Conversation
This reverts commit c15d6d1.
WalkthroughRefactors cmd/model test command to accept a single --tests string and use filepath.Glob with a fallback to literal path existence. Removes expandTestFilePatterns and its tests. Deletes an example YAML test file. Updates .gitignore by removing .DS_Store entry. Changes
Sequence Diagram(s)sequenceDiagram
participant U as User
participant C as Cobra Command
participant R as RunE (test)
participant G as filepath.Glob
participant FS as FileSystem
U->>C: openfga model test --tests "<pattern or path>"
C->>R: Execute
R->>G: Glob(tests)
alt Matches found
G-->>R: []files
R->>R: Use matched files
else No matches
R->>FS: Stat(literal path)
alt Exists
FS-->>R: OK
R->>R: Use single file
else Not found
FS-->>R: NotFound
R->>R: Return error: no files matched or path missing
end
end
R-->>C: Result (files or error)
C-->>U: Output summary/error
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (4)
💤 Files with no reviewable changes (3)
🔇 Additional comments (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Reverts #583 for the reasons described here: #583 (comment)
We might re-apply it, but we need some time to ensure we're doing it properly, so it has to go out of this release
Summary by CodeRabbit