-
Notifications
You must be signed in to change notification settings - Fork 286
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add basic steelthread tests for bulk import and export of relationships
- Loading branch information
1 parent
b16e9d8
commit 7361b0e
Showing
6 changed files
with
295 additions
and
3 deletions.
There are no files selected for viewing
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
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
46 changes: 46 additions & 0 deletions
46
internal/services/steelthreadtesting/steelresults/basic-import-export-results.yaml
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,46 @@ | ||
--- | ||
- 'document:doc-1#viewer@user:user-0' | ||
- 'document:doc-1#viewer@user:user-1' | ||
- 'document:doc-1#viewer@user:user-2' | ||
- 'document:doc-1#viewer@user:user-3' | ||
- 'document:doc-1#viewer@user:user-4' | ||
- 'document:doc-1#viewer@user:user-5' | ||
- 'document:doc-1#viewer@user:user-6' | ||
- 'document:doc-1#viewer@user:user-7' | ||
- 'document:doc-1#viewer@user:user-8' | ||
- 'document:doc-17#viewer@user:user-1[somecaveat:{"somecondition":43}][expiration:2323-01-02T13:14:15Z]' | ||
- 'document:doc-17#viewer@user:user-10[somecaveat:{"somecondition":52}][expiration:3223-01-02T13:14:15Z]' | ||
- 'document:doc-17#viewer@user:user-2[somecaveat:{"somecondition":44}][expiration:2423-01-02T13:14:15Z]' | ||
- 'document:doc-17#viewer@user:user-3[somecaveat:{"somecondition":45}][expiration:2523-01-02T13:14:15Z]' | ||
- 'document:doc-17#viewer@user:user-4[somecaveat:{"somecondition":46}][expiration:2623-01-02T13:14:15Z]' | ||
- 'document:doc-17#viewer@user:user-5[somecaveat:{"somecondition":47}][expiration:2723-01-02T13:14:15Z]' | ||
- 'document:doc-17#viewer@user:user-6[somecaveat:{"somecondition":48}][expiration:2823-01-02T13:14:15Z]' | ||
- 'document:doc-17#viewer@user:user-7[somecaveat:{"somecondition":49}][expiration:2923-01-02T13:14:15Z]' | ||
- 'document:doc-17#viewer@user:user-8[somecaveat:{"somecondition":50}][expiration:3023-01-02T13:14:15Z]' | ||
- 'document:doc-17#viewer@user:user-9[somecaveat:{"somecondition":51}][expiration:3123-01-02T13:14:15Z]' | ||
- 'document:doc-2#viewer@user:user-0' | ||
- 'document:doc-3#viewer@user:user-2' | ||
- 'document:doc-3#viewer@user:user-3' | ||
- 'document:doc-3#viewer@user:user-4' | ||
- 'document:doc-3#viewer@user:user-5' | ||
- 'document:doc-3#viewer@user:user-6' | ||
- 'document:doc-3#viewer@user:user-7' | ||
- 'document:doc-3#viewer@user:user-8' | ||
- 'document:doc-4#viewer@user:user-1[somecaveat]' | ||
- 'document:doc-4#viewer@user:user-2[somecaveat:{"somecondition":41}]' | ||
- 'document:doc-4#viewer@user:user-3[somecaveat:{"somecondition":42}]' | ||
- 'document:doc-5#viewer@user:user-1[expiration:2323-01-02T13:14:15Z]' | ||
- 'document:doc-5#viewer@user:user-2[expiration:2423-01-02T13:14:15Z]' | ||
- 'document:doc-6#viewer@user:user-1[somecaveat][expiration:2323-01-02T13:14:15Z]' | ||
- 'document:doc-6#viewer@user:user-2[somecaveat:{"somecondition":41}][expiration:2123-01-02T13:14:15Z]' | ||
- 'document:doc-6#viewer@user:user-3[somecaveat:{"somecondition":42}][expiration:2223-01-02T13:14:15Z]' | ||
- 'document:doc-7#viewer@user:user-1[somecaveat:{"somecondition":43}][expiration:2323-01-02T13:14:15Z]' | ||
- 'document:doc-7#viewer@user:user-10[somecaveat:{"somecondition":52}][expiration:3223-01-02T13:14:15Z]' | ||
- 'document:doc-7#viewer@user:user-2[somecaveat:{"somecondition":44}][expiration:2423-01-02T13:14:15Z]' | ||
- 'document:doc-7#viewer@user:user-3[somecaveat:{"somecondition":45}][expiration:2523-01-02T13:14:15Z]' | ||
- 'document:doc-7#viewer@user:user-4[somecaveat:{"somecondition":46}][expiration:2623-01-02T13:14:15Z]' | ||
- 'document:doc-7#viewer@user:user-5[somecaveat:{"somecondition":47}][expiration:2723-01-02T13:14:15Z]' | ||
- 'document:doc-7#viewer@user:user-6[somecaveat:{"somecondition":48}][expiration:2823-01-02T13:14:15Z]' | ||
- 'document:doc-7#viewer@user:user-7[somecaveat:{"somecondition":49}][expiration:2923-01-02T13:14:15Z]' | ||
- 'document:doc-7#viewer@user:user-8[somecaveat:{"somecondition":50}][expiration:3023-01-02T13:14:15Z]' | ||
- 'document:doc-7#viewer@user:user-9[somecaveat:{"somecondition":51}][expiration:3123-01-02T13:14:15Z]' |
20 changes: 20 additions & 0 deletions
20
internal/services/steelthreadtesting/steelresults/filtered-import-export-results.yaml
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,20 @@ | ||
--- | ||
- 'document:doc-1#viewer@user:user-0' | ||
- 'document:doc-1#viewer@user:user-1' | ||
- 'document:doc-1#viewer@user:user-2' | ||
- 'document:doc-1#viewer@user:user-3' | ||
- 'document:doc-1#viewer@user:user-4' | ||
- 'document:doc-1#viewer@user:user-5' | ||
- 'document:doc-1#viewer@user:user-6' | ||
- 'document:doc-1#viewer@user:user-7' | ||
- 'document:doc-1#viewer@user:user-8' | ||
- 'document:doc-17#viewer@user:user-1[somecaveat:{"somecondition":43}][expiration:2323-01-02T13:14:15Z]' | ||
- 'document:doc-17#viewer@user:user-10[somecaveat:{"somecondition":52}][expiration:3223-01-02T13:14:15Z]' | ||
- 'document:doc-17#viewer@user:user-2[somecaveat:{"somecondition":44}][expiration:2423-01-02T13:14:15Z]' | ||
- 'document:doc-17#viewer@user:user-3[somecaveat:{"somecondition":45}][expiration:2523-01-02T13:14:15Z]' | ||
- 'document:doc-17#viewer@user:user-4[somecaveat:{"somecondition":46}][expiration:2623-01-02T13:14:15Z]' | ||
- 'document:doc-17#viewer@user:user-5[somecaveat:{"somecondition":47}][expiration:2723-01-02T13:14:15Z]' | ||
- 'document:doc-17#viewer@user:user-6[somecaveat:{"somecondition":48}][expiration:2823-01-02T13:14:15Z]' | ||
- 'document:doc-17#viewer@user:user-7[somecaveat:{"somecondition":49}][expiration:2923-01-02T13:14:15Z]' | ||
- 'document:doc-17#viewer@user:user-8[somecaveat:{"somecondition":50}][expiration:3023-01-02T13:14:15Z]' | ||
- 'document:doc-17#viewer@user:user-9[somecaveat:{"somecondition":51}][expiration:3123-01-02T13:14:15Z]' |
42 changes: 42 additions & 0 deletions
42
internal/services/steelthreadtesting/testdata/basic-import-export-relationships.txt
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,42 @@ | ||
document:doc-1#viewer@user:user-2 | ||
document:doc-1#viewer@user:user-3 | ||
document:doc-1#viewer@user:user-4 | ||
document:doc-1#viewer@user:user-5 | ||
document:doc-1#viewer@user:user-6 | ||
document:doc-1#viewer@user:user-7 | ||
document:doc-1#viewer@user:user-8 | ||
document:doc-3#viewer@user:user-2 | ||
document:doc-3#viewer@user:user-3 | ||
document:doc-3#viewer@user:user-4 | ||
document:doc-3#viewer@user:user-5 | ||
document:doc-3#viewer@user:user-6 | ||
document:doc-3#viewer@user:user-7 | ||
document:doc-3#viewer@user:user-8 | ||
document:doc-4#viewer@user:user-1[somecaveat] | ||
document:doc-4#viewer@user:user-2[somecaveat:{"somecondition": 41}] | ||
document:doc-4#viewer@user:user-3[somecaveat:{"somecondition": 42}] | ||
document:doc-5#viewer@user:user-1[expiration:2323-01-02T13:14:15Z] | ||
document:doc-5#viewer@user:user-2[expiration:2423-01-02T13:14:15Z] | ||
document:doc-6#viewer@user:user-1[somecaveat][expiration:2323-01-02T13:14:15Z] | ||
document:doc-6#viewer@user:user-2[somecaveat:{"somecondition": 41}][expiration:2123-01-02T13:14:15Z] | ||
document:doc-6#viewer@user:user-3[somecaveat:{"somecondition": 42}][expiration:2223-01-02T13:14:15Z] | ||
document:doc-7#viewer@user:user-1[somecaveat:{"somecondition": 43}][expiration:2323-01-02T13:14:15Z] | ||
document:doc-7#viewer@user:user-2[somecaveat:{"somecondition": 44}][expiration:2423-01-02T13:14:15Z] | ||
document:doc-7#viewer@user:user-3[somecaveat:{"somecondition": 45}][expiration:2523-01-02T13:14:15Z] | ||
document:doc-7#viewer@user:user-4[somecaveat:{"somecondition": 46}][expiration:2623-01-02T13:14:15Z] | ||
document:doc-7#viewer@user:user-5[somecaveat:{"somecondition": 47}][expiration:2723-01-02T13:14:15Z] | ||
document:doc-7#viewer@user:user-6[somecaveat:{"somecondition": 48}][expiration:2823-01-02T13:14:15Z] | ||
document:doc-7#viewer@user:user-7[somecaveat:{"somecondition": 49}][expiration:2923-01-02T13:14:15Z] | ||
document:doc-7#viewer@user:user-8[somecaveat:{"somecondition": 50}][expiration:3023-01-02T13:14:15Z] | ||
document:doc-7#viewer@user:user-9[somecaveat:{"somecondition": 51}][expiration:3123-01-02T13:14:15Z] | ||
document:doc-7#viewer@user:user-10[somecaveat:{"somecondition": 52}][expiration:3223-01-02T13:14:15Z] | ||
document:doc-17#viewer@user:user-1[somecaveat:{"somecondition": 43}][expiration:2323-01-02T13:14:15Z] | ||
document:doc-17#viewer@user:user-2[somecaveat:{"somecondition": 44}][expiration:2423-01-02T13:14:15Z] | ||
document:doc-17#viewer@user:user-3[somecaveat:{"somecondition": 45}][expiration:2523-01-02T13:14:15Z] | ||
document:doc-17#viewer@user:user-4[somecaveat:{"somecondition": 46}][expiration:2623-01-02T13:14:15Z] | ||
document:doc-17#viewer@user:user-5[somecaveat:{"somecondition": 47}][expiration:2723-01-02T13:14:15Z] | ||
document:doc-17#viewer@user:user-6[somecaveat:{"somecondition": 48}][expiration:2823-01-02T13:14:15Z] | ||
document:doc-17#viewer@user:user-7[somecaveat:{"somecondition": 49}][expiration:2923-01-02T13:14:15Z] | ||
document:doc-17#viewer@user:user-8[somecaveat:{"somecondition": 50}][expiration:3023-01-02T13:14:15Z] | ||
document:doc-17#viewer@user:user-9[somecaveat:{"somecondition": 51}][expiration:3123-01-02T13:14:15Z] | ||
document:doc-17#viewer@user:user-10[somecaveat:{"somecondition": 52}][expiration:3223-01-02T13:14:15Z] |
19 changes: 19 additions & 0 deletions
19
internal/services/steelthreadtesting/testdata/document-with-a-few-relationships.yaml
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,19 @@ | ||
--- | ||
schema: |+ | ||
use expiration | ||
caveat somecaveat(somecondition int) { | ||
somecondition == 42 | ||
} | ||
definition user {} | ||
definition document { | ||
relation viewer: user | user with expiration | user with somecaveat | user with somecaveat and expiration | ||
permission view = viewer | ||
} | ||
relationships: | | ||
document:doc-1#viewer@user:user-0 | ||
document:doc-1#viewer@user:user-1 | ||
document:doc-2#viewer@user:user-0 |