aboutsummaryrefslogtreecommitdiffstats
path: root/extras/hs-test/infra/hst_suite.go
diff options
context:
space:
mode:
Diffstat (limited to 'extras/hs-test/infra/hst_suite.go')
-rw-r--r--extras/hs-test/infra/hst_suite.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/extras/hs-test/infra/hst_suite.go b/extras/hs-test/infra/hst_suite.go
index 0513e86e47b..9a3a3c9c8f6 100644
--- a/extras/hs-test/infra/hst_suite.go
+++ b/extras/hs-test/infra/hst_suite.go
@@ -364,6 +364,15 @@ func (s *HstSuite) AssertChannelClosed(timeout time.Duration, channel chan error
EventuallyWithOffset(2, channel).WithTimeout(timeout).Should(BeClosed())
}
+// Pass the parsed result struct and the minimum amount of data transferred in MB
+func (s *HstSuite) AssertIperfMinTransfer(result IPerfResult, minTransferred int) {
+ if result.Start.Details.Protocol == "TCP" {
+ s.AssertGreaterThan(result.End.TcpReceived.MBytes, minTransferred)
+ } else {
+ s.AssertGreaterThan(result.End.Udp.MBytes, minTransferred)
+ }
+}
+
func (s *HstSuite) CreateLogger() {
suiteName := s.GetCurrentSuiteName()
var err error