Skip to content

Commit

Permalink
fix isis_interface_passive_test (openconfig#3757)
Browse files Browse the repository at this point in the history
* fix isis_interface_passive_test

* fix formating
  • Loading branch information
ram-mac authored Feb 11, 2025
1 parent ef7d484 commit fa1c503
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ func configureISIS(t *testing.T, ts *isissession.TestSession) {

// Level configs.
level := isis.GetOrCreateLevel(2)
level.LevelNumber = ygot.Uint8(2)

// Authentication configs.
auth := level.GetOrCreateAuthentication()
Expand Down Expand Up @@ -95,6 +96,9 @@ func configureISIS(t *testing.T, ts *isissession.TestSession) {

// Interface level configs.
isisIntfLevel := intf.GetOrCreateLevel(2)
isisIntfLevel.LevelNumber = ygot.Uint8(2)
isisIntfLevel.SetEnabled(true)
isisIntfLevel.Enabled = ygot.Bool(true)
isisIntfLevel.GetOrCreateHelloAuthentication().Enabled = ygot.Bool(true)
isisIntfLevel.GetHelloAuthentication().AuthPassword = ygot.String(password)
isisIntfLevel.GetHelloAuthentication().AuthType = oc.KeychainTypes_AUTH_TYPE_SIMPLE_KEY
Expand Down Expand Up @@ -196,7 +200,7 @@ func TestIsisInterfacePassive(t *testing.T) {
t.Errorf("FAIL- Expected area address not found, got %s, want %s", got, want)
}
// Checking dis system id.
if !deviations.MissingValueForDefaults(ts.DUT) {
if !deviations.MissingValueForDefaults(ts.DUT) && !deviations.IsisDisSysidUnsupported(ts.DUT) {
if got := gnmi.Get(t, ts.DUT, adjPath.DisSystemId().State()); got != "0000.0000.0000" {
t.Errorf("FAIL- Expected dis system id not found, got %s, want %s", got, "0000.0000.0000")
}
Expand Down Expand Up @@ -278,7 +282,7 @@ func TestIsisInterfacePassive(t *testing.T) {
}
}
// Checking database_overloads counters.
if !deviations.MissingValueForDefaults(ts.DUT) {
if !deviations.MissingValueForDefaults(ts.DUT) && !deviations.IsisDatabaseOverloadsUnsupported(ts.DUT) {
if got := gnmi.Get(t, ts.DUT, statePath.Level(2).SystemLevelCounters().DatabaseOverloads().State()); got != 0 {
t.Errorf("FAIL- Not expecting non zero database_overloads, got %d, want %d", got, 0)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ platform_exceptions: {
deviations: {
ipv4_missing_enabled: true
isis_interface_level1_disable_required: true
isis_interface_level_passive_unsupported: true
isis_dis_sysid_unsupported: true
isis_database_overloads_unsupported: true
}
}
platform_exceptions: {
Expand Down

0 comments on commit fa1c503

Please sign in to comment.