Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/docker-compose-jenkins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ gateway:
- ~/tmp/apiplatform/api-gateway-request-validation/src/lua/api-gateway/dogstatsd:/usr/local/api-gateway/lualib/api-gateway/dogstatsd
- ~/tmp/apiplatform/api-gateway-request-validation/test/perl:/tmp/perl
- ../target/:/t
entrypoint: ["prove", "-I/usr/local/test-nginx-0.24/lib", "-I/usr/local/test-nginx-0.24/inc", "-r", "/tmp/perl/"]
entrypoint: ["prove", "-I/usr/local/test-nginx/lib", "-I/usr/local/test-nginx/inc", "-r", "/tmp/perl/"]
redis:
image: redis:2.8
volumes:
Expand Down
2 changes: 1 addition & 1 deletion test/docker-compose-with-password-jenkins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ gateway:
- ~/tmp/apiplatform/api-gateway-request-validation/src/lua/api-gateway/dogstatsd:/usr/local/api-gateway/lualib/api-gateway/dogstatsd
- ~/tmp/apiplatform/api-gateway-request-validation/test/perl:/tmp/perl
- ~/tmp/apiplatform/api-gateway-request-validation/target/:/t
entrypoint: ["prove", "-I/usr/local/test-nginx-0.24/lib", "-I/usr/local/test-nginx-0.24/inc", "-r", "/tmp/perl/"]
entrypoint: ["prove", "-I/usr/local/test-nginx/lib", "-I/usr/local/test-nginx/inc", "-r", "/tmp/perl/"]
redis:
image: redis:2.8
environment:
Expand Down
2 changes: 1 addition & 1 deletion test/docker-compose-with-password.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ gateway:
- ~/tmp/apiplatform/api-gateway-request-validation/src/lua/api-gateway/dogstatsd:/usr/local/api-gateway/lualib/api-gateway/dogstatsd
- ~/tmp/apiplatform/api-gateway-request-validation/test/perl:/tmp/perl
- ~/tmp/apiplatform/api-gateway-request-validation/target/:/t
entrypoint: ["prove", "-I/usr/local/test-nginx-0.24/lib", "-I/usr/local/test-nginx-0.24/inc", "-r", "/tmp/perl/"]
entrypoint: ["prove", "-I/usr/local/test-nginx/lib", "-I/usr/local/test-nginx/inc", "-r", "/tmp/perl/"]
redis:
image: redis:2.8
environment:
Expand Down
2 changes: 1 addition & 1 deletion test/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ gateway:
- ~/tmp/apiplatform/api-gateway-request-validation/src/lua/api-gateway/dogstatsd:/usr/local/api-gateway/lualib/api-gateway/dogstatsd
- ~/tmp/apiplatform/api-gateway-request-validation/test/perl:/tmp/perl
- ../target/:/t
entrypoint: ["prove", "-I/usr/local/test-nginx-0.24/lib", "-I/usr/local/test-nginx-0.24/inc", "-r", "/tmp/perl/"]
entrypoint: ["prove", "-I/usr/local/test-nginx/lib", "-I/usr/local/test-nginx/inc", "-r", "/tmp/perl/"]
redis:
image: redis:2.8
volumes:
Expand Down
10 changes: 5 additions & 5 deletions test/perl/api-gateway/validation/oauth2/oauthTokenValidator.t
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ Authorization: Bearer SOME_OAUTH_TOKEN_TEST_2_X_0
]
--- response_body_like eval
[ "oauth token is valid.\n" ,
'.*{"oauth_token_scope":"openid email profile","oauth_token_client_id":"client_id_test_2","oauth_token_user_id":"21961FF44F97F8A10A490D36","oauth_token_expires_at":\\d{13}}.*',
'.*\{"oauth_token_scope":"openid email profile","oauth_token_client_id":"client_id_test_2","oauth_token_user_id":"21961FF44F97F8A10A490D36","oauth_token_expires_at":\\d{13}\}.*',
'.*"expires_at":\d+,.*',
'[1-4]', # the cached token expiry time is in seconds, and it can only be between 1s to 4s, but not less. -1 response indicated the key is not cached or it has expired
'OK\n',
Expand Down Expand Up @@ -378,9 +378,9 @@ Authorization: Bearer SOME_OAUTH_TOKEN_TEST4
]
--- response_body_like eval
["oauth token is valid.\n",
'.*{"oauth_token_scope":"openid,AdobeID","oauth_token_client_id":"test_Client_ID","oauth_token_user_id":"21961FF44F97F8A10A490D36","oauth_token_expires_at":\\d{13}}.*',
'.*\{"oauth_token_scope":"openid,AdobeID","oauth_token_client_id":"test_Client_ID","oauth_token_user_id":"21961FF44F97F8A10A490D36","oauth_token_expires_at":\\d{13}\}.*',
"oauth token is also valid.\n",
'Local cache:{"oauth_token_scope":"openid,AdobeID","oauth_token_client_id":"test_Client_ID","oauth_token_user_id":"21961FF44F97F8A10A490D36","oauth_token_expires_at":\\d{13}}\n'
'Local cache:\{"oauth_token_scope":"openid,AdobeID","oauth_token_client_id":"test_Client_ID","oauth_token_user_id":"21961FF44F97F8A10A490D36","oauth_token_expires_at":\\d{13}\}\n'
]
--- no_error_log
[error]
Expand Down Expand Up @@ -480,8 +480,8 @@ env REDIS_PASS;
]
--- response_body_like eval
[
'^{"error_code":"401110","message":"User token is missing"}+',
'^{"error_code":"403113","message":"User token is not valid"}+'
'^\{"error_code":"401110","message":"User token is missing"\}+',
'^\{"error_code":"403113","message":"User token is not valid"\}+'
]
--- error_code_like eval
[401,403]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ Authorization: Bearer SOME_OAUTH_PROFILE_TEST_1
]
--- response_body_like eval
['^user_email=johndoe_ĂÂă\@domain.com,user_country_code=AT,user_name=display_name%E2%80%94%E5%A4%A7%EF%BC%8D%E5%A5%B3.*',
'Local: {"user_name":"display_name—大-女","user_email":"johndoe_ĂÂă@domain.com","user_country_code":"AT"}',
'Redis: {"user_name":"display_name—大-女","user_email":"johndoe_ĂÂă@domain.com","user_country_code":"AT"}']
'Local: \{"user_name":"display_name—大-女","user_email":"johndoe_ĂÂă@domain.com","user_country_code":"AT"\}',
'Redis: \{"user_name":"display_name—大-女","user_email":"johndoe_ĂÂă@domain.com","user_country_code":"AT"\}']
--- no_error_log
[error]

Expand Down Expand Up @@ -486,7 +486,7 @@ Authorization: Bearer SOME_OAUTH_PROFILE_TEST_1
]
--- response_body_like eval
['^user_email=johndoe_ĂÂă\@domain.com,user_country_code=AT,user_name=display_name%E2%80%94%E5%A4%A7%EF%BC%8D%E5%A5%B3.*',
'Local: {"user_name":"display_name—大-女","user_email":"johndoe_ĂÂă@domain.com","user_country_code":"AT"}',
'Redis: {"user_name":"display_name—大-女","user_email":"johndoe_ĂÂă@domain.com","user_country_code":"AT"}']
'Local: \{"user_name":"display_name—大-女","user_email":"johndoe_ĂÂă@domain.com","user_country_code":"AT"\}',
'Redis: \{"user_name":"display_name—大-女","user_email":"johndoe_ĂÂă@domain.com","user_country_code":"AT"\}']
--- no_error_log
[error]