Skip to content

Commit

Permalink
Add IPv4/v6 dual stack support in Flow aggregator
Browse files Browse the repository at this point in the history
Fix the e2e test failure in dual stack cluster of flow aggregator.
  • Loading branch information
Yongming Ding committed Mar 22, 2021
1 parent 2c1666d commit 543e90a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
8 changes: 1 addition & 7 deletions test/e2e/fixtures.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,6 @@ func skipIfNotIPv6Cluster(tb testing.TB) {
}
}

func skipIfDualStackCluster(tb testing.TB) {
if clusterInfo.podV6NetworkCIDR != "" && clusterInfo.podV4NetworkCIDR != "" {
tb.Skipf("Skipping test as it is not supported in dual stack cluster")
}
}

func skipIfMissingKernelModule(tb testing.TB, nodeName string, requiredModules []string) {
for _, module := range requiredModules {
// modprobe with "--dry-run" does not require root privileges
Expand Down Expand Up @@ -149,7 +143,7 @@ func setupTest(tb testing.TB) (*TestData, error) {

func setupTestWithIPFIXCollector(tb testing.TB) (*TestData, bool, error) {
isIPv6 := false
if clusterInfo.podV6NetworkCIDR != "" {
if clusterInfo.podV6NetworkCIDR != "" && clusterInfo.podV4NetworkCIDR == "" {
isIPv6 = true
}
testData, err := setupTest(tb)
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/flowaggregator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ const (
)

func TestFlowAggregator(t *testing.T) {
skipIfDualStackCluster(t)
data, isIPv6, err := setupTestWithIPFIXCollector(t)
if err != nil {
t.Fatalf("Error when setting up test: %v", err)
Expand Down Expand Up @@ -198,6 +197,7 @@ func checkRecordsForFlows(t *testing.T, data *TestData, srcIP string, dstIP stri
t.Errorf("Error when running iperf3 client: %v", err)
}
bandwidth := strings.TrimSpace(stdout)
t.Logf("cmd:%s, srcIP:%s, dstIP:%s, isIPv6:%v, bandwidth:%s", cmdStr, srcIP, dstIP, isIPv6, bandwidth)

// Polling to make sure all the data records corresponding to the iperf flow
// are received.
Expand Down

0 comments on commit 543e90a

Please sign in to comment.