Skip to content

Commit

Permalink
FP-1.1: Power admin DOWN/UP Test (#3144)
Browse files Browse the repository at this point in the history
* Added check for the fabrics which are removable

* Implemented empty check correctly

* updated

---------

Co-authored-by: hattikals <[email protected]>
  • Loading branch information
cakhil45 and hattikals authored Jan 7, 2025
1 parent 5d45d3e commit dd73085
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ func TestFabricPowerAdmin(t *testing.T) {
for _, f := range fs {
t.Run(f, func(t *testing.T) {

if !gnmi.Get(t, dut, gnmi.OC().Component(f).Removable().State()) {
t.Skipf("Skip the test on non-removable fabric.")
}

empty, ok := gnmi.Lookup(t, dut, gnmi.OC().Component(f).Empty().State()).Val()
if ok && empty {
t.Skipf("Fabric Component %s is empty, hence skipping", f)
}

if !gnmi.Get(t, dut, gnmi.OC().Component(f).Removable().State()) {
t.Skipf("Skip the test on non-removable fabric.")
}

oper := gnmi.Get(t, dut, gnmi.OC().Component(f).OperStatus().State())

if got, want := oper, oc.PlatformTypes_COMPONENT_OPER_STATUS_ACTIVE; got != want {
Expand Down

0 comments on commit dd73085

Please sign in to comment.