Skip to content

Commit

Permalink
Add Warrant-Token latest to query tests (#290)
Browse files Browse the repository at this point in the history
  • Loading branch information
akajla09 authored Jan 24, 2024
1 parent e026792 commit 694da47
Show file tree
Hide file tree
Showing 2 changed files with 144 additions and 36 deletions.
75 changes: 60 additions & 15 deletions tests/v1/query.json
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,10 @@
"name": "selectDocumentsWhereUserU3IsExplicitlyViewer",
"request": {
"method": "GET",
"url": "/v1/query?q=select%20explicit%20document%20where%20user:U3%20is%20viewer"
"url": "/v1/query?q=select%20explicit%20document%20where%20user:U3%20is%20viewer",
"headers": {
"Warrant-Token": "latest"
}
},
"expectedResponse": {
"statusCode": 200,
Expand Down Expand Up @@ -539,7 +542,10 @@
"name": "selectExplicitViewersOfTypeUserForDocumentF3",
"request": {
"method": "GET",
"url": "/v1/query?q=select%20explicit%20viewer%20of%20type%20user%20for%20document:F3"
"url": "/v1/query?q=select%20explicit%20viewer%20of%20type%20user%20for%20document:F3",
"headers": {
"Warrant-Token": "latest"
}
},
"expectedResponse": {
"statusCode": 200,
Expand Down Expand Up @@ -567,7 +573,10 @@
"name": "selectDocumentsWhereUserU3IsViewer",
"request": {
"method": "GET",
"url": "/v1/query?q=select%20document%20where%20user:U3%20is%20viewer"
"url": "/v1/query?q=select%20document%20where%20user:U3%20is%20viewer",
"headers": {
"Warrant-Token": "latest"
}
},
"expectedResponse": {
"statusCode": 200,
Expand Down Expand Up @@ -641,7 +650,10 @@
"name": "selectDocumentsWhereUserU1IsEditorViewer",
"request": {
"method": "GET",
"url": "/v1/query?q=select%20document%20where%20user:U1%20is%20editor-viewer"
"url": "/v1/query?q=select%20document%20where%20user:U1%20is%20editor-viewer",
"headers": {
"Warrant-Token": "latest"
}
},
"expectedResponse": {
"statusCode": 200,
Expand Down Expand Up @@ -767,7 +779,10 @@
"name": "selectExplicitOwnersOfTypeUserForDocumentD6",
"request": {
"method": "GET",
"url": "/v1/query?q=select%20explicit%20owner%20of%20type%20user%20for%20document:D6"
"url": "/v1/query?q=select%20explicit%20owner%20of%20type%20user%20for%20document:D6",
"headers": {
"Warrant-Token": "latest"
}
},
"expectedResponse": {
"statusCode": 200,
Expand Down Expand Up @@ -795,7 +810,10 @@
"name": "selectViewersOfTypeUserForDocumentD4",
"request": {
"method": "GET",
"url": "/v1/query?q=select%20viewer%20of%20type%20user%20for%20document:D4"
"url": "/v1/query?q=select%20viewer%20of%20type%20user%20for%20document:D4",
"headers": {
"Warrant-Token": "latest"
}
},
"expectedResponse": {
"statusCode": 200,
Expand Down Expand Up @@ -865,7 +883,10 @@
"name": "selectEditorViewersOfTypeUserForDocumentD4",
"request": {
"method": "GET",
"url": "/v1/query?q=select%20editor-viewer%20of%20type%20user%20for%20document:D4"
"url": "/v1/query?q=select%20editor-viewer%20of%20type%20user%20for%20document:D4",
"headers": {
"Warrant-Token": "latest"
}
},
"expectedResponse": {
"statusCode": 200,
Expand Down Expand Up @@ -921,7 +942,10 @@
"name": "selectDocumentsWhereUserU4IsExplicitlyOwner",
"request": {
"method": "GET",
"url": "/v1/query?q=select%20explicit%20document%20where%20user:U4%20is%20owner"
"url": "/v1/query?q=select%20explicit%20document%20where%20user:U4%20is%20owner",
"headers": {
"Warrant-Token": "latest"
}
},
"expectedResponse": {
"statusCode": 200,
Expand All @@ -934,7 +958,10 @@
"name": "selectDocumentsWhereUserU4IsViewer",
"request": {
"method": "GET",
"url": "/v1/query?q=select%20document%20where%20user:U4%20is%20viewer"
"url": "/v1/query?q=select%20document%20where%20user:U4%20is%20viewer",
"headers": {
"Warrant-Token": "latest"
}
},
"expectedResponse": {
"statusCode": 200,
Expand Down Expand Up @@ -1080,7 +1107,10 @@
"name": "selectDocumentsWhereUserU4IsViewerLimit3SortOrderDesc",
"request": {
"method": "GET",
"url": "/v1/query?q=select%20document%20where%20user:U4%20is%20viewer&limit=3&sortOrder=DESC"
"url": "/v1/query?q=select%20document%20where%20user:U4%20is%20viewer&limit=3&sortOrder=DESC",
"headers": {
"Warrant-Token": "latest"
}
},
"expectedResponse": {
"statusCode": 200,
Expand Down Expand Up @@ -1138,7 +1168,10 @@
"name": "selectDocumentsWhereUserU4IsViewerLimit3SortOrderDescAfterId1",
"request": {
"method": "GET",
"url": "/v1/query?q=select%20document%20where%20user:U4%20is%20viewer&limit=3&sortOrder=DESC&afterId={{ selectDocumentsWhereUserU4IsViewerLimit3SortOrderDesc.lastId }}"
"url": "/v1/query?q=select%20document%20where%20user:U4%20is%20viewer&limit=3&sortOrder=DESC&afterId={{ selectDocumentsWhereUserU4IsViewerLimit3SortOrderDesc.lastId }}",
"headers": {
"Warrant-Token": "latest"
}
},
"expectedResponse": {
"statusCode": 200,
Expand Down Expand Up @@ -1200,7 +1233,10 @@
"name": "selectDocumentsWhereUserU4IsViewerLimit3SortOrderDescAfterId2",
"request": {
"method": "GET",
"url": "/v1/query?q=select%20document%20where%20user:U4%20is%20viewer&limit=3&sortOrder=DESC&afterId={{ selectDocumentsWhereUserU4IsViewerLimit3SortOrderDescAfterId1.lastId }}"
"url": "/v1/query?q=select%20document%20where%20user:U4%20is%20viewer&limit=3&sortOrder=DESC&afterId={{ selectDocumentsWhereUserU4IsViewerLimit3SortOrderDescAfterId1.lastId }}",
"headers": {
"Warrant-Token": "latest"
}
},
"expectedResponse": {
"statusCode": 200,
Expand Down Expand Up @@ -1256,7 +1292,10 @@
"name": "selectMembersOrViewersOfTypeUserLimit3SortOrderDesc",
"request": {
"method": "GET",
"url": "/v1/query?q=select%20member%2Cviewer%20of%20type%20user&limit=3&sortOrder=DESC"
"url": "/v1/query?q=select%20member%2Cviewer%20of%20type%20user&limit=3&sortOrder=DESC",
"headers": {
"Warrant-Token": "latest"
}
},
"expectedResponse": {
"statusCode": 200,
Expand Down Expand Up @@ -1313,7 +1352,10 @@
"name": "selectMembersOrViewersOfTypeUserLimit3SortOrderDescAfterId1",
"request": {
"method": "GET",
"url": "/v1/query?q=select%20member%2Cviewer%20of%20type%20user&limit=3&sortOrder=DESC&lastId={{ selectMembersOrViewersOfTypeUserLimit3SortOrderDesc.lastId }}"
"url": "/v1/query?q=select%20member%2Cviewer%20of%20type%20user&limit=3&sortOrder=DESC&lastId={{ selectMembersOrViewersOfTypeUserLimit3SortOrderDesc.lastId }}",
"headers": {
"Warrant-Token": "latest"
}
},
"expectedResponse": {
"statusCode": 200,
Expand Down Expand Up @@ -1471,7 +1513,10 @@
"name": "queryFailsWhenNoneOfIsUsed",
"request": {
"method": "GET",
"url": "/v1/query?q=select%20%2A"
"url": "/v1/query?q=select%20%2A",
"headers": {
"Warrant-Token": "latest"
}
},
"expectedResponse": {
"statusCode": 400,
Expand Down
Loading

0 comments on commit 694da47

Please sign in to comment.