Skip to content

Commit

Permalink
Fix Traceflow e2e tests for IPv6 (#2034)
Browse files Browse the repository at this point in the history
1. Change the TF name generation in e2e tests
2. Add `Packet` with `IPv6Header` to `tf.Spec` in TF LiveTraffic e2e tests
  • Loading branch information
GraysonWu authored Apr 7, 2021
1 parent e36c4f2 commit e9cf684
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions test/e2e/traceflow_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@ func TestTraceflowIntraNode(t *testing.T) {
ipVersion: 6,
tf: &v1alpha1.Traceflow{
ObjectMeta: metav1.ObjectMeta{
Name: randName(fmt.Sprintf("%s-%s-to-%s-", testNamespace, node1Pods[0], dstPodIPv6Str)),
Name: randName(fmt.Sprintf("%s-%s-to-%s-", testNamespace, node1Pods[0], strings.ReplaceAll(dstPodIPv6Str, ":", "--"))),
},
Spec: v1alpha1.TraceflowSpec{
Source: v1alpha1.Source{
Expand All @@ -755,6 +755,11 @@ func TestTraceflowIntraNode(t *testing.T) {
Destination: v1alpha1.Destination{
IP: dstPodIPv6Str,
},
Packet: v1alpha1.Packet{
IPv6Header: &v1alpha1.IPv6Header{
NextHeader: &protocolICMPv6,
},
},
LiveTraffic: true,
},
},
Expand Down Expand Up @@ -789,7 +794,7 @@ func TestTraceflowIntraNode(t *testing.T) {
ipVersion: 4,
tf: &v1alpha1.Traceflow{
ObjectMeta: metav1.ObjectMeta{
Name: randName(fmt.Sprintf("%s-%s-to-%s-", testNamespace, node1Pods[0], strings.ReplaceAll(gwIPv4Str, ":", "--"))),
Name: randName(fmt.Sprintf("%s-%s-to-%s-", testNamespace, node1Pods[0], gwIPv4Str)),
},
Spec: v1alpha1.TraceflowSpec{
Source: v1alpha1.Source{
Expand Down Expand Up @@ -1582,6 +1587,11 @@ func TestTraceflowInterNode(t *testing.T) {
Namespace: testNamespace,
Pod: node2Pods[0],
},
Packet: v1alpha1.Packet{
IPv6Header: &v1alpha1.IPv6Header{
NextHeader: &protocolICMPv6,
},
},
LiveTraffic: true,
},
},
Expand Down

0 comments on commit e9cf684

Please sign in to comment.