From 9418143bd4c8f3bb46c32800c1ae85b20bbe8815 Mon Sep 17 00:00:00 2001 From: Filip Tehlar Date: Mon, 15 Jan 2024 13:11:28 +0100 Subject: [PATCH] hs-test: change convention for skipping tests Also re-enable external echo QUIC test. Type: test Change-Id: I3973409c31fd7c42b97ac3ceae1a5cbad6f1b2b6 Signed-off-by: Filip Tehlar --- extras/hs-test/README.rst | 12 ++++++++++++ extras/hs-test/raw_session_test.go | 5 ++--- extras/hs-test/vcl_test.go | 4 ++-- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/extras/hs-test/README.rst b/extras/hs-test/README.rst index 2b1dd2d5713..2caa65d7a83 100644 --- a/extras/hs-test/README.rst +++ b/extras/hs-test/README.rst @@ -183,6 +183,18 @@ These types of functions are placed in the ``utils.go`` file. If the external pr add its installation to ``extras/hs-test/Dockerfile.vpp`` in ``apt-get install`` command. Alternatively copy the executable from host system to the Docker image, similarly how the VPP executables and libraries are being copied. +**Skipping tests** + +``HstSuite`` provides several methods that can be called in tests for skipping it conditionally or unconditionally such as: +``skip()``, ``SkipIfMultiWorker()``, ``SkipUnlessExtendedTestsBuilt()``. +However the tests currently run under test suites which set up topology and containers before actual test is run. For the reason of saving +test run time it is not advisable to use aforementioned skip methods and instead prefix test name with ``Skip``: + +:: + + func (s *MySuite) SkipTest(){ + + **Eternal dependencies** * Linux tools ``ip``, ``brctl`` diff --git a/extras/hs-test/raw_session_test.go b/extras/hs-test/raw_session_test.go index 655afb6548c..45c4278c470 100644 --- a/extras/hs-test/raw_session_test.go +++ b/extras/hs-test/raw_session_test.go @@ -1,12 +1,11 @@ package main func (s *VethsSuite) TestVppEchoQuic() { - s.skip("quic test skipping..") s.testVppEcho("quic") } -func (s *VethsSuite) TestVppEchoUdp() { - s.skip("udp echo currently broken in vpp, skipping..") +// udp echo currently broken in vpp, skipping +func (s *VethsSuite) SkipTestVppEchoUdp() { s.testVppEcho("udp") } diff --git a/extras/hs-test/vcl_test.go b/extras/hs-test/vcl_test.go index a949565f299..281b91617b9 100644 --- a/extras/hs-test/vcl_test.go +++ b/extras/hs-test/vcl_test.go @@ -105,8 +105,8 @@ func (s *VethsSuite) TestVclEchoUdp() { s.testVclEcho("udp") } -func (s *VethsSuite) TestVclRetryAttach() { - s.skip("this test takes too long, for now it's being skipped") +// this test takes too long, for now it's being skipped +func (s *VethsSuite) SkipTestVclRetryAttach() { s.testRetryAttach("tcp") } -- 2.16.6