From 9b2701a4a774a175bffeca1858f91b64c159dbe4 Mon Sep 17 00:00:00 2001 From: Camila Maia Date: Mon, 2 Aug 2021 16:45:09 -0300 Subject: [PATCH] Increase max time for some response time tests Sometimes the API does not responds under a second and it makes the CI of the scanapi main repo fails --- demo-api/scanapi-report.html | 312 +++++++++----------- demo-api/scanapi.yaml | 2 +- demo-api/snippets.yaml | 2 +- demo-api/tests/response_time_2_seconds.yaml | 2 + 4 files changed, 150 insertions(+), 168 deletions(-) create mode 100644 demo-api/tests/response_time_2_seconds.yaml diff --git a/demo-api/scanapi-report.html b/demo-api/scanapi-report.html index 7975352..78e5d4d 100644 --- a/demo-api/scanapi-report.html +++ b/demo-api/scanapi-report.html @@ -409,7 +409,7 @@

Report generated for Snippets API

-

Generated at: 2021-06-11 16:05:58

+

Generated at: 2021-08-02 16:42:18

@@ -459,7 +459,7 @@

Request

User-Agent - python-requests/2.24.0 + python-requests/2.26.0 @@ -503,7 +503,7 @@

Request

cURL -
curl -X GET -H "User-Agent: python-requests/2.24.0" -H "Accept-Encoding: gzip, deflate" -H "Accept: */*" -H "Connection: keep-alive" -H "Content-Type: application/json" -d 'None' http://demo.scanapi.dev/api/v1/health/ --compressed
+
curl -X GET -H "User-Agent: python-requests/2.26.0" -H "Accept-Encoding: gzip, deflate" -H "Accept: */*" -H "Connection: keep-alive" -H "Content-Type: application/json" -d 'None' http://demo.scanapi.dev/api/v1/health/ --compressed
@@ -525,7 +525,7 @@

Response

response time - 0.83217 s + 0.550603 s @@ -559,7 +559,7 @@

Response

Date - Fri, 11 Jun 2021 19:05:59 GMT + Mon, 02 Aug 2021 19:42:20 GMT @@ -596,7 +596,7 @@

Response

- Vary + vary Accept, Cookie @@ -606,7 +606,7 @@

Response

- Allow + allow GET, HEAD, OPTIONS @@ -616,7 +616,7 @@

Response

- X-Frame-Options + x-frame-options DENY @@ -626,7 +626,7 @@

Response

- X-Content-Type-Options + x-content-type-options nosniff @@ -636,7 +636,7 @@

Response

- Referrer-Policy + referrer-policy same-origin @@ -646,7 +646,7 @@

Response

- Via + via 1.1 vegur @@ -666,10 +666,10 @@

Response

- cf-request-id + Last-Modified - 0a9e10923f0000589e5d1f9000000001 + Mon, 02 Aug 2021 19:42:20 GMT @@ -679,7 +679,7 @@

Response

Report-To - {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v2?s=YYXym%2Fx%2FGLgILDM4BWCunlDzN2BrisXziA8h6kCn6GlsjtLvM4japYTPAaodZtcvem4O2cx3MuBVd59naCyGR2l%2F4je%2FioFmLnRlS9gXcR7ASlbW%2BEPN1wqSU0gUFXW1oeakuUqyQYRiAQ%3D%3D"}],"group":"cf-nel","max_age":604800} + {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=QR55%2BTgAmqd8ycvAbCroESNBCfdlYdhiUjd%2FXyAkqblK%2FmXTEYck6zvJS1%2Bdp5udaK8C6%2B1B80VQAAXMhtLDNRB9%2Fg1iCOk6P8hineysoc3t2b%2BNi%2BOHyLFvj%2F3HX8FuRt8T6EDtAjWOBZHQ6gjP"}],"group":"cf-nel","max_age":604800} @@ -689,7 +689,7 @@

Response

NEL - {"report_to":"cf-nel","max_age":604800} + {"report_to":"cf-nel","max_age":604800} @@ -709,7 +709,7 @@

Response

CF-RAY - 65dd1d306faf589e-POA + 6789c9edda595898-POA @@ -719,7 +719,7 @@

Response

alt-svc - h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400, h3=":443"; ma=86400 + h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400, h3=":443"; ma=86400 @@ -730,7 +730,7 @@

Response

Content

- "OK!" + "OK!"

@@ -816,7 +816,7 @@

Request

User-Agent - python-requests/2.24.0 + python-requests/2.26.0 @@ -867,14 +867,14 @@

