}
func (s *CpuPinningSuite) TeardownTest() {
+ defer s.HstSuite.TeardownTest()
// reset vars
s.CpuCount = *NConfiguredCpus
s.CpuAllocator.maxContainerCount = s.previousMaxContainerCount
- s.HstSuite.TeardownTest()
-
}
var _ = Describe("CpuPinningSuite", Ordered, ContinueOnFailure, func() {
}
func (s *EnvoyProxySuite) TeardownTest() {
+ defer s.HstSuite.TeardownTest()
if CurrentSpecReport().Failed() {
s.CollectNginxLogs(s.Containers.NginxServerTransient)
s.CollectEnvoyLogs(s.Containers.EnvoyProxy)
}
- s.HstSuite.TeardownTest()
}
func (s *EnvoyProxySuite) ProxyAddr() string {
}
func (s *LdpSuite) TeardownTest() {
+ defer s.HstSuite.TeardownTest()
if CurrentSpecReport().Failed() {
s.CollectIperfLogs(s.Containers.ServerApp)
s.CollectRedisServerLogs(s.Containers.ServerApp)
delete(container.EnvVars, "LD_PRELOAD")
delete(container.EnvVars, "VCL_CONFIG")
}
- s.HstSuite.TeardownTest()
-
}
func (s *LdpSuite) CreateVclConfig(container *Container) {
}
func (s *NginxProxySuite) TeardownTest() {
+ defer s.HstSuite.TeardownTest()
if CurrentSpecReport().Failed() {
s.CollectNginxLogs(s.Containers.NginxProxy)
s.CollectNginxLogs(s.Containers.NginxServerTransient)
}
- s.HstSuite.TeardownTest()
}
func (s *NginxProxySuite) CreateNginxProxyConfig(container *Container, multiThreadWorkers bool) {
}
func (s *NoTopoSuite) TeardownTest() {
+ defer s.HstSuite.TeardownTest()
if CurrentSpecReport().Failed() {
s.CollectNginxLogs(s.Containers.NginxHttp3)
}
- s.HstSuite.TeardownTest()
}
func (s *NoTopoSuite) CreateNginxConfig(container *Container, multiThreadWorkers bool) {
}
func (s *NoTopo6Suite) TeardownTest() {
+ defer s.HstSuite.TeardownTest()
if CurrentSpecReport().Failed() {
s.CollectNginxLogs(s.Containers.NginxHttp3)
}
- s.HstSuite.TeardownTest()
}
func (s *NoTopo6Suite) CreateNginxConfig(container *Container, multiThreadWorkers bool) {
}
func (s *VppProxySuite) TeardownTest() {
+ defer s.HstSuite.TeardownTest()
vpp := s.Containers.VppProxy.VppInstance
if CurrentSpecReport().Failed() {
s.Log(vpp.Vppctl("show session verbose 2"))
s.CollectNginxLogs(s.Containers.NginxServerTransient)
s.CollectIperfLogs(s.Containers.IperfS)
}
- s.HstSuite.TeardownTest()
}
func (s *VppProxySuite) SetupNginxServer() {
}
func (s *VppUdpProxySuite) TeardownTest() {
+ defer s.HstSuite.TeardownTest()
vpp := s.Containers.VppProxy.VppInstance
if CurrentSpecReport().Failed() {
s.Log(vpp.Vppctl("show session verbose 2"))
s.Log(vpp.Vppctl("show error"))
}
- s.HstSuite.TeardownTest()
}
func (s *VppUdpProxySuite) VppProxyAddr() string {
}
func (vpp *VppInstance) Vppctl(command string, arguments ...any) string {
+ defer func() {
+ if r := recover(); r != nil {
+ fmt.Printf("\n*******************************************************************************\n"+
+ "[%v]\nyou probably used Vppctl() without creating a vppinstance first or used Vppctl() on the wrong container\n"+
+ "*******************************************************************************\n", r)
+ }
+ }()
+
vppCliCommand := fmt.Sprintf(command, arguments...)
containerExecCommand := fmt.Sprintf("docker exec --detach=false %[1]s vppctl -s %[2]s %[3]s",
vpp.Container.Name, vpp.getCliSocket(), vppCliCommand)