From dd73085920eac0a658985e030de67051fa27cb70 Mon Sep 17 00:00:00 2001 From: Cheedella Akhil <161872540+cakhil45@users.noreply.github.com> Date: Tue, 7 Jan 2025 11:20:50 +0530 Subject: [PATCH] FP-1.1: Power admin DOWN/UP Test (#3144) * Added check for the fabrics which are removable * Implemented empty check correctly * updated --------- Co-authored-by: hattikals --- .../power_admin_down_up_test/power_admin_down_up_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/feature/platform/tests/power_admin_down_up_test/power_admin_down_up_test.go b/feature/platform/tests/power_admin_down_up_test/power_admin_down_up_test.go index 9a0f3ff5e63..d3bfc7d3d53 100644 --- a/feature/platform/tests/power_admin_down_up_test/power_admin_down_up_test.go +++ b/feature/platform/tests/power_admin_down_up_test/power_admin_down_up_test.go @@ -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 {