From 7c063cbeeecd07c578fe8620da85bc67c85f0079 Mon Sep 17 00:00:00 2001 From: jingwenxie Date: Mon, 5 Sep 2022 11:02:49 +0800 Subject: [PATCH] [GCU] Fix missing backend in dry run (#2347) 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. --- generic_config_updater/change_applier.py | 4 ++++ tests/generic_config_updater/change_applier_test.py | 1 + 2 files changed, 5 insertions(+) diff --git a/generic_config_updater/change_applier.py b/generic_config_updater/change_applier.py index 9871e554b2..f5a365d59f 100644 --- a/generic_config_updater/change_applier.py +++ b/generic_config_updater/change_applier.py @@ -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 diff --git a/tests/generic_config_updater/change_applier_test.py b/tests/generic_config_updater/change_applier_test.py index 63944b2571..afe166b008 100644 --- a/tests/generic_config_updater/change_applier_test.py +++ b/tests/generic_config_updater/change_applier_test.py @@ -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)])