Skip to content

Commit 78bac90

Browse files
committed
Added a test case for fast reboot from other vendor NOS to SONiC.
Details: A new test case was added to fast reboot script. This test case mimics a fast reboot from other vendor nos to SONiC, by flushing all DBs that are part of the boot process, so the boot will be initiated with clean DBs as if it was booting from other nos.
1 parent 36e72ff commit 78bac90

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

tests/common/fixtures/advanced_reboot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def __extractTestParam(self):
117117
if self.rebootLimit is None:
118118
if self.kvmTest:
119119
self.rebootLimit = 200 # Default reboot limit for kvm
120-
elif 'warm-reboot' in self.rebootType:
120+
elif 'warm-reboot' in self.rebootType:
121121
self.rebootLimit = 0
122122
else:
123123
self.rebootLimit = 30 # Default reboot limit for physical devices

tests/platform_tests/test_advanced_reboot.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,9 @@ def test_fast_reboot_from_other_vendor(duthosts, rand_one_dut_hostname, request
5555
duthost = duthosts[rand_one_dut_hostname]
5656
advancedReboot = get_advanced_reboot(rebootType='fast-reboot', other_vendor_nos = True,\
5757
advanceboot_loganalyzer=advanceboot_loganalyzer)
58-
preboot_oper = flush_dbs(duthost)
59-
advancedReboot.runRebootTestcase(preboot_setup = preboot_oper)
58+
# Before rebooting, we will flush all unnecessary databases, to mimic reboot from other vendor.
59+
flush_dbs(duthost)
60+
advancedReboot.runRebootTestcase()
6061

6162
@pytest.mark.device_type('vs')
6263
def test_warm_reboot(request, get_advanced_reboot, verify_dut_health,
@@ -158,4 +159,5 @@ def flush_dbs(duthost):
158159
6: 'State DB'
159160
}
160161
for db in db_dic.keys():
161-
duthost.shell('redis-cli -n {} flushdb'.format(db))
162+
duthost.shell('redis-cli -n {} flushdb'.format(db))
163+

0 commit comments

Comments
 (0)