Skip to content

Commit

Permalink
Remove temp golden config after reload config with golden config. (so…
Browse files Browse the repository at this point in the history
…nic-net#14077)

Remove temp golden config after reload config with golden config.

Why I did it
test_fallback_to_local_authorization_with_config_reload test case will reload config with AAA enabled.
After this test case, the golden config file will left on device, when some other code reload config, device will enable AAA and block other login again.

Work item tracking
Microsoft ADO: 28871521
How I did it
Remove temp golden config after reload config with golden config.

How to verify it
Pass all test case.
  • Loading branch information
liuh-80 authored and mssonicbld committed Sep 26, 2024
1 parent 6526a76 commit c1b4913
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/override_config_table/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ def reload_minigraph_with_golden_config(duthost, json_data, safe_reload=True):
golden_config = "/etc/sonic/golden_config_db.json"
duthost.copy(content=json.dumps(json_data, indent=4), dest=golden_config)
config_reload(duthost, config_source="minigraph", safe_reload=safe_reload, override_config=True)
# Cleanup golden config because some other test or device recover may reload config with golden config
duthost.command('mv {} {}_backup'.format(golden_config, golden_config))


def file_exists_on_dut(duthost, filename):
Expand Down

0 comments on commit c1b4913

Please sign in to comment.