Skip to content

Commit 0df2c90

Browse files
authored
Ensure TSB is saved in config after deploy-mg and during pretest (#172)
<!-- Please make sure you've read and understood our contributing guidelines; https://github.com/sonic-net/SONiC/blob/gh-pages/CONTRIBUTING.md Please provide following information to help code review process a bit easier: --> ### Description of PR <!-- - Please include a summary of the change and which issue is fixed. - Please also include relevant motivation and context. Where should reviewer start? background context? - List any dependencies that are required for this change. --> Summary: Fixes #17246 ### Type of change <!-- - Fill x for your type of change. - e.g. - [x] Bug fix --> - [x] Bug fix - [x] Testbed and Framework(new/improvement) - [ ] New Test case - [ ] Skipped for non-supported platforms - [ ] Test case improvement ### Back port request - [ ] 202012 - [ ] 202205 - [ ] 202305 - [ ] 202311 - [ ] 202405 - [ ] 202411 ### Approach #### What is the motivation for this PR? Make sure tsa_enabled = false when startup_tsa_tsb is disabled through pretest #### How did you do it? Add config save after TSB is executed #### How did you verify/test it? Output `tsa_enabled` before and after pretest to make sure it is working is intended #### Any platform specific information? N/A #### Supported testbed topology if it's a new test case? N/A ### Documentation <!-- (If it's a new feature, new test case) Did you update documentation/Wiki relevant to your implementation? Link to the wiki page? -->
1 parent 57a8016 commit 0df2c90

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

ansible/config_sonic_basedon_testbed.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -687,6 +687,11 @@
687687

688688
when: "'dualtor-mixed' in topo or 'dualtor-aa' in topo"
689689

690+
- name: execute "TSB" on T2 DUTs
691+
become: True
692+
shell: "TSB"
693+
when: "'t2' in topo"
694+
690695
- name: execute cli "config save -y" to save current minigraph as startup-config
691696
become: true
692697
shell: config save -y

tests/test_pretest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,7 @@ def test_disable_startup_tsa_tsb_service(duthosts, localhost):
394394
duthost.shell("sudo mv {} {}".format(startup_tsa_tsb_file_path, backup_tsa_tsb_file_path))
395395
output = duthost.shell("TSB", module_ignore_errors=True)
396396
pytest_assert(not output['rc'], "Failed TSB")
397+
duthost.shell("sudo config save -y")
397398
else:
398399
logger.info("{} file does not exist in the specified path on dut {}".
399400
format(startup_tsa_tsb_file_path, duthost.hostname))

0 commit comments

Comments
 (0)