<commit_before>*** Settings ***
Documentation  Mongoose Config API tests
Force Tags  Config
Library  OperatingSystem
Library  RequestsLibrary

*** Variables ***
${DATA_DIR} =  base/src/test/robot/api/remote/data
${MONGOOSE_CONFIG_URI_PATH}=  /config
${MONGOOSE_CONFIG_SCHEMA_URI_PATH}=  ${MONGOOSE_CONFIG_URI_PATH}/schema

*** Test Cases ***
Should Return Aggregated Defaults
    Should Return Text  ${DATA_DIR}/aggregated_defaults.yaml  ${MONGOOSE_CONFIG_URI_PATH}

Should Return Aggregated Schema
    Should Return Text  ${DATA_DIR}/aggregated_defaults_schema.yaml  ${MONGOOSE_CONFIG_SCHEMA_URI_PATH}

*** Keywords ***
Should Return Text
    [Arguments]  ${expected_file_name}  ${uri_path}
    ${expected_text} =  Get File  ${expected_file_name}
    ${resp} =  Get Request  mongoose_node  ${uri_path}
    Should Be Equal As Strings  ${resp.status_code}  200
    Should Be Equal  ${expected_data}  ${resp.text}<commit_msg>fix remote config api test<commit_after>*** Settings ***
Documentation  Mongoose Config API tests
Force Tags  Config
Library  OperatingSystem
Library  RequestsLibrary

*** Variables ***
${DATA_DIR} =  base/src/test/robot/api/remote/data
${MONGOOSE_CONFIG_URI_PATH}=  /config
${MONGOOSE_CONFIG_SCHEMA_URI_PATH}=  ${MONGOOSE_CONFIG_URI_PATH}/schema

*** Test Cases ***
Should Return Aggregated Defaults
    Should Return Text  ${DATA_DIR}/aggregated_defaults.yaml  ${MONGOOSE_CONFIG_URI_PATH}

Should Return Aggregated Schema
    Should Return Text  ${DATA_DIR}/aggregated_defaults_schema.yaml  ${MONGOOSE_CONFIG_SCHEMA_URI_PATH}

*** Keywords ***
Should Return Text
    [Arguments]  ${expected_file_name}  ${uri_path}
    ${expected_text} =  Get File  ${expected_file_name}
    ${resp} =  Get Request  mongoose_node  ${uri_path}
    Should Be Equal As Strings  ${resp.status_code}  200
    Should Be Equal  ${expected_text}  ${resp.text}
{'fraction_non_alphanumeric': 0.10650887573964497, 'fraction_numerical': 0.0032275416890801506, 'mean_word_length': 5.262626262626263, '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': '402390', 'n_tokens_mistral': 627, 'n_tokens_neox': 613, 'n_words': 141}