diff options
| author | omnom62 <omnom62@outlook.com> | 2026-10-03 14:53:48 +1000 |
|---|---|---|
| committer | omnom62 <omnom62@outlook.com> | 2026-10-03 14:53:48 +1000 |
| commit | 54a3c5c32c14295d82268e446acfd9df26438cd7 (patch) | |
| tree | 61cf5e168e55ffd81c8d79d607b4ba3d9d91ad57 /tests | |
| parent | bf21f161e240c15062e6ac63df2c8fde647f545f (diff) | |
| download | rest.vyos-T8989_interfaces_dict_op_refactor.tar.gz rest.vyos-T8989_interfaces_dict_op_refactor.zip | |
T8989: interfaces AI comment fixedT8989_interfaces_dict_op_refactor
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/unit/modules/test_vyos_interfaces.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/unit/modules/test_vyos_interfaces.py b/tests/unit/modules/test_vyos_interfaces.py index af0687b..56683df 100644 --- a/tests/unit/modules/test_vyos_interfaces.py +++ b/tests/unit/modules/test_vyos_interfaces.py @@ -601,6 +601,18 @@ class TestBuildCommands(VyOSModuleTestCase): cmds, ) + def test_merged_never_reenables_an_unlisted_vif(self): + """CodeRabbit regression: merged's re-enable logic previously + scanned every disabled VIF on the device, not just ones the + task actually lists -- so a VLAN the administrator + deliberately disabled would be silently re-enabled by a task + that never even mentions "vifs" at all. merged must leave an + unlisted VIF completely untouched, same as any other unlisted + field.""" + raw_have = _FIXTURES["vif_disabled_on_device"] + cmds = build_commands([{"name": "eth0", "description": "x"}], raw_have, "merged") + self.assertFalse(any("200" in c[1] for c in cmds)) + def test_merged_new_interface_with_vrf_and_vif(self): config = [ { |
