Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions tests/generic_config_updater/gu_common_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,20 @@ def test_find_ref_paths__whole_config_path__returns_all_refs(self):
# Assert
self.assertEqual(expected, actual)

def test_find_ref_paths__path_and_ref_paths_are_under_same_yang_container__returns_ref_paths(self):
# Arrange
path = "/LOOPBACK_INTERFACE/Loopback0"
expected = [
self.path_addressing.create_path(["LOOPBACK_INTERFACE", "Loopback0|10.1.0.32/32"]),
self.path_addressing.create_path(["LOOPBACK_INTERFACE", "Loopback0|1100:1::32/128"]),
]

# Act
actual = self.path_addressing.find_ref_paths(path, Files.CONFIG_DB_WITH_LOOPBACK_INTERFACES)

# Assert
self.assertEqual(expected, actual)

def test_find_ref_paths__does_not_remove_tables_without_yang(self):
# Arrange
config = Files.CONFIG_DB_AS_JSON # This has a table without yang named 'TABLE_WITHOUT_YANG'
Expand Down