mkumatag / openbmc-automation

Test OpenBMC Distribution, moved to - https://github.com/openbmc/openbmc-test-automation
Apache License 2.0
5 stars 11 forks source link

PreTag Blink Fast the Beep LED - Test case pre req check fix needed #58

Closed gkeishin closed 8 years ago

gkeishin commented 8 years ago

The beep FRU is not available in Palmetto /org/openbmc/control/led/beep. So the test case ended failure..

So this needs to be fix as pre-req check if this FRU is available or not then proceed.

The sample psuedo code would look like as per Chris Austen input..

Get Inventory List [arguments] ${args} ${list} = Get Inventory Fru Type List ${OPENBMC_MODEL} ${args} : FOR ${element} IN @{list} \ ${d} = Get From Dictionary ${SYSTEM_INFO} ${element} \ Run Keyword If ${d['present']} == True Verify Present Properties ${args}

Verify Present Properties [arguments] ${args} ${data} = create dictionary data=@{EMPTY} ${resp} = OpenBMC Post Request /org/openbmc/sensor/led/${args} data=${data} should be equal as strings ${resp.status_code} ${HTTP_OK} ${json} = to json ${resp.content} should be equal as integers ${json['data']} 0

Here are some questions of it

  1. Get Inventory Fru Type List this check the FRU instances in the model but I don't see this returns anything for some reason
  2. ${d} = Get From Dictionary ${SYSTEM_INFO} ${element}

    There is no SYSTEM_INFO dictionary in the ENV or the files .. Which json dictionary we need to use or is it populated somewhere which I'm not aware of..

  3. There is this line in the code

${data} = create dictionary data=@{EMPTY}

But I dont see it used in this particular test case.. Should we remove this ?

mkumatag commented 8 years ago

@tomjoseph83 can you please have a look?

gkeishin commented 8 years ago

Probably a little restructuring in the code should do the work.. Keeping the old sub function code and clubbing the LEDs test cases.

Example

* Test Cases * Probe If heartbeat LED Path Exist and Execute Test [Documentation] Checks if heartbeat LED exist and then execute the test set.

${resp} = OpenBMC Get Request /org/openbmc/control/led/heartbeat Should be equal as strings ${resp.status_code} ${HTTP_OK} Execute Heartbeat LEDs Test Cases

Probe If identify LED Path Exist and Execute Test [Documentation] Checks if identify LED exist and then execute the test set.

${resp} = OpenBMC Get Request /org/openbmc/control/led/identify Should be equal as strings ${resp.status_code} ${HTTP_OK} Execute Identify LEDs Test Cases

Probe If beep LED Path Exist and Execute Test [Documentation] Checks if beep LED exist and then execute the test set.

${resp} = OpenBMC Get Request /org/openbmc/control/led/beep Should be equal as strings ${resp.status_code} ${HTTP_OK} Execute Beep LEDs Test Cases

* Keywords * Execute Heartbeat LEDs Test Cases [Documentation] Executing ON/OFF/Fast/Slow Heartbeat LED test cases. Turn ON the Heartbeat LED Turn OFF the Heartbeat LED Blink Fast the Heartbeat LED Blink Slow the Heartbeat LED

Execute Identify LEDs Test Cases [Documentation] Executing ON/OFF/Fast/Slow Identify LED test cases. Turn ON the Identify LED Turn OFF the Identify LED Blink Fast the Identify LED Blink Slow the Identify LED

Execute Beep LEDs Test Cases [Documentation] Executing ON/OFF/Fast/Slow Beep LED test cases. Turn ON the Beep LED Turn OFF the Beep LED Blink Fast the Beep LED Blink Slow the Beep LED

gkeishin commented 8 years ago

Suggestion... we can fix this in two parts drops..

  1. Fix the basic path not found issue
  2. Understand the Blink beep LED use case and re -implement it if needed..

I would like to use this ticket to fix the part 1.. Let me know if that's ok with it...

gkeishin commented 8 years ago

https://github.com/openbmc/openbmc-test-automation/issues/10