test: repair proxmox and dynamic service test doubles after renames - #186
Merged
Conversation
The proxmox test fixtures still referenced `service_linked.ProxmoxServiceLinked`, which was renamed to `service.ProxmoxService`, so the whole tests/services/proxmox package failed to import. With collection restored, five more failures showed up underneath: - `DynamicTestingService.get_mac()` still declared `force_new`, renamed to `for_unique_id` in DynamicService, so every dynamic userservice deployment ended in ERROR state instead of RUNNING. - The provider fixture mac range started at 00:00:00:00:00:00, which is the NO_MORE_MACS sentinel, so the first generated mac was read as "no macs left". Range now starts at ...:01, as in 5.0. - The snapshot name assertion expected 'UDS Snapshot' while the service creates 'UDS_Snapshot'. - `create_service_linked()` built a real provider, and service initialization validates the storage against the API, so the tests reached out to the network. It now builds a provider with the mocked client, same as `patched_provider`. Also passes the generated uuid to `private_environment()` instead of the uuid module. Only test code is touched.
aschumann-virtualcable
requested review from
janpenitent
and removed request for
dkmstr
August 12, 2026 12:28
janpenitent
approved these changes
Aug 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Test-only changes. No production code is touched.
What was broken
tests/services/proxmoxdid not even import:service_linked.pywas renamed toservice.py(andProxmoxServiceLinkedtoProxmoxService) without updating the fixtures.With collection restored, five more failures showed up underneath, plus seven in
tests/core/services/generics/test_dynamic_service.pythat were failing on their own:TaskState.ERROR != RUNNINGintest_dynamic_service.pyget_mac(..., force_new=...), renamed tofor_unique_idinDynamicService. TheTypeErrorwas swallowed and surfaced as an ERROR stateNo more MACs available00:00:00:00:00:00, which is theNO_MORE_MACSsentinel, so the first generated mac read as "no macs left". 5.0 already starts at...:01test_process_snapshotname='UDS Snapshot'while the service creates'UDS_Snapshot'create_service_linked()built a real provider, and service initialization validates the storage against the API, so the tests reached out tohost:8006What this changes
tests/services/proxmox/fixtures.py: import and type references updated;create_mocked_provider()extracted frompatched_providerso thecreate_service_*helpers get a mocked client instead of a real provider; mac range starts at...:01;private_environment()receives the generated uuid instead of theuuidmodule.tests/services/proxmox/test_service_fixed.py: snapshot name assertion.tests/core/services/generics/fixtures.py:force_newrenamed tofor_unique_idin the twoget_macdoubles.Testing
The three remaining failures are unrelated to this branch and come from the enterprise plugin not being wired into this checkout:
test_transports_loads_correctly(nicedcvtunneltransportmissing),test_jobs_stores_on_db(28 jobs instead of 34) andphysical_machines/test_migration::test_migrate.