Rework mockOxideClient to assert on request parameters
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 86/100
Research direction
Start with mockOxideClient and the WithProviderID and NoProviderID subtests in internal/provider/instances_v2_test.go, then compare the function-field fake style in internal/provider/load_balancer_test.go. Run the relevant internal/provider tests and verify that getInstance uses the expected InstanceView arguments for each path and that unexpected calls fail loudly.
Written by the indexing model from the issue text.
Description
Context
The instances mock (mockOxideClient in internal/provider/instances_v2_test.go) returns canned outputs without inspecting request parameters, so the WithProviderID and NoProviderID subtests can't actually tell the two lookup paths apart — they assert the same thing today.
Scope
Convert mockOxideClient to the function-field fake style already used by fakeOxideLBClient in internal/provider/load_balancer_test.go (an unset function field fails the call loudly with errUnexpectedOxideCall). Then assert that:
- The provider-ID path calls
InstanceViewwith the instance ID (no project). - The name path calls
InstanceViewwith project + node name.
Done when
The two lookup paths in getInstance have distinguishable assertions, and any unexpected Oxide API call fails the test.
- Dominant language
- Go
- Stars
- 6
- Forks
- 2
- Avg merge
- 2h 5m
- Merged PRs (30d)
- 14
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from oxidecomputer/oxide-cloud-controller-manager
-
Documentation Kubernetes Cloud Controller Manager (CCM)
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Documentation Kubernetes Cloud Controller Manager (CCM)
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Bug Kubernetes Cloud Controller Manager (CCM)
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Bug Kubernetes Cloud Controller Manager (CCM)
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
oxidecomputer/oxide-cloud-controller-manager#275 · 1 comment ·
-
Enhancement Kubernetes Cloud Controller Manager (CCM)
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
All issues in oxidecomputer/oxide-cloud-controller-manager
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
enhancement needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
kind/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
kubernetes-sigs/kueue#15947 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sympozium-ai/sympozium#627 ·
-
priority: p3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
googleapis/librarian#7636 ·