Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix case sensitve issue for test_get_system_eeprom_info #2

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions tests/platform_tests/api/test_chassis.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,12 @@ def test_get_system_eeprom_info(self, duthosts, enum_rand_one_per_hwsku_hostname
syseeprom_info_dict = chassis.get_system_eeprom_info(platform_api_conn)
pytest_assert(syseeprom_info_dict is not None, "Failed to retrieve system EEPROM data")
pytest_assert(isinstance(syseeprom_info_dict, dict), "System EEPROM data is not in the expected format")

syseeprom_type_codes_list = syseeprom_info_dict.keys()


# case sensitive,so make all characters lowercase
syseeprom_type_codes_list = [key.lower() for key in syseeprom_info_dict.keys()]
VALID_ONIE_TLVINFO_TYPE_CODES_LIST = [key.lower() for key in VALID_ONIE_TLVINFO_TYPE_CODES_LIST]
MINIMUM_REQUIRED_TYPE_CODES_LIST = [key.lower() for key in MINIMUM_REQUIRED_TYPE_CODES_LIST]

# Ensure that all keys in the resulting dictionary are valid ONIE TlvInfo type codes
pytest_assert(set(syseeprom_type_codes_list) <= set(VALID_ONIE_TLVINFO_TYPE_CODES_LIST), "Invalid TlvInfo type code found")

Expand Down