diff --git a/connectivity/suite.go b/connectivity/suite.go index dfe4932f6e..15cfbe3cde 100644 --- a/connectivity/suite.go +++ b/connectivity/suite.go @@ -206,6 +206,14 @@ func Run(ctx context.Context, ct *check.ConnectivityTest, addExtraTests func(*ch return ct.Run(ctx) } + // BandWidth Manager Test + if ct.Params().BandWidthManager { + ct.NewTest("bandwidth-manager").WithScenarios( + tests.BandWidthManager(""), + ) + return ct.Run(ctx) + } + // Upgrade Test if ct.Params().IncludeUpgradeTest { ct.NewTest("post-upgrade").WithScenarios( diff --git a/connectivity/tests/bandwidth.go b/connectivity/tests/bandwidth.go new file mode 100644 index 0000000000..af2983cb72 --- /dev/null +++ b/connectivity/tests/bandwidth.go @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright Authors of Cilium + +package tests + +import ( + "context" + "fmt" + + "github.com/cilium/cilium-cli/connectivity/check" +) + +// BandWidth Manager +func BandWidthManager(n string) check.Scenario { + return &bandWidthManager{ + name: n, + } +} + +// bandWidthManager implements a Scenario. +type bandWidthManager struct { + name string +} + +func (b *bandWidthManager) Name() string { + tn := "bandwidth-manager" + if b.name == "" { + return tn + } + return fmt.Sprintf("%s:%s", tn, b.name) +} + +func (b *bandWidthManager) Run(ctx context.Context, t *check.Test) { + for _, c := range t.Context().PerfClientPods() { + c := c + for _, server := range t.Context().PerfServerPod() { + action := t.NewAction(b, "bandwidth", &c, server, check.IPFamilyV4) + action.Run(func(a *check.Action) {}) + } + } +}