tests: test_time_sync expects no dhcp_ntp_servers, red against napalm-device-types 4.36 #75

Closed
opened 2026-11-12 11:03:24 +00:00 by christianmanivong · 0 comments
Owner

What happens

tests/test_time_sync.py::test_the_reading_is_one_round_trip_as_the_login_user fails on main (235c1e9) against napalm-device-types 4.36.0 or later:

AssertionError: assert {'ntp_servers'…, 'chrony', …} == {'ntp_servers'…on': 'chrony'}
Left contains 1 more item: {'dhcp_ntp_servers': []}

Why

napalm-device-types 4.36.0 added TimeSyncDict.dhcp_ntp_servers (the servers a device got by DHCP option 42; [] for none), and PosixTimeSyncMixin.get_time_sync now returns it. The test still compares against the dict without it.

Fix

Expect "dhcp_ntp_servers": [] in the test (and raise the floor in pyproject.toml to napalm-device-types>=4.36.0). Found while working on NetOrk/netork#2394; all other 412 tests pass.

## What happens `tests/test_time_sync.py::test_the_reading_is_one_round_trip_as_the_login_user` fails on `main` (235c1e9) against napalm-device-types 4.36.0 or later: ``` AssertionError: assert {'ntp_servers'…, 'chrony', …} == {'ntp_servers'…on': 'chrony'} Left contains 1 more item: {'dhcp_ntp_servers': []} ``` ## Why napalm-device-types 4.36.0 added `TimeSyncDict.dhcp_ntp_servers` (the servers a device got by DHCP option 42; `[]` for none), and `PosixTimeSyncMixin.get_time_sync` now returns it. The test still compares against the dict without it. ## Fix Expect `"dhcp_ntp_servers": []` in the test (and raise the floor in `pyproject.toml` to `napalm-device-types>=4.36.0`). Found while working on NetOrk/netork#2394; all other 412 tests pass.
christianmanivong added the
prio
P3
bug
labels 2026-11-12 11:03:24 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: NAPALM/napalm-linux#75