Skip to content

Commit

Permalink
[GCU] Fix missing backend in dry run (#2347)
Browse files Browse the repository at this point in the history
What I did
Fix sonic-net/sonic-buildimage#11912

How I did it
Add the missing 'remove_backend_tables_from_config' in dry run.

How to verify it
Run unit test and manual test locally.
  • Loading branch information
wen587 committed Sep 5, 2022
1 parent 676c31b commit 0e1b0cf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions generic_config_updater/change_applier.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ def apply(self, change):
self.config_wrapper.apply_change_to_config_db(change)


def remove_backend_tables_from_config(self, data):
return data


class ChangeApplier:

updater_conf = None
Expand Down
1 change: 1 addition & 0 deletions tests/generic_config_updater/change_applier_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ def test_apply__calls_apply_change_to_config_db(self):

# Act
applier.apply(change)
applier.remove_backend_tables_from_config(change)

# Assert
applier.config_wrapper.apply_change_to_config_db.assert_has_calls([call(change)])
Expand Down

0 comments on commit 0e1b0cf

Please sign in to comment.