diff --git a/feature/gnoi/packet_link_qualification/tests/packet_link_qualification_test/README.md b/feature/gnoi/packet_link_qualification/tests/packet_link_qualification_test/README.md index 9764b2be637..0092782e3e3 100644 --- a/feature/gnoi/packet_link_qualification/tests/packet_link_qualification_test/README.md +++ b/feature/gnoi/packet_link_qualification/tests/packet_link_qualification_test/README.md @@ -61,7 +61,7 @@ between 2 DUTs. its teardown. * TeardownDuration: The amount time required to bring the interface back to pre-test state. - * [TODO: issue#2244] verify generator interface oper-state is 'TESTING' + * Verify generator interface oper-state is 'TESTING' * Set another device as the FAR_END (reflector) device for Packet Based Link Qual. * Issue gnoi.LinkQualification Create RPC to the device and provide @@ -72,7 +72,7 @@ between 2 DUTs. * EndpointType: Qualification_end set as FAR_END. * RPCSyncedTiming: * Reflector timers should be same as the ones on the generator. - * [TODO: issue#2244] verify reflector interface oper-state is 'TESTING' + * Verify reflector interface oper-state is 'TESTING' * Get the result by issuing gnoi.LinkQualification Get RPC to gather the result of link qualification. Provide the following parameter: * Id: The identifier used above on the NEAR_END side. diff --git a/feature/gnoi/packet_link_qualification/tests/packet_link_qualification_test/packet_link_qualification_test.go b/feature/gnoi/packet_link_qualification/tests/packet_link_qualification_test/packet_link_qualification_test.go index 8898974cb75..aeb3ab77cad 100644 --- a/feature/gnoi/packet_link_qualification/tests/packet_link_qualification_test/packet_link_qualification_test.go +++ b/feature/gnoi/packet_link_qualification/tests/packet_link_qualification_test/packet_link_qualification_test.go @@ -350,6 +350,19 @@ func TestLinkQualification(t *testing.T) { if listResp.GetResults()[j].GetState() != plqpb.QualificationState_QUALIFICATION_STATE_COMPLETED { testDone = false } + if listResp.GetResults()[j].GetState() == plqpb.QualificationState_QUALIFICATION_STATE_RUNNING { + if client == gnoiClient1 { + t.Logf("Checking link under qualificaton (generator) interface oper-status (dut: %v, dp: %v)", dut1.Name(), dp1.Name()) + if got, want := gnmi.Get(t, dut1, gnmi.OC().Interface(dp1.Name()).OperStatus().State()), oc.Interface_OperStatus_TESTING; got != want { + t.Errorf("Interface(%v) oper-status: got %v, want %v", dp1.Name(), got, oc.Interface_OperStatus_TESTING) + } + } else if client == gnoiClient2 { + t.Logf("Checking link under qualificaton (reflector) interface oper-status (dut: %v, dp: %v)", dut2.Name(), dp2.Name()) + if got, want := gnmi.Get(t, dut2, gnmi.OC().Interface(dp2.Name()).OperStatus().State()), oc.Interface_OperStatus_TESTING; got != want { + t.Errorf("Interface(%v) oper-status: got %v, want %v", dp2.Name(), got, oc.Interface_OperStatus_TESTING) + } + } + } } if len(listResp.GetResults()) == 0 { testDone = false