aboutsummaryrefslogtreecommitdiffstats
path: root/extras/hs-test/http_test.go
AgeCommit message (Collapse)AuthorFilesLines
17 hourshsa: added request repeating to http clientAdrian Villin1-1/+77
- added request repeating (repeat <count>|duration <seconds>) - added basic stats Type: feature Change-Id: Ic69eac8029eac31ea5ace5b5c0da1ce7a3543ac0 Signed-off-by: Adrian Villin <avillin@cisco.com>
7 dayshttp: state machine improvementMatus Fabian1-3/+3
Split in two, one for rx and second for tx, which is more suitable for http tunnels. Updated state names too, some of them were bit confusing. Type: improvement Change-Id: I2310deaa49196819f9d8147a5d9af188465dbd65 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-11-04hsa: added GET method to clientAdrian Villin1-9/+93
Type: improvement Change-Id: I46f7e1e2b509a463ff4b2492bf6412b67a1afdc4 Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-10-29http: "absolute-form" target URL parsingMatus Fabian1-19/+6
Type: improvement Change-Id: If39680a148d39add40433547369b2ddad3c2e226 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-10-25http: pass timeout using extended configMatus Fabian1-3/+33
App can now pass http connection timeout using extended configuration, ext cfg type TRANSPORT_ENDPT_EXT_CFG_HTTP, value (in seconds) set in ext cfg member opaque. It is optional, default value is 60 seconds. Type: improvement Change-Id: Ibeff4bbd3153421be350ff564ec3c8e52e5b9639 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-10-14http: Content-Length value parsing improvementMatus Fabian1-1/+1
Type: improvement Change-Id: Ida8ca43b5fed41fc0b13a2dde97e7e35c55283c9 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-10-14hs-test: http_static wrk testsMatus Fabian1-1/+35
Type: test Change-Id: I87cddb88f2a62e79d66832827134ddaa95740839 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-10-10hs-test: added dry run modeAdrian Villin1-7/+7
- DRYRUN=true will set up most containers. Some need to be started manually (curl, nginx...). The framework will create a vpp-config file with interface configs that will get executed on VPP startup. - set Ginkgo to use -v instead of -vv when running a single test - s.Log() now supports formatting - added 'useEnvVars' parameter to container.Exec Type: test Change-Id: Id1da7947a1448ee4b74b86cc4f243442256a5ba8 Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-10-03hs-test: prom consecutive connections testMatus Fabian1-24/+40
Type: test Change-Id: Ide4571dd8ac9bcb64fcd5ba408b6d1f99d34185f Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-09-28hs-test: replaced gofmt with goimportsAdrian Villin1-2/+3
- goimports properly formats imports Type: test Change-Id: I78c162dd552fd3ee3d59955d7ea215af30601425 Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-09-08http: large POST handlingMatus Fabian1-6/+40
Type: improvement Change-Id: I28b8e8ccbff6f97e669b0048011b187decbfc892 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-08-28http: http_state_wait_app_reply improvementMatus Fabian1-4/+19
set http status according to whether app also sent the body Type: improvement Change-Id: Ia41603cc21b410ca6929ec3d3e7c4c6808305769 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-08-26hs-test: http tests improvementMatus Fabian1-136/+118
- added http specific asserts - added helper functions to NoTopoSuite Type: test Change-Id: I0a7e77ed3ffd938aa3eaa37ed5432fbaab0dab64 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-08-23http: status line parsing fixMatus Fabian1-2/+25
Request line must only start with method name and server should ignore at least one empty line (CRLF) received prior to the request-line. Type: fix Change-Id: Ifebd992dc4c13df1a3fabfcdef9e7ee644150a21 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-08-22http_static: added last-modified headerAdrian Villin1-1/+12
Type: improvement Change-Id: I492df92ef25f9c0cd57fc8980500b58bebaa94c6 Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-08-21hs-test: generate core dump, fix docker logs in CIAdrian Villin1-1/+0
Type: test Change-Id: Ie1f66cdc061d3eccefc2ce58e977d88a33340038 Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-08-20vppinfra: fix format_clib_timebase_timeAdrian Villin1-0/+2
- make the format RFC9110 compliant Type: fix Change-Id: I4272562ca1082285a596ef866ab6c4f405c64bc5 Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-08-20http_static: make max-age configurableAdrian Villin1-5/+21
Type: improvement Change-Id: I629add6e3f4219d56610c3785013f69dbe847844 Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-08-19http: make Media Types RFC9110 compliantAdrian Villin1-4/+4
- https://www.rfc-editor.org/rfc/rfc9110.html#name-media-type https://www.iana.org/assignments/media-types/media-types.xhtml Type: improvement Change-Id: I2624dc39a985ff3999aed6e1c833220b7049828d Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-08-16http: http_read_message improvementMatus Fabian1-1/+35
Use svm_fifo_peek in http_read_message and advance rx fifo head by amount of bytes send to app, since not always you won't or can't send all bytes. Type: improvement Change-Id: I84348c9df5c77ba386c9738a754295bb9ea0f7ef Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-08-09http: authority-form target parsing/serializingMatus Fabian1-1/+21
Type: improvement Change-Id: Ifb90818a3526d3d4030a66b1ef7eebedfe97978f Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-08-06http: client POST methodMatus Fabian1-10/+143
Type: improvement Change-Id: Iaa70abcee02866f9a6426a6e8e4709eeba0e8114 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-07-29http: client code improvementMatus Fabian1-4/+83
Client app can sends request target, custom header and body to HTTP layer. In response it receives all bytes as received from transport, aditionally we provide offset and length of headers and body. In addtion client app is now able to receive response with all status codes and Host header field is set in request at protocol layer. Type: improvement Change-Id: I8c8e2c8f99cdf500126b7c2c722aebc254aa0d9f Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-07-24prom: mem leak testMatus Fabian1-5/+45
Type: test Change-Id: Ibca5680778c9e27eb7b1ddbdba52f870852452fe Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-07-23prom: concurrent connections fixMatus Fabian1-1/+34
Type: fix Change-Id: I57814edb735e9dac916f2e01de95ccfb739ce655 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-07-23http: state machine fixMatus Fabian1-1/+96
When client sends second request without waiting for response of the first request http_ts_rx_callback should drop request (pipelining is not supported) instead of invoking return to state machine which can lead to erroneous state, e.g. reading random data from server app fifo. Added simple http static server url handler for testing to simulate long running request processing, for now hardcoded delay 5 seconds. Type: fix Change-Id: Ied9f7e2e4ee64c982f045c0f7f99a2dc5d7a2108 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-07-23http: return more than data from server appMatus Fabian1-13/+110
Server app could return headers in front of body/data buffer. Offers apis for building and serialization of headers section. HTTP layer now only add Date, Server and Content-Lengths headers, rest is up to app. Well known header names are predefined. Type: improvement Change-Id: If778bdfc9acf6b0d11a48f0a745a3a56c96c2436 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-06-24hs-test: move nginx tests into one fileMatus Fabian1-125/+1
Type: test Change-Id: Ie525636c6299a8306cba45e72f8ee6c9da6d6e4f Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-06-24hs-test: added interrupt mode testsAdrian Villin1-2/+19
Type: test Change-Id: I327fa1a4ea23a3af3aa33e5260367426a11e7b4f Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-06-14hs-test: separate infra from testsAdrian Villin1-330/+331
- most functions and vars now start with a capital letter: needed to access them outside the package that declares them - updated README.md - very minor changes in MAKEFILE Type: test Change-Id: I4b5a194f08f09d59e372e57da6451fbb5a1de4da Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-06-13http: return more than url to server appMatus Fabian1-2/+352
Provide all bytes as received from transport as data in the http message to server. Additionally provide offset and length of target path, target query, headers and body. Offers apis for parsing of headers, percent decoding, target path/query syntax verification. Type: improvement Change-Id: Idbe6f13afa378650cc5212ea7d3f9319183ebbbe Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-06-12hs-test: improved suite teardown and replaced PIDs with PPIDsAdrian Villin1-2/+0
- Fixed an issue where containers wouldn't stop and get removed when a test run is interrupted - Replaced PIDs with Ginkgo process indexes + PPIDs - Fixed CPU allocation for envoy and nginx-ldp containers - All container logs should now get saved properly Type: test Change-Id: I4c737c1d326390494c0dda1ec6d3fc1f04f51663 Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-06-10hs-test: HTTP download benchmarkingMatus Fabian1-18/+25
HttpTpsTest now use Gomega's gmeasure package and go internal http client. With gmeasure you can create "Experiments" which can produce reports to show the statistical distribution of measurement. Potentially experiments can also be cached and used to identify regression in performance. Type: test Change-Id: Id049fb0344d8ebed71b15e706b053b5c2a18e0de Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-06-06hs-test: more debug output in http3 testFlorin Coras1-0/+1
Type: test Change-Id: I4d2b949f5ef5446c04ca6f35b0bd659ce389170f Signed-off-by: Florin Coras <fcoras@cisco.com>
2024-06-05hs-test: keep ab/wrk containers alive until teardownAdrian Villin1-0/+2
- Fixes errors while obtaining container logs on test failure (NginxPerf tests), ab/wrk containers are now stopped on test teardown like other containers. Type: test Change-Id: Ic336fcd3ed6bf68dd345d378262cb28eb5efc789 Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-06-03hs-test: add libunwind dependency to nginx dockerfileAdrian Villin1-4/+0
- Libunwind was missing in Dockerfile.nginx, causing some tests to fail. Tests that were temporarily disabled because of that issue are now re-enabled. Type: test Change-Id: I3f544be483784e8a7a1f22737cafca615b9f836b Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-05-31hs-test: temp skip some testsAdrian Villin1-0/+4
- Some tests are broken in the CI, skipping them for now Type: test Change-Id: I3d4efeee63b819956e5ffa1b3920e81962a2fcc9 Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-05-31hs-test: container logging improvementsAdrian Villin1-1/+0
- Reduced the amount of error messages while obtaining container logs when a test fails by keeping track of started containers. NginxPerf tests still have those error messages, because wrk/ab containers shut themselves down before the test ends. Type: test Change-Id: I40a193345e5b46aec1834774f23aebc822eee885 Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-05-28http_static: sanitize path before file readMatus Fabian1-26/+31
Romove dot segments from requested target path before start reading file in file handler to prevent path traversal. Type: fix Change-Id: I3bdd3e9d7fffd33c9c8c608169c1dc73423b7078 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-05-23hs-test: fix CPU alloc when running in parallelAdrian Villin1-0/+2
Type: test Change-Id: I6062eddffb938880d9ec004c8418a9a731891989 Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-05-17http: ignore http_proxy env in testsMatus Fabian1-4/+19
Type: test Change-Id: I45a091a43e7ecb3f321fc9ecc761df2b44c9c351 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-05-14http: notify client when connection failedMatus Fabian1-1/+15
Type: fix Change-Id: I87054e9667fe990d9a2dc3950bc3ce348460018a Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-05-14http: fix server sending all status codesMatus Fabian1-8/+71
Type: fix Change-Id: I4bc748e3091c2fbe0142d1b74d21a543a62c4ce0 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-05-03http: fix http server in responseMatus Fabian1-1/+16
App name is used in HTTP response Server header. Type: fix Change-Id: Ie3b2d985dd7d554a0352f7e602891f878bebd031 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-05-01http: fix client receiving large dataFilip Tehlar1-1/+1
HTTP client was relying on synchronous rx notifications to the client app when moving lage data from underlying transport proto. Recent change in session layer made such notifications asynchronous making http client not working. This patch fixes the issue. Type: fix Change-Id: I4b24c6185a594a0fe8d5d87c149c53d3b40d7110 Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-04-19hs-test: transition to ginkgo test frameworkAdrian Villin1-16/+40
Type: test Change-Id: Ia38bf5549d20b22876f6082085b69a52a03d0142 Signed-off-by: Adrian Villin <avillin@cisco.com> Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-03-12hs-test: experimental support for multiple test instancesadrianvillin1-7/+7
- appending PID to interface and container names - added a check for used IP addresses - TestEnvoyProxyHttpTcp and TestTcpWithLoss are broken when running multiple instances Type: test Change-Id: Ib917079ec7cf851dee59ff9c67e74f48c7c5e3c6 Signed-off-by: adrianvillin <avillin@cisco.com>
2024-02-15hs-test: shortened interface names to avoid character limitadrianvillin1-2/+3
Type: test Change-Id: I09df597ccb8a3c4af47b8a36010afb81df533236 Signed-off-by: adrianvillin <avillin@cisco.com>
2024-02-15hs-test: improved loggingadrianvillin1-5/+5
- improved readability of some error messages - printing container logs to stdout on test failure (last 20 lines) Type: test Change-Id: Idbb358bdd89aa7b1a6bdc9d96bf029d4c299ce64 Signed-off-by: adrianvillin <avillin@cisco.com>
2024-01-18hs-test: use specific port for http3 testFilip Tehlar1-1/+1
curl sometimes uses 2 different source ports during the test. Type: test Change-Id: Ib27e9d22a9cc951f4729f4bd0ae99d80bf8d938b Signed-off-by: Filip Tehlar <ftehlar@cisco.com>