Skip to content

Commit

Permalink
RT-5.2 fix for case-insensitive check for partnerid/systemid (opencon…
Browse files Browse the repository at this point in the history
…fig#2664)

Precedent for this case is: https://github.com/openconfig/featureprofiles/blob/main/feature/interface/staticarp/otg_tests/static_arp_test/static_arp_test.go#L286
"This code is a Contribution to the OpenConfig Feature Profiles project ("Work") made under the Google Software Grant and Corporate Contributor License Agreement ("CLA") and governed by the Apache License 2.0. No other rights or licenses in or to any of Nokia's intellectual property are granted for any other purpose. This code is provided on an "as is" basis without any warranties of any kind."
  • Loading branch information
MarcCharlebois authored Mar 6, 2024
1 parent 54573a6 commit 70ab01d
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"net"
"sort"
"strconv"
"strings"
"testing"
"time"

Expand Down Expand Up @@ -394,11 +395,11 @@ func (tc *testCase) verifyLACPTelemetry(t *testing.T) {
t.Errorf("DUT LAG %s: ATE partner-key (%d) did not match DUT oper-key (%d)", tc.aggID, ateLACP.PartnerKey, dutLACP.OperKey)
}

if ateLACP.PartnerId == nil || dutLACP.SystemId == nil || *ateLACP.PartnerId != *dutLACP.SystemId {
if ateLACP.PartnerId == nil || dutLACP.SystemId == nil || !strings.EqualFold(*ateLACP.PartnerId, *dutLACP.SystemId) {
t.Errorf("DUT LAG %s: ATE partner-id (%s) did not match DUT system-id (%s)", tc.aggID, *ateLACP.PartnerId, *dutLACP.SystemId)
}

if dutLACP.PartnerId == nil || ateLACP.SystemId == nil || *dutLACP.PartnerId != *ateLACP.SystemId {
if dutLACP.PartnerId == nil || ateLACP.SystemId == nil || !strings.EqualFold(*ateLACP.PartnerId, *dutLACP.SystemId) {
t.Errorf("DUT LAG %s: ATE system-id (%s) did not match DUT partner-id (%s)", tc.aggID, *ateLACP.SystemId, *dutLACP.PartnerId)
}
}
Expand Down

0 comments on commit 70ab01d

Please sign in to comment.