Skip to content

Commit

Permalink
remove test file during teardown
Browse files Browse the repository at this point in the history
  • Loading branch information
wen587 committed Jun 1, 2022
1 parent ab9a313 commit 24fee49
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/override_config_table/test_override_config_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,11 @@ def setup_env(duthosts, rand_one_dut_hostname, golden_config_exists_on_dut):

# Restore configDB after test.
restore_config(duthost, CONFIG_DB, CONFIG_DB_BACKUP)
# Restore Golden Config after test.
# Restore Golden Config after test, else cleanup test file.
if golden_config_exists_on_dut:
restore_config(duthost, GOLDEN_CONFIG, GOLDEN_CONFIG_BACKUP)
else:
duthost.file(path=GOLDEN_CONFIG, state='absent')

# Restore config before test
config_reload(duthost)
Expand Down

0 comments on commit 24fee49

Please sign in to comment.