Request

Body -

{"username": "guest", "password": "SENSITIVE_INFORMATION"}

+

{"username": "guest", "password": "SENSITIVE_INFORMATION"}

cURL -
curl -X POST -H "User-Agent: python-requests/2.24.0" -H "Accept-Encoding: gzip, deflate" -H "Accept: */*" -H "Connection: keep-alive" -H "Content-Type: application/json" -H "Content-Length: 47" -d '{"username": "guest", "password": "SENSITIVE_INFORMATION"}' http://demo.scanapi.dev/api/v1/rest-auth/login/ --compressed
+
curl -X POST -H "User-Agent: python-requests/2.26.0" -H "Accept-Encoding: gzip, deflate" -H "Accept: */*" -H "Connection: keep-alive" -H "Content-Type: application/json" -H "Content-Length: 47" -d '{"username": "guest", "password": "SENSITIVE_INFORMATION"}' http://demo.scanapi.dev/api/v1/rest-auth/login/ --compressed
@@ -896,7 +896,7 @@

Response

response time - 0.884435 s + 0.813175 s @@ -930,7 +930,7 @@

Response

Date - Fri, 11 Jun 2021 19:06:00 GMT + Mon, 02 Aug 2021 19:42:21 GMT @@ -1020,7 +1020,7 @@

Response

Set-Cookie - csrftoken=YmGuq23VN8LPJwTA3AHumMTY4O5SGoFTKg3OkGGMFaU9mTbrb6agYGNlc18hjNFI; expires=Fri, 10 Jun 2022 19:06:00 GMT; Max-Age=31449600; Path=/; SameSite=Lax, sessionid=cvsvetg0gqphffzby4xaat2y64yjzjtb; expires=Fri, 25 Jun 2021 19:06:00 GMT; HttpOnly; Max-Age=1209600; Path=/; SameSite=Lax + csrftoken=sZ7PurCZqMnXEL4dKwungZQowtPHRW2fkdzmkGNA40Flznv8RTTNA8tW9nWgMRUv; expires=Mon, 01 Aug 2022 19:42:20 GMT; Max-Age=31449600; Path=/; SameSite=Lax, sessionid=lnpv9jg4vf4d9htr72p326t4yxoqc2zo; expires=Mon, 16 Aug 2021 19:42:20 GMT; HttpOnly; Max-Age=1209600; Path=/; SameSite=Lax @@ -1047,10 +1047,10 @@

Response

- cf-request-id + Last-Modified - 0a9e1094bf0000589e99033000000001 + Mon, 02 Aug 2021 19:42:21 GMT @@ -1060,7 +1060,7 @@

Response

Report-To - {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v2?s=iiC%2BG49T%2Bozx16aUTb8GWPayA%2FtGH9zWdraejVJCfivBCWHqPpcyPXsQSoUepgIkRzB3pvSswoOtwLuQ6wwu20INadWJr5zDiANfUJJPG5k%2FjQnpxQ197NVTfj2G8QLD5pNnIZ8LYBpbHQ%3D%3D"}],"group":"cf-nel","max_age":604800} + {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=%2BwB8POE1D%2Brr0f03O0f%2Bl%2BZel7JYdo2ffIMA23SnHs4imb2iKuadQfOvwaZ3eL1JUmNJV%2BwD8hO45nHdLK5qTzdwzuuCNwNiK%2BscE8CGskhPpsOt4Av6Ku3ofganm98hun1mVMuvpThNgsXL6rRZ"}],"group":"cf-nel","max_age":604800} @@ -1070,7 +1070,7 @@

Response

NEL - {"report_to":"cf-nel","max_age":604800} + {"report_to":"cf-nel","max_age":604800} @@ -1090,7 +1090,7 @@

Response

CF-RAY - 65dd1d346a25589e-POA + 6789c9f159d658aa-POA @@ -1110,7 +1110,7 @@

Response

alt-svc - h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400, h3=":443"; ma=86400 + h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400, h3=":443"; ma=86400 @@ -1121,7 +1121,7 @@

Response

Content

- {"key": "SENSITIVE_INFORMATION"} + {"key": "SENSITIVE_INFORMATION"}

@@ -1166,7 +1166,7 @@

Tests

- snippets-api::get_token::response_time_is_under_a_second + snippets-api::get_token::response_time_is_under_two_seconds @@ -1221,7 +1221,7 @@

Request

User-Agent - python-requests/2.24.0 + python-requests/2.26.0 @@ -1280,14 +1280,14 @@

Request

Body -

