diff options
author | Adrian Villin <avillin@cisco.com> | 2024-06-14 09:32:39 +0200 |
---|---|---|
committer | Dave Wallace <dwallacelf@gmail.com> | 2024-06-14 18:10:26 +0000 |
commit | 4677d920c0b0ff1f1aae81fb2f0052d939a2e89c (patch) | |
tree | 9c1adf90f6c1a977b622c1d0211e0e86d1bef985 /extras/hs-test/linux_iperf_test.go | |
parent | 2aa0f0da5dedcf6301c74a39b5e3749359e07e6d (diff) |
hs-test: separate infra from tests
- most functions and vars now start with a capital letter:
needed to access them outside the package that declares
them
- updated README.md
- very minor changes in MAKEFILE
Type: test
Change-Id: I4b5a194f08f09d59e372e57da6451fbb5a1de4da
Signed-off-by: Adrian Villin <avillin@cisco.com>
Diffstat (limited to 'extras/hs-test/linux_iperf_test.go')
-rw-r--r-- | extras/hs-test/linux_iperf_test.go | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/extras/hs-test/linux_iperf_test.go b/extras/hs-test/linux_iperf_test.go index e323f7fb721..f49d9bcf227 100644 --- a/extras/hs-test/linux_iperf_test.go +++ b/extras/hs-test/linux_iperf_test.go @@ -1,13 +1,13 @@ package main import ( + . "fd.io/hs-test/infra" "fmt" - . "github.com/onsi/ginkgo/v2" ) func init() { - registerTapTests(LinuxIperfTest) + RegisterTapTests(LinuxIperfTest) } func LinuxIperfTest(s *TapSuite) { @@ -21,20 +21,20 @@ func LinuxIperfTest(s *TapSuite) { go func() { defer GinkgoRecover() - s.startServerApp(srvCh, stopServerCh, nil) + s.StartServerApp(srvCh, stopServerCh, nil) }() err := <-srvCh - s.assertNil(err, fmt.Sprint(err)) - s.log("server running") + s.AssertNil(err, fmt.Sprint(err)) + s.Log("server running") - ipAddress := s.getInterfaceByName(tapInterfaceName).ip4AddressString() + ipAddress := s.GetInterfaceByName(TapInterfaceName).Ip4AddressString() go func() { defer GinkgoRecover() - s.startClientApp(ipAddress, nil, clnCh, clnRes) + s.StartClientApp(ipAddress, nil, clnCh, clnRes) }() - s.log("client running") - s.log(<-clnRes) + s.Log("client running") + s.Log(<-clnRes) err = <-clnCh - s.assertNil(err, "err: '%s', ip: '%s'", err, ipAddress) - s.log("Test completed") + s.AssertNil(err, "err: '%s', ip: '%s'", err, ipAddress) + s.Log("Test completed") } |