<commit_before>*** Settings ***
Documentation    Test suite to verify if the Robot setup is ready for use.

Resource         ../lib/resource.robot
Resource         ../lib/rest_client.robot
Resource         ../lib/connection_client.robot
Resource         ../lib/ipmi_client.robot
Resource        ../lib/bmc_redfish_resource.robot

*** Test Cases ***

Test Redfish Setup
    [Documentation]  Verify Redfish works.

    Redfish.Login
    Redfish.Get  /redfish/v1/
    Redfish.Logout


Test REST Setup
    [Documentation]  Verify REST works.

    # REST Connection and request.
    Initialize OpenBMC
    # Raw GET REST operation to verify session is established.
    ${resp}=  Get Request  openbmc  /xyz/openbmc_project/
    Should Be Equal As Strings  ${resp.status_code}  ${HTTP_OK}
    ${content}=  To JSON  ${resp.content}  pretty_print=True
    Log To Console  \n ${content}


Test SSH Setup
    [Documentation]  Verify SSH works.

    BMC Execute Command  uname -a
<commit_msg>Add check for test setup template execution<commit_after>*** Settings ***
Documentation    Test suite to verify if the Robot setup is ready for use.

Resource         ../lib/resource.robot
Resource         ../lib/rest_client.robot
Resource         ../lib/connection_client.robot
Resource         ../lib/ipmi_client.robot
Resource        ../lib/bmc_redfish_resource.robot

*** Test Cases ***

Test Redfish Setup
    [Documentation]  Verify Redfish works.

    Pass Execution If  ${REDFISH_SUPPORT_TRANS_STATE} == ${0}
    ...  Skipping Redfish check, user explicitly requested for REST.

    Redfish.Login
    Redfish.Get  /redfish/v1/
    Redfish.Logout


Test REST Setup
    [Documentation]  Verify REST works.

    Pass Execution If  ${REDFISH_SUPPORT_TRANS_STATE} == ${1}
    ...  Skipping REST check, user explicitly requested for Redfish.

    # REST Connection and request.
    Initialize OpenBMC
    # Raw GET REST operation to verify session is established.
    ${resp}=  Get Request  openbmc  /xyz/openbmc_project/
    Should Be Equal As Strings  ${resp.status_code}  ${HTTP_OK}
    ${content}=  To JSON  ${resp.content}  pretty_print=True
    Log To Console  \n ${content}


Test SSH Setup
    [Documentation]  Verify SSH works.

    BMC Execute Command  uname -a

{'fraction_non_alphanumeric': 0.08961845607808341, 'fraction_numerical': 0.001774622892635315, 'mean_word_length': 2.7772194304857623, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '228951', 'n_tokens_mistral': 697, 'n_tokens_neox': 676, 'n_words': 220}