package main

import (
	. "fd.io/hs-test/infra"
	"fmt"
	. "github.com/onsi/ginkgo/v2"
)

func init() {
	RegisterTapTests(LinuxIperfTest)
}

func LinuxIperfTest(s *TapSuite) {
	clnCh := make(chan error)
	stopServerCh := make(chan struct{})
	srvCh := make(chan error, 1)
	clnRes := make(chan string, 1)
	defer func() {
		stopServerCh <- struct{}{}
	}()

	go func() {
		defer GinkgoRecover()
		s.StartServerApp(srvCh, stopServerCh, nil)
	}()
	err := <-srvCh
	s.AssertNil(err, fmt.Sprint(err))
	s.Log("server running")

	ipAddress := s.GetInterfaceByName(TapInterfaceName).Ip4AddressString()
	go func() {
		defer GinkgoRecover()
		s.StartClientApp(ipAddress, nil, clnCh, clnRes)
	}()
	s.Log("client running")
	s.Log(<-clnRes)
	err = <-clnCh
	s.AssertNil(err, "err: '%s', ip: '%s'", err, ipAddress)
	s.Log("Test completed")
}
