From 608d0069d98579b0635be978dea8e316f77a8841 Mon Sep 17 00:00:00 2001 From: Filip Tehlar Date: Fri, 28 Apr 2023 10:29:47 +0200 Subject: hs-test: support for multiple workers Type: test Signed-off-by: Filip Tehlar Change-Id: Ie90e4b02c268bc3ca40171b03829f5686fb83162 --- extras/hs-test/suite_veth_test.go | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'extras/hs-test/suite_veth_test.go') diff --git a/extras/hs-test/suite_veth_test.go b/extras/hs-test/suite_veth_test.go index be79ce250fb..bb703df6981 100644 --- a/extras/hs-test/suite_veth_test.go +++ b/extras/hs-test/suite_veth_test.go @@ -16,22 +16,18 @@ type VethsSuite struct { func (s *VethsSuite) SetupSuite() { time.Sleep(1 * time.Second) - + s.HstSuite.SetupSuite() s.configureNetworkTopology("2peerVeth") - s.loadContainerTopology("2peerVeth") } func (s *VethsSuite) SetupTest() { - s.skipIfUnconfiguring() - - s.setupVolumes() - s.setupContainers() + s.HstSuite.SetupTest() // Setup test conditions - var startupConfig Stanza - startupConfig. + var sessionConfig Stanza + sessionConfig. newStanza("session"). append("enable"). append("use-app-socket-api").close() @@ -39,7 +35,8 @@ func (s *VethsSuite) SetupTest() { // ... For server serverContainer := s.getContainerByName("server-vpp") - serverVpp, _ := serverContainer.newVppInstance(startupConfig) + cpus := s.AllocateCpus() + serverVpp, _ := serverContainer.newVppInstance(cpus, sessionConfig) s.assertNotNil(serverVpp) s.setupServerVpp() @@ -47,7 +44,8 @@ func (s *VethsSuite) SetupTest() { // ... For client clientContainer := s.getContainerByName("client-vpp") - clientVpp, _ := clientContainer.newVppInstance(startupConfig) + cpus = s.AllocateCpus() + clientVpp, _ := clientContainer.newVppInstance(cpus, sessionConfig) s.assertNotNil(clientVpp) s.setupClientVpp() @@ -67,7 +65,6 @@ func (s *VethsSuite) setupServerVpp() { namespaceSecret := "1" err = serverVpp.addAppNamespace(1, idx, namespaceSecret) s.assertNil(err) - } func (s *VethsSuite) setupClientVpp() { -- cgit 1.2.3-korg