Skip to content

Commit

Permalink
OTG: Align the test TE_13.1 with ATE (openconfig#2021)
Browse files Browse the repository at this point in the history
* Align the test TE_13.1 with ATE

* update test
  • Loading branch information
ANISH-GOTTAPU authored Aug 21, 2023
1 parent 55b9642 commit b4a0a25
Showing 1 changed file with 8 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,13 @@ var (
ondatra.JUNIPER: "/var/core/",
ondatra.CISCO: "/misc/disk1/",
ondatra.NOKIA: "/var/core/",
ondatra.ARISTA: "/var/core/",
}
vendorCoreFileNamePattern = map[ondatra.Vendor]*regexp.Regexp{
ondatra.JUNIPER: regexp.MustCompile("rpd.*core*"),
ondatra.CISCO: regexp.MustCompile("emsd.*core.*"),
ondatra.NOKIA: regexp.MustCompile("coredump-sr_gribi_server-.*"),
ondatra.ARISTA: regexp.MustCompile("core.*"),
}
fibProgrammedEntries []string
)
Expand Down Expand Up @@ -388,6 +390,9 @@ func createTrafficFlow(t *testing.T, ate *ondatra.ATEDevice, top gosnappi.Config
v4.Src().SetValue(atePort1.IPv4)
v4.Dst().Increment().SetStart(flowArgs.flowStartAddress).SetCount(int32(flowArgs.flowCount))

ate.OTG().PushConfig(t, top)
ate.OTG().StartProtocols(t)

return flow
}

Expand Down Expand Up @@ -609,10 +614,7 @@ func TestRouteAdditionDuringFailover(t *testing.T) {
// flows 100% and reaches ATE port-2.
otgutils.WaitForARP(t, args.ate.OTG(), args.top, "IPv4")
dstMac := gnmi.Get(t, args.ate.OTG(), gnmi.OTG().Interface(atePort1.Name+".Eth").Ipv4Neighbor(dutPort1.IPv4).LinkLayerAddress().State())
flow := createTrafficFlow(t, args.ate, args.top, ipBlock1FlowArgs, dstMac)
args.ate.OTG().PushConfig(t, top)
args.ate.OTG().StartProtocols(t)
testTraffic(t, *args, flow)
testTraffic(t, *args, createTrafficFlow(t, args.ate, args.top, ipBlock1FlowArgs, dstMac))

controllers := cmp.FindComponentsByType(t, dut, controllerCardType)
t.Logf("Found controller list: %v", controllers)
Expand Down Expand Up @@ -728,15 +730,9 @@ func TestRouteAdditionDuringFailover(t *testing.T) {

// Send traffic to ipBlock1, ipBlock2.
t.Log("Send and validate traffic to ipBlock1 ipv4 entries.")
flow = createTrafficFlow(t, args.ate, args.top, ipBlock1FlowArgs, dstMac)
args.ate.OTG().PushConfig(t, top)
args.ate.OTG().StartProtocols(t)
testTraffic(t, *args, flow)
testTraffic(t, *args, createTrafficFlow(t, args.ate, args.top, ipBlock1FlowArgs, dstMac))

t.Log("Send and validate traffic to ipBlock2 ipv4 entries.")
flow = createTrafficFlow(t, args.ate, args.top, ipBlock2FlowArgs, dstMac)
args.ate.OTG().PushConfig(t, top)
args.ate.OTG().StartProtocols(t)
testTraffic(t, *args, flow)
testTraffic(t, *args, createTrafficFlow(t, args.ate, args.top, ipBlock2FlowArgs, dstMac))
ate.OTG().StopProtocols(t)
}

0 comments on commit b4a0a25

Please sign in to comment.