Skip to content

Commit

Permalink
Add 'Warrant-Token: latest' header to query calls in query-policy.jso…
Browse files Browse the repository at this point in the history
…n test suite
  • Loading branch information
kkajla12 committed Mar 31, 2024
1 parent c0a9763 commit 18b0ff4
Showing 1 changed file with 52 additions and 19 deletions.
71 changes: 52 additions & 19 deletions tests/v2/query-policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,6 @@
"request": {
"method": "POST",
"url": "/v2/warrants",
"headers": {
"Warrant-Token": "latest"
},
"body": {
"objectType": "role",
"objectId": "admin",
Expand Down Expand Up @@ -265,9 +262,6 @@
"request": {
"method": "POST",
"url": "/v2/warrants",
"headers": {
"Warrant-Token": "latest"
},
"body": {
"objectType": "role",
"objectId": "manager",
Expand Down Expand Up @@ -447,7 +441,10 @@
"name": "selectPermissionsWhereUserJohnIsMemberInTeam1",
"request": {
"method": "GET",
"url": "/v2/query?q=select%20permission%20where%20user:john%20is%20member&context=%7B%22team%22%3A%22team-1%22%7D"
"url": "/v2/query?q=select%20permission%20where%20user:john%20is%20member&context=%7B%22team%22%3A%22team-1%22%7D",
"headers": {
"Warrant-Token": "latest"
}
},
"expectedResponse": {
"statusCode": 200,
Expand Down Expand Up @@ -536,7 +533,10 @@
"name": "selectPermissionsWhereUserJohnIsMemberInTeam2",
"request": {
"method": "GET",
"url": "/v2/query?q=select%20permission%20where%20user:john%20is%20member&context=%7B%22team%22%3A%22team-2%22%7D"
"url": "/v2/query?q=select%20permission%20where%20user:john%20is%20member&context=%7B%22team%22%3A%22team-2%22%7D",
"headers": {
"Warrant-Token": "latest"
}
},
"expectedResponse": {
"statusCode": 200,
Expand Down Expand Up @@ -625,7 +625,10 @@
"name": "selectPermissionsWhereUserJohnIsMemberInTeam3",
"request": {
"method": "GET",
"url": "/v2/query?q=select%20permission%20where%20user:john%20is%20member&context=%7B%22team%22%3A%22team-3%22%7D"
"url": "/v2/query?q=select%20permission%20where%20user:john%20is%20member&context=%7B%22team%22%3A%22team-3%22%7D",
"headers": {
"Warrant-Token": "latest"
}
},
"expectedResponse": {
"statusCode": 200,
Expand Down Expand Up @@ -699,7 +702,10 @@
"name": "selectPermissionsWhereUserJaneIsMemberInTeam1",
"request": {
"method": "GET",
"url": "/v2/query?q=select%20permission%20where%20user:jane%20is%20member&context=%7B%22team%22%3A%22team-1%22%7D"
"url": "/v2/query?q=select%20permission%20where%20user:jane%20is%20member&context=%7B%22team%22%3A%22team-1%22%7D",
"headers": {
"Warrant-Token": "latest"
}
},
"expectedResponse": {
"statusCode": 200,
Expand Down Expand Up @@ -743,7 +749,10 @@
"name": "selectPermissionsWhereUserJaneIsMemberInTeam2",
"request": {
"method": "GET",
"url": "/v2/query?q=select%20permission%20where%20user:jane%20is%20member&context=%7B%22team%22%3A%22team-2%22%7D"
"url": "/v2/query?q=select%20permission%20where%20user:jane%20is%20member&context=%7B%22team%22%3A%22team-2%22%7D",
"headers": {
"Warrant-Token": "latest"
}
},
"expectedResponse": {
"statusCode": 200,
Expand Down Expand Up @@ -772,7 +781,10 @@
"name": "selectPermissionsWhereUserJaneIsMemberInTeam3",
"request": {
"method": "GET",
"url": "/v2/query?q=select%20permission%20where%20user:jane%20is%20member&context=%7B%22team%22%3A%22team-3%22%7D"
"url": "/v2/query?q=select%20permission%20where%20user:jane%20is%20member&context=%7B%22team%22%3A%22team-3%22%7D",
"headers": {
"Warrant-Token": "latest"
}
},
"expectedResponse": {
"statusCode": 200,
Expand Down Expand Up @@ -816,7 +828,10 @@
"name": "selectPermissionsWhereUserJamesIsMemberInTeam1",
"request": {
"method": "GET",
"url": "/v2/query?q=select%20permission%20where%20user:james%20is%20member&context=%7B%22team%22%3A%22team-1%22%7D"
"url": "/v2/query?q=select%20permission%20where%20user:james%20is%20member&context=%7B%22team%22%3A%22team-1%22%7D",
"headers": {
"Warrant-Token": "latest"
}
},
"expectedResponse": {
"statusCode": 200,
Expand Down Expand Up @@ -905,7 +920,10 @@
"name": "selectPermissionsWhereUserJamesIsMemberInTeam2",
"request": {
"method": "GET",
"url": "/v2/query?q=select%20permission%20where%20user:james%20is%20member&context=%7B%22team%22%3A%22team-2%22%7D"
"url": "/v2/query?q=select%20permission%20where%20user:james%20is%20member&context=%7B%22team%22%3A%22team-2%22%7D",
"headers": {
"Warrant-Token": "latest"
}
},
"expectedResponse": {
"statusCode": 200,
Expand Down Expand Up @@ -979,7 +997,10 @@
"name": "selectPermissionsWhereUserJamesIsMemberInTeam3",
"request": {
"method": "GET",
"url": "/v2/query?q=select%20permission%20where%20user:james%20is%20member&context=%7B%22team%22%3A%22team-3%22%7D"
"url": "/v2/query?q=select%20permission%20where%20user:james%20is%20member&context=%7B%22team%22%3A%22team-3%22%7D",
"headers": {
"Warrant-Token": "latest"
}
},
"expectedResponse": {
"statusCode": 200,
Expand Down Expand Up @@ -1244,7 +1265,10 @@
"name": "selectDocumentsWhereUserU1IsEditorViewerInTeamT1",
"request": {
"method": "GET",
"url": "/v2/query?q=select%20document%20where%20user:U1%20is%20editor-viewer&context=%7B%22team%22%3A%22T1%22%7D"
"url": "/v2/query?q=select%20document%20where%20user:U1%20is%20editor-viewer&context=%7B%22team%22%3A%22T1%22%7D",
"headers": {
"Warrant-Token": "latest"
}
},
"expectedResponse": {
"statusCode": 200,
Expand Down Expand Up @@ -1274,7 +1298,10 @@
"name": "selectDocumentsWhereUserU1IsEditorViewerInTeamT2",
"request": {
"method": "GET",
"url": "/v2/query?q=select%20document%20where%20user:U1%20is%20editor-viewer&context=%7B%22team%22%3A%22T2%22%7D"
"url": "/v2/query?q=select%20document%20where%20user:U1%20is%20editor-viewer&context=%7B%22team%22%3A%22T2%22%7D",
"headers": {
"Warrant-Token": "latest"
}
},
"expectedResponse": {
"statusCode": 200,
Expand All @@ -1287,7 +1314,10 @@
"name": "selectDocumentsWhereUserU2IsEditorViewerInTeamT1",
"request": {
"method": "GET",
"url": "/v2/query?q=select%20document%20where%20user:U2%20is%20editor-viewer&context=%7B%22team%22%3A%22T1%22%7D"
"url": "/v2/query?q=select%20document%20where%20user:U2%20is%20editor-viewer&context=%7B%22team%22%3A%22T1%22%7D",
"headers": {
"Warrant-Token": "latest"
}
},
"expectedResponse": {
"statusCode": 200,
Expand All @@ -1300,7 +1330,10 @@
"name": "selectDocumentsWhereUserU2IsViewerInTeamT2",
"request": {
"method": "GET",
"url": "/v2/query?q=select%20document%20where%20user:U2%20is%20viewer&context=%7B%22team%22%3A%22T2%22%7D"
"url": "/v2/query?q=select%20document%20where%20user:U2%20is%20viewer&context=%7B%22team%22%3A%22T2%22%7D",
"headers": {
"Warrant-Token": "latest"
}
},
"expectedResponse": {
"statusCode": 200,
Expand Down

0 comments on commit 18b0ff4

Please sign in to comment.