tests: add Go integration suite on a single node kind cluster #403
All Vouch review confidence checks passed
Residual risk 0.23 = Change Risk (0.43) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.43 · 373 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.354
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #403"
general
weight: 0.35
aojea
What
A Go integration test suite in
tests/integrationthat runs dranet against a single node kind cluster.It sits between the unit tests and the bats e2e suite: real apiserver, scheduler, resourceclaim controller, kubelet and containerd/NRI, but no image build,
kind loador DaemonSet rollout. Thedranetbinary is built on the host, copied into the node container and run as a transient systemd unit. A cold run takes ~50 s to create the cluster; withDRANET_KIND_REUSE=1a code change is a rebuild and a restart of the driver, a few seconds.Tests use client-go for the cluster and
docker execfor the node. Each test gets its own namespace and dummy links with unique names. On failure the dranet journal and the pods, events, claims and slices are written to_artifacts/integration/. A newintegrationworkflow runs the suite on pull requests.Tests
TestSmoke: a link is published, a pod claims it, the link moves into the pod with its address, after the pod is gone the link is back on the node and the slice no longer advertises the address.TestFastReschedule: the fast pod re-schedule race. Pod 1 holds a link, pod 2 waits for the same link with thedra.net/ipv4CEL selector, pod 1 is deleted and the address comes back on the link 2 s later (standing in for DHCP / the guest agent). The test checks that pod 2 is not scheduled before the address is back, that it is scheduled soon after, and that its claim reports the address. It runs withPersistentResourceSliceAttributeson and off.TestNRITimeout: the NRI failure policy from #401. A pod with 3 claims × 32 devices makesRunPodSandboxtake ~3.5 s, past containerd's default 2 splugin_request_timeout. The pod must fail to start with aFailedCreatePodSandBoxevent naming the plugin, thedranet_driver_nri_plugin_disconnects_totalcounter must not move, and a later one-device pod must still start.Current result
TestSmokepasses. The other two fail on purpose and document gaps:TestFastReschedule: an address change does not trigger an inventory rescan, so pod 2 is scheduled ~58 s after the address is restored (the max poll interval). WithPersistentResourceSliceAttributes=truethe snapshot merge sometimes keeps a staledra.net/ipv4in the slice after the link returned; pod 2 is then scheduled at once and takes the link with no address, and its claim ends with emptynetworkData.ips. Timing dependent: the window is about one inventory scan long.TestNRITimeout: the kind v1.37.0 node image ships containerd 2.3.4 with NRI v0.12.0, which predates the failure policy (needs ≥ v0.12.4). containerd logsclosing plugin 00-dra.net, failed to handle RunPodSandbox request: context deadline exceeded, proceeds without dranet, and the pod starts with no interfaces. The test passes once the node image carries a containerd with NRI ≥ v0.12.4.The fixes are follow-ups; this PR adds the harness and the reproductions.