diff --git a/test/docker-compose-jenkins.yml b/test/docker-compose-jenkins.yml index ede17b9..3dd4f60 100644 --- a/test/docker-compose-jenkins.yml +++ b/test/docker-compose-jenkins.yml @@ -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: diff --git a/test/docker-compose-with-password-jenkins.yml b/test/docker-compose-with-password-jenkins.yml index aad921f..8441263 100644 --- a/test/docker-compose-with-password-jenkins.yml +++ b/test/docker-compose-with-password-jenkins.yml @@ -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: diff --git a/test/docker-compose-with-password.yml b/test/docker-compose-with-password.yml index 62b206b..7caaa59 100644 --- a/test/docker-compose-with-password.yml +++ b/test/docker-compose-with-password.yml @@ -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: diff --git a/test/docker-compose.yml b/test/docker-compose.yml index 3aa97c9..8d0f72d 100644 --- a/test/docker-compose.yml +++ b/test/docker-compose.yml @@ -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: diff --git a/test/perl/api-gateway/validation/oauth2/oauthTokenValidator.t b/test/perl/api-gateway/validation/oauth2/oauthTokenValidator.t index 454a0c4..483c1cb 100644 --- a/test/perl/api-gateway/validation/oauth2/oauthTokenValidator.t +++ b/test/perl/api-gateway/validation/oauth2/oauthTokenValidator.t @@ -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', @@ -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] @@ -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] diff --git a/test/perl/api-gateway/validation/oauth2/userProfileValidator.t b/test/perl/api-gateway/validation/oauth2/userProfileValidator.t index f349ac5..8e8897d 100644 --- a/test/perl/api-gateway/validation/oauth2/userProfileValidator.t +++ b/test/perl/api-gateway/validation/oauth2/userProfileValidator.t @@ -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] @@ -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]