Skip to content

Commit

Permalink
fix: updated test cased for report apis internal calls
Browse files Browse the repository at this point in the history
  • Loading branch information
beepdot committed Jun 13, 2022
1 parent 82c281d commit 974234b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ keycloak_public_key:
stdout: '-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwTS+srpbA/n7I5fDjxcf\nH1QUSiFMP7B4yyLxir3VigKtai+YW7ZqMF853O3OiE/QTKuT0ZsR7aDtCsoZaGqq\n2NSyfbc3m339dBQ+0YgM5UdqvUHubNkgQwkRwb1lGlMWSHMYk0iIKJEIw1MCdCH0\nOBwjzlDxHb78lCKd/GvBvRLMXOJbAP72xJ/gjaNFHQ/GzskhrapDuMXaH+S7vtox\nBDG74fQwXCG+nDJ9ryV2bbWxWMINLU82x3+L6YYnWK80loucm2fzG5l1W/Wz9DIa\nGiWwP0JHlZf9GM/raydB4kDEq3jB22LfdLCdQanMkxbw7bkmvjBT2NFwqgFv3q3m\nVQIDAQAB\n-----END PUBLIC KEY-----'
keycloak_auth_server_url: "https://sunbirded.org/auth"
keycloak_realm: "sunbird"
private_ingressgateway_ip: "1.2.3.4"
private_ingressgateway_ip: "2.3.4.5"

# Audience claim check is disabled as of now
# keycloak_allowed_aud: '"{{ keycloak_auth_server_url }}/realms/{{ keycloak_realm }}", "account", "realm-management"'
Expand Down
3 changes: 3 additions & 0 deletions kubernetes/opa/registry/policies_test.rego
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ package tests

current_time := 1640235102
iss := "https://sunbirded.org/auth/realms/sunbird"
private_ingressgateway_ip := "1.2.3.4"

test_rc_certificate_create_internal_request {
data.main.allow.allowed
with data.common.current_time as current_time
with data.common.iss as iss
with data.common.private_ingressgateway_ip as private_ingressgateway_ip
with input as
{
"attributes": {
Expand Down Expand Up @@ -65,6 +67,7 @@ test_rc_certificate_delete_internal_request {
data.main.allow.allowed
with data.common.current_time as current_time
with data.common.iss as iss
with data.common.private_ingressgateway_ip as private_ingressgateway_ip
with input as
{
"attributes": {
Expand Down
4 changes: 4 additions & 0 deletions kubernetes/opa/report/policies_test.rego
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package tests

current_time := 1640235102
iss := "https://sunbirded.org/auth/realms/sunbird"
private_ingressgateway_ip := "1.2.3.4"

test_get_report {
data.main.allow.allowed
Expand All @@ -30,6 +31,7 @@ test_get_report_internal_request {
data.main.allow.allowed
with data.common.current_time as current_time
with data.common.iss as iss
with data.common.private_ingressgateway_ip as private_ingressgateway_ip
with input as
{
"attributes": {
Expand Down Expand Up @@ -112,6 +114,7 @@ test_create_report_internal_request {
data.main.allow.allowed
with data.common.current_time as current_time
with data.common.iss as iss
with data.common.private_ingressgateway_ip as private_ingressgateway_ip
with input as
{
"attributes": {
Expand Down Expand Up @@ -194,6 +197,7 @@ test_update_report_internal_request {
data.main.allow.allowed
with data.common.current_time as current_time
with data.common.iss as iss
with data.common.private_ingressgateway_ip as private_ingressgateway_ip
with input as
{
"attributes": {
Expand Down

0 comments on commit 974234b

Please sign in to comment.