Skip to content

Commit 289a0f3

Browse files
committed
Fix test_get_firmware_update_notification fail
Erro Log: pytest_assert(isinstance(notif, STRING_TYPE), "Component {}: Firmware update notification appears to be incorrect from image {}".format(i, image)) E Failed: Component 0: Firmware update notification appears to be incorrect from image current Refer to API get_firmware_update_notification header, shall return 'None' instead of None. """ Retrieves a notification on what should be done in order to complete the component firmware update Args: image_path: A string, path to firmware image Returns: A string containing the component firmware update notification if required. By default 'None' value will be used, which indicates that no actions are required """
1 parent d1a2e17 commit 289a0f3

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

sonic_platform_base/component_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def get_firmware_update_notification(self, image_path):
7676
A string containing the component firmware update notification if required.
7777
By default 'None' value will be used, which indicates that no actions are required
7878
"""
79-
return None
79+
return 'None'
8080

8181
def install_firmware(self, image_path):
8282
"""

tests/component_base_test.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from sonic_platform_base.component_base import ComponentBase
2+
3+
class TestComponentBase:
4+
5+
def test_get_firmware_update_notification(self):
6+
cpnt = ComponentBase()
7+
assert(cpnt.get_firmware_update_notification(None) == "None")

0 commit comments

Comments
 (0)