Skip to content

Fix interface_check failure in test_cont_warm_reboot#2932

Merged
vaibhavhd merged 2 commits intosonic-net:masterfrom
vaibhavhd:cont-warmboot-fix
Feb 5, 2021
Merged

Fix interface_check failure in test_cont_warm_reboot#2932
vaibhavhd merged 2 commits intosonic-net:masterfrom
vaibhavhd:cont-warmboot-fix

Conversation

@vaibhavhd
Copy link
Contributor

Description of PR

Summary: Fix test_cont_warm_reboot that has started failing after the recent restructuring done in https://github.com/Azure/sonic-mgmt/pull/2883/files#

Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Approach

test_cont_warm_reboot is failing with:

=================================== FAILURES ===================================
____________________________ test_continuous_reboot ____________________________
Fixture "check_interfaces" called directly. Fixtures are not meant to be called directly,
but are created automatically when test functions request them as parameters.

This error is due to recent refactoring which made check_interfaces a fixture (previously a method).

What is the motivation for this PR?

How did you do it?

Added changes to access fixture on demand, and perform the interface status validation.

How did you verify/test it?

Tested on a KVM switch and the test passed. With interface made manually down, following error is gracefully generated avoiding a test crash:

{
    "up_time": "2043.0s", 
    "test_duration": "93.658068s", 
    "image": "SONiC-OS-202012.15-03b26d43", 
    "result": false, 
    "is_new_image": false, 
    "test_id": 1, 
    "checks": {
        "check_interfaces_and_transceivers": "Interface check failed, not all interfaces are up. Failed: [{'check_item': 'interfaces', 'failed': True, 'host': 'vlab-01', 'down_ports': [u'Ethernet4']}]", 
        "verify_no_coredumps": true, 
        "check_reboot_type": true, 
        "verify_image": true, 
        "check_neighbors": true, 
        "check_services": true
    }

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

@vaibhavhd vaibhavhd merged commit 182b6d3 into sonic-net:master Feb 5, 2021
@vaibhavhd vaibhavhd deleted the cont-warmboot-fix branch February 5, 2021 00:17
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
…lly (sonic-net#17094)

src/sonic-swss

* 01bf3b19 - (HEAD -> 202205, origin/202205) [muxorch] Fixing updateRoute logic (sonic-net#2950) (5 hours ago) [Nikola Dancejic]
* 1e264e01 - Handle Mac address 'none' (sonic-net#2593) (9 hours ago) [Prince Sunny]
* dc0e29b4 - [202205][teamd]: Clean teamd process if LAG creation fails (sonic-net#2888) (sonic-net#2932) (4 days ago) [Lawrence Lee]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants