aboutsummaryrefslogtreecommitdiffstats
path: root/extras
diff options
context:
space:
mode:
authorMatus Fabian <matfabia@cisco.com>2024-10-29 15:06:49 +0100
committerMatus Fabian <matfabia@cisco.com>2024-10-29 17:26:04 +0100
commit769a3b725685e8b9c1394679a61bc864aa701e7f (patch)
tree36ca376380d66b9ace84dd7ce826f288da28cbeb /extras
parentdcc6cd4333431aebcba3e17544681c120958cd59 (diff)
http: "absolute-form" target URL parsing
Type: improvement Change-Id: If39680a148d39add40433547369b2ddad3c2e226 Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'extras')
-rw-r--r--extras/hs-test/docker/Dockerfile.vpp1
-rw-r--r--extras/hs-test/http_test.go25
-rw-r--r--extras/hs-test/infra/vppinstance.go1
3 files changed, 8 insertions, 19 deletions
diff --git a/extras/hs-test/docker/Dockerfile.vpp b/extras/hs-test/docker/Dockerfile.vpp
index 82a1a1a73d3..5f5d41ce610 100644
--- a/extras/hs-test/docker/Dockerfile.vpp
+++ b/extras/hs-test/docker/Dockerfile.vpp
@@ -13,6 +13,7 @@ COPY \
$DIR/af_packet_plugin.so \
$DIR/hs_apps_plugin.so \
$DIR/http_plugin.so \
+ $DIR/http_unittest_plugin.so \
$DIR/unittest_plugin.so \
$DIR/quic_plugin.so \
$DIR/http_static_plugin.so \
diff --git a/extras/hs-test/http_test.go b/extras/hs-test/http_test.go
index 0b345d140ff..7d0063d7540 100644
--- a/extras/hs-test/http_test.go
+++ b/extras/hs-test/http_test.go
@@ -31,7 +31,7 @@ func init() {
HttpStaticMacTimeTest, HttpStaticBuildInUrlGetVersionVerboseTest, HttpVersionNotSupportedTest,
HttpInvalidContentLengthTest, HttpInvalidTargetSyntaxTest, HttpStaticPathTraversalTest, HttpUriDecodeTest,
HttpHeadersTest, HttpStaticFileHandlerTest, HttpStaticFileHandlerDefaultMaxAgeTest, HttpClientTest, HttpClientErrRespTest, HttpClientPostFormTest,
- HttpClientPostFileTest, HttpClientPostFilePtrTest, AuthorityFormTargetTest, HttpRequestLineTest,
+ HttpClientPostFileTest, HttpClientPostFilePtrTest, HttpUnitTest, HttpRequestLineTest,
HttpStaticFileHandlerWrkTest, HttpStaticUrlHandlerWrkTest, HttpConnTimeoutTest)
RegisterNoTopoSoloTests(HttpStaticPromTest, HttpGetTpsTest, HttpGetTpsInterruptModeTest, PromConcurrentConnectionsTest,
PromMemLeakTest, HttpClientPostMemLeakTest, HttpInvalidClientRequestMemLeakTest, HttpPostTpsTest, HttpPostTpsInterruptModeTest,
@@ -352,24 +352,11 @@ func HttpClientPostFilePtrTest(s *NoTopoSuite) {
httpClientPostFile(s, true, 131072)
}
-func cliTestAuthority(s *NoTopoSuite, authority string) {
- o := s.GetContainerByName("vpp").VppInstance.Vppctl("test http authority-form " + authority)
- s.AssertNotContains(o, "error")
- s.AssertContains(o, authority)
-}
-
-func cliTestAuthorityError(s *NoTopoSuite, authority string) {
- o := s.GetContainerByName("vpp").VppInstance.Vppctl("test http authority-form " + authority)
- s.AssertContains(o, "error")
-}
-
-func AuthorityFormTargetTest(s *NoTopoSuite) {
- cliTestAuthority(s, "10.10.2.45:20")
- cliTestAuthority(s, "[dead:beef::1234]:443")
- cliTestAuthorityError(s, "example.com:80")
- cliTestAuthorityError(s, "10.10.2.45")
- cliTestAuthorityError(s, "1000.10.2.45:20")
- cliTestAuthorityError(s, "[xyz0::1234]:443")
+func HttpUnitTest(s *NoTopoSuite) {
+ vpp := s.GetContainerByName("vpp").VppInstance
+ o := vpp.Vppctl("test http all")
+ s.Log(o)
+ s.AssertNotContains(o, "FAIL")
}
func HttpStaticPromTest(s *NoTopoSuite) {
diff --git a/extras/hs-test/infra/vppinstance.go b/extras/hs-test/infra/vppinstance.go
index dac13bfad9a..d40fbffe63c 100644
--- a/extras/hs-test/infra/vppinstance.go
+++ b/extras/hs-test/infra/vppinstance.go
@@ -60,6 +60,7 @@ plugins {
plugin af_packet_plugin.so { enable }
plugin hs_apps_plugin.so { enable }
plugin http_plugin.so { enable }
+ plugin http_unittest_plugin.so { enable }
plugin http_static_plugin.so { enable }
plugin prom_plugin.so { enable }
plugin tlsopenssl_plugin.so { enable }