Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,7 @@ func configNonDefaultNetworkInstance(t *testing.T, dut *ondatra.DUTDevice) {
ni.Type = oc.NetworkInstanceTypes_NETWORK_INSTANCE_TYPE_L3VRF
gnmi.Replace(t, dut, gnmi.OC().NetworkInstance(vrf).Config(), ni)
}

}

// configureDUT configures port1-8 on the DUT.
Expand Down Expand Up @@ -2396,6 +2397,12 @@ func TestGribiDecap(t *testing.T) {
configureDUT(t, dut)
})

if res, err := dut.RawAPIs().CLI(t).RunCommand(ctx, "show ver"); err == nil {
t.Logf("Output of 'show ver':\n%s", res.Output())
} else {
t.Logf("Failed to run 'show ver': %v", err)
}

Comment on lines +2401 to +2406
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The use of vendor-specific CLI commands like show ver should be avoided in feature profile tests to maintain vendor neutrality. Additionally, per the repository style guide, all test logic and logging should be encapsulated within t.Run subtests to ensure the test output clearly reflects the execution steps. If logging the device version is necessary, consider using the vendor-neutral dut.Version() method or querying the appropriate OpenConfig path.

References
  1. Use t.Run for subtests so output clearly reflects passed/failed steps. (link)

t.Run("Apply vrf selectioin policy W to DUT port-1", func(t *testing.T) {
configureVrfSelectionPolicyW(t, dut)
})
Expand Down
Loading