From 3628353e093752f34704a82ae85a27d8f951e05e Mon Sep 17 00:00:00 2001 From: Adrian Villin Date: Wed, 27 Nov 2024 09:47:44 +0100 Subject: [PATCH] hs-test: added ldp iperf tcp test - renamed other iperf tests Type: test Change-Id: I9cc7b49f23e9e0c6a01d2f74aef722d580478f75 Signed-off-by: Adrian Villin --- extras/hs-test/iperf_linux_test.go | 4 ++-- extras/hs-test/ldp_test.go | 15 +++++++++++---- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/extras/hs-test/iperf_linux_test.go b/extras/hs-test/iperf_linux_test.go index b2b52a758ed..ff1467c48eb 100644 --- a/extras/hs-test/iperf_linux_test.go +++ b/extras/hs-test/iperf_linux_test.go @@ -9,10 +9,10 @@ import ( ) func init() { - RegisterIperfTests(IperfLinuxTest) + RegisterIperfTests(IperfUdpLinuxTest) } -func IperfLinuxTest(s *IperfSuite) { +func IperfUdpLinuxTest(s *IperfSuite) { serverContainer := s.GetContainerByName(ServerIperfContainerName) serverIpAddress := s.GetInterfaceByName(ServerIperfInterfaceName).Ip4AddressString() clientContainer := s.GetContainerByName(ClientIperfContainerName) diff --git a/extras/hs-test/ldp_test.go b/extras/hs-test/ldp_test.go index deba2141d08..32473d54afd 100644 --- a/extras/hs-test/ldp_test.go +++ b/extras/hs-test/ldp_test.go @@ -9,15 +9,18 @@ import ( ) func init() { - RegisterLdpTests(LDPreloadIperfVppTest, LDPreloadIperfVppInterruptModeTest, RedisBenchmarkTest, LDPreloadIperfTlsTcpTest) + RegisterLdpTests(LdpIperfUdpVppTest, LdpIperfUdpVppInterruptModeTest, RedisBenchmarkTest, LdpIperfTlsTcpTest, LdpIperfTcpVppTest) } -func LDPreloadIperfVppInterruptModeTest(s *LdpSuite) { +func LdpIperfUdpVppInterruptModeTest(s *LdpSuite) { ldPreloadIperfVpp(s, true) } -func LDPreloadIperfTlsTcpTest(s *LdpSuite) { +func LdpIperfTlsTcpTest(s *LdpSuite) { for _, c := range s.Containers { + defer delete(c.EnvVars, "LDP_TRANSPARENT_TLS") + defer delete(c.EnvVars, "LDP_TLS_CERT_FILE") + defer delete(c.EnvVars, "LDP_TLS_KEY_FILE") c.Exec(false, "openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout key.key -out crt.crt -subj \"/CN=test\"") c.AddEnvVar("LDP_TRANSPARENT_TLS", "1") c.AddEnvVar("LDP_TLS_CERT_FILE", "/crt.crt") @@ -26,7 +29,11 @@ func LDPreloadIperfTlsTcpTest(s *LdpSuite) { ldPreloadIperfVpp(s, false) } -func LDPreloadIperfVppTest(s *LdpSuite) { +func LdpIperfTcpVppTest(s *LdpSuite) { + ldPreloadIperfVpp(s, false) +} + +func LdpIperfUdpVppTest(s *LdpSuite) { ldPreloadIperfVpp(s, true) }