Skip to content
Merged
Show file tree
Hide file tree
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
10 changes: 6 additions & 4 deletions tests/bgp/test_bgp_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,15 +174,17 @@ def test_bgp_session_interface_down(duthosts, rand_one_dut_hostname, fanouthosts
4: do the test, reset bgp or swss or do the reboot
5: Verify all bgp sessions are up
'''
duthost = duthosts[rand_one_dut_hostname]

# Skip the test on dualtor with reboot test type
pytest_require(
("dualtor" not in tbinfo["topo"]["name"] or test_type != "reboot"),
"warm reboot is not supported on dualtor"
)
if test_type == "reboot" and "isolated" in tbinfo["topo"]["name"]:
pytest.skip("Warm Reboot is not supported on isolated topology")

duthost = duthosts[rand_one_dut_hostname]
if test_type == "reboot" and (
"isolated" in tbinfo["topo"]["name"] or
duthost.dut_basic_facts()['ansible_facts']['dut_basic_facts'].get("is_smartswitch")):
pytest.skip("Warm Reboot is not supported on isolated topology or smartswitch")

# Skip the test on Virtual Switch due to fanout switch dependency and warm reboot
asic_type = duthost.facts['asic_type']
Expand Down
6 changes: 4 additions & 2 deletions tests/common/reboot.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import logging
import sys
import os
import pytest
from multiprocessing.pool import ThreadPool
from collections import deque

Expand Down Expand Up @@ -255,7 +256,8 @@ def reboot_smartswitch(duthost, reboot_type=REBOOT_TYPE_COLD):
"""

if reboot_type not in reboot_ss_ctrl_dict:
logger.info("Skipping the reboot test as the reboot type {} is not supported".format(reboot_type))
pytest.skip(
"Skipping the reboot test as the reboot type {} is not supported on smartswitch".format(reboot_type))
return

hostname = duthost.hostname
Expand Down Expand Up @@ -343,7 +345,7 @@ def reboot(duthost, localhost, reboot_type='cold', delay=10,
collect_console_log, args=(duthost, localhost, timeout + wait_conlsole_connection))
time.sleep(wait_conlsole_connection)
# Perform reboot
if duthost.get_facts().get("is_smartswitch"):
if duthost.dut_basic_facts()['ansible_facts']['dut_basic_facts'].get("is_smartswitch"):
reboot_res, dut_datetime = reboot_smartswitch(duthost, reboot_type)
else:
reboot_res, dut_datetime = perform_reboot(duthost, pool, reboot_command, reboot_helper,
Expand Down
5 changes: 3 additions & 2 deletions tests/restapi/test_restapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,10 @@ def test_check_reset_status(construct_url, duthosts, rand_one_dut_hostname, loca
pytest_assert(response['reset_status'] == "true")

support_warm_fast_reboot = True
if 'isolated' in duthosts.tbinfo['topo']['name']:
if 'isolated' in duthosts.tbinfo['topo']['name'] or \
duthost.dut_basic_facts()['ansible_facts']['dut_basic_facts'].get("is_smartswitch"):
support_warm_fast_reboot = False
logger.info("Skipping warm and fast reboot tests for isolated topology")
logger.info("Skipping warm and fast reboot tests for isolated topology or smartswitch")

# Check reset status post fast reboot
if support_warm_fast_reboot:
Expand Down
Loading