{"title": "Hello World", "code": "print('hello world')", "style": "xcode", "language": "python"}

+

{"title": "Hello World", "code": "print('hello world')", "style": "xcode", "language": "python"}

cURL -
curl -X POST -H "User-Agent: python-requests/2.24.0" -H "Accept-Encoding: gzip, deflate" -H "Accept: */*" -H "Connection: keep-alive" -H "Content-Type: application/json" -H "Authorization: SENSITIVE_INFORMATION" -H "Content-Length: 96" -d '{"title": "Hello World", "code": "print('hello world')", "style": "xcode", "language": "python"}' http://demo.scanapi.dev/api/v1/snippets/ --compressed
+
curl -X POST -H "User-Agent: python-requests/2.26.0" -H "Accept-Encoding: gzip, deflate" -H "Accept: */*" -H "Connection: keep-alive" -H "Content-Type: application/json" -H "Authorization: SENSITIVE_INFORMATION" -H "Content-Length: 96" -d '{"title": "Hello World", "code": "print('hello world')", "style": "xcode", "language": "python"}' http://demo.scanapi.dev/api/v1/snippets/ --compressed
@@ -1309,7 +1309,7 @@

Response

response time - 0.50372 s + 0.501231 s @@ -1343,7 +1343,7 @@

Response

Date - Fri, 11 Jun 2021 19:06:01 GMT + Mon, 02 Aug 2021 19:42:21 GMT @@ -1380,17 +1380,17 @@

Response

- Location + location - http://demo.scanapi.dev/api/v1/snippets/231/ + http://demo.scanapi.dev/api/v1/snippets/630/ - Vary + vary Accept @@ -1400,7 +1400,7 @@

Response

- Allow + allow GET, POST, HEAD, OPTIONS @@ -1410,7 +1410,7 @@

Response

- X-Frame-Options + x-frame-options DENY @@ -1420,7 +1420,7 @@

Response

- X-Content-Type-Options + x-content-type-options nosniff @@ -1430,7 +1430,7 @@

Response

- Referrer-Policy + referrer-policy same-origin @@ -1440,7 +1440,7 @@

Response

- Via + via 1.1 vegur @@ -1457,23 +1457,13 @@

Response

- - - - cf-request-id - - - 0a9e1098380000589f64313000000001 - - - Report-To - {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v2?s=C%2Frq2hLdVoCxGMLKau8Yuaei723ocqnLOTspmg%2BWzJjwAPl5uEsJ6ZJMpw8Yu0vM3ZOZm2JtTJGdu49%2FQl4ImgCVP%2BeSBU9RkTuhbDptXp1jQV2XUj45wGbJnFq9EP%2BN%2FnZguPNxnC763w%3D%3D"}],"group":"cf-nel","max_age":604800} + {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=ftLeEnPmuLm9xEs9BXvFC6sC5aVjS9syv7F0zJPNuPhT11RmQgVqszBUTJs%2FhRTnLReelSbSIKpgIYlEqQz1TAbeSImL%2FAH1Rr7c%2FKWaZJGIST%2F0YZpqe%2BZp%2BWveJihueOlEnRE8Y7iz7yvzNPV3"}],"group":"cf-nel","max_age":604800} @@ -1483,7 +1473,7 @@

Response

NEL - {"report_to":"cf-nel","max_age":604800} + {"report_to":"cf-nel","max_age":604800} @@ -1503,7 +1493,7 @@

Response

CF-RAY - 65dd1d39f966589f-POA + 6789c9f68fc4589e-POA @@ -1513,7 +1503,7 @@

Response

alt-svc - h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400, h3=":443"; ma=86400 + h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400, h3=":443"; ma=86400 @@ -1524,7 +1514,7 @@

Response

Content

- {"url":"http://demo.scanapi.dev/api/v1/snippets/231/","id":231,"highlight":"http://demo.scanapi.dev/api/v1/snippets/231/highlight/","owner":"guest","title":"Hello World","code":"print('hello world')","linenos":false,"language":"python","style":"xcode"} + {"url":"http://demo.scanapi.dev/api/v1/snippets/630/","id":630,"highlight":"http://demo.scanapi.dev/api/v1/snippets/630/highlight/","owner":"guest","title":"Hello World","code":"print('hello world')","linenos":false,"language":"python","style":"xcode"}

@@ -1555,7 +1545,7 @@

Tests

- snippets-api::snippets::create::response_time_is_under_a_second + snippets-api::snippets::create::response_time_is_under_two_seconds @@ -1701,7 +1691,7 @@

Tests