You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, TestComponentApi.test_update_firmware invokes component API update_firmware with values 'current' and 'next' for image_path.
Since the provided image_path values are invalid and do not represent a firmware package path, in DellEMC Z9332f platform update_firmare fails and raises RuntimeError as in the base method definition and TestComponentApi.test_update_firmware reports failure for that raised RuntimeError.
def update_firmware(self, image_path):
"""
Updates firmware of the component
This API performs firmware update: it assumes firmware installation and loading in a single call.
In case platform component requires some extra steps (apart from calling Low Level Utility)
to load the installed firmware (e.g, reboot, power cycle, etc.) - this will be done automatically by API
Args:
image_path: A string, path to firmware image
Raises:
RuntimeError: update failed
"""
Steps to reproduce the issue:
Execute "platform_tests/api/test_component.py::TestComponentApi::test_update_firmware" on DellEMC Z9332f platform
Describe the results you received:
____________________________________________________________________________ TestComponentApi.test_update_firmware[sonic-10431] ____________________________________________________________________________
self = <test_component.TestComponentApi object at 0x7fdf72f87790>, duthosts = <tests.common.devices.duthosts.DutHosts object at 0x7fdf75097f50>, enum_rand_one_per_hwsku_hostname = 'sonic-10431'
localhost = <tests.common.devices.local.Localhost object at 0x7fdf73bed750>, platform_api_conn = <httplib.HTTPConnection instance at 0x7fdf754cc1e0>
def test_update_firmware(self, duthosts, enum_rand_one_per_hwsku_hostname, localhost, platform_api_conn):
if self.num_components == 0:
pytest.skip("No components found on device")
for i in range(self.num_components):
for image in image_list:
> update_status = component.update_firmware(platform_api_conn, i, image)
duthosts = <tests.common.devices.duthosts.DutHosts object at 0x7fdf75097f50>
enum_rand_one_per_hwsku_hostname = 'sonic-10431'
i = 0
image = 'current'
localhost = <tests.common.devices.local.Localhost object at 0x7fdf73bed750>
platform_api_conn = <httplib.HTTPConnection instance at 0x7fdf754cc1e0>
self = <test_component.TestComponentApi object at 0x7fdf72f87790>
platform_tests/api/test_component.py:205:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
common/helpers/platform_api/component.py:79: in update_firmware
return component_api(conn, comp_idx, 'update_firmware', [image_path])
common/helpers/platform_api/component.py:16: in component_api
resp = conn.getresponse()
/usr/lib/python2.7/httplib.py:1178: in getresponse
response.begin()
/usr/lib/python2.7/httplib.py:452: in begin
version, status, reason = self._read_status()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <httplib.HTTPResponse instance at 0x7fdf72e91460>
def _read_status(self):
# Initialize with Simple-Response defaults
line = self.fp.readline(_MAXLINE + 1)
if len(line) > _MAXLINE:
raise LineTooLong("header line")
if self.debuglevel > 0:
print "reply:", repr(line)
if not line:
# Presumably, the server closed the connection before
# sending a valid response.
> raise BadStatusLine("No status line received - the server has closed the connection")
E BadStatusLine: No status line received - the server has closed the connection
line = ''
self = <httplib.HTTPResponse instance at 0x7fdf72e91460>
/usr/lib/python2.7/httplib.py:416: BadStatusLine
Description
Currently, TestComponentApi.test_update_firmware invokes component API
update_firmware
with values 'current' and 'next' for image_path.Since the provided image_path values are invalid and do not represent a firmware package path, in DellEMC Z9332f platform update_firmare fails and raises
RuntimeError
as in the base method definition and TestComponentApi.test_update_firmware reports failure for that raised RuntimeError.Steps to reproduce the issue:
Describe the results you received:
Describe the results you expected:
Test case to pass
Additional information you deem important:
Output of
show version
:The text was updated successfully, but these errors were encountered: