-
Notifications
You must be signed in to change notification settings - Fork 291
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add filtering test to importer tests
- Loading branch information
1 parent
18a4435
commit 015b524
Showing
3 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
pkg/composableschemadsl/compiler/importer-test/simple-local-with-extra-def/expected.zed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
definition user {} | ||
|
||
definition resource { | ||
relation viewer: user | ||
permission view = viewer | ||
} |
6 changes: 6 additions & 0 deletions
6
pkg/composableschemadsl/compiler/importer-test/simple-local-with-extra-def/root.zed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from .user import user | ||
|
||
definition resource { | ||
relation viewer: user | ||
permission view = viewer | ||
} |
9 changes: 9 additions & 0 deletions
9
pkg/composableschemadsl/compiler/importer-test/simple-local-with-extra-def/user.zed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
definition user {} | ||
|
||
// This shouldn't be present in the output | ||
definition persona {} | ||
|
||
// Nor should this | ||
caveat only_on_tuesday(day_of_week string) { | ||
day_of_week == 'tuesday' | ||
} |