Eden to evetest: rewrite networking, security, apps and lps tests - #6244
Eden to evetest: rewrite networking, security, apps and lps tests#6244milan-zededa wants to merge 4 commits into
Conversation
|
Claude finished @milan-zededa's task in 3m 45s —— View job Code review
I reviewed the production-code changes and the framework/library additions in depth, and scanned the test rewrites. This is a well-structured, thoroughly-commented PR. Production code (the parts with user-facing impact) look correct:
One latent bug I flagged inline (framework code): the OCI-datastore image-ref split in Other things I checked and consider fine:
No security or correctness concerns in the pillar changes. Nice work. |
ZInfoApp was not reporting all NTP servers for an application's network instance: NetworkInstanceConfig.NtpServers (the NI's own raw configured list) and NetworkInstanceStatus.NTPServers (the combined NI+port list zedrouter actually maintains) differed only by case, so the reporting code in zedagent silently picked up the wrong one via field promotion through the embedded config struct. Renamed the status field to CombinedNTPServers to make the two unambiguous by name, and fixed zedagent to publish it. Signed-off-by: Milan Lenco <milan@zededa.com> Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
When a DHCP server's GatewayIPv4 is left nil (the documented way to make clients not install a default IPv4 route), the config renderer simply omitted the dhcp-option=option:router line instead of explicitly suppressing it. dnsmasq's own default, absent an explicit override, is to advertise its own listening address on that subnet as the router, so clients still received one -- defeating the purpose of leaving GatewayIPv4 unset. Signed-off-by: Milan Lenco <milan@zededa.com> Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Signed-off-by: Milan Lenco <milan@zededa.com>
Add the EdgeDevice/EdgeCluster/harness capabilities needed by the eden-to-evetest test rewrites: - Flow-log streaming: AdamClient.IterateDeviceFlowLogs/ SubscribeToDeviceFlowLogs, the corresponding gRPC server iterator, and the `evetest eve flow-logs` CLI subcommand. - EdgeDevice.GetArch, PowerOff, PowerOn and WaitForClusterNodeIsReady. - EdgeDevice.DialViaSSH (an SSH-tunneled net.Conn, used for reaching the Kubevirt VNC proxy which only binds to the device's loopback). Also removes the now-unused SkipIfHypervisorKubevirt test-parameter helper; its call sites move to an inline `if hypervisor == evetest.HypervisorKubevirt` check in the test-suite rewrite commit that follows. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Signed-off-by: Milan Lenco <milan@zededa.com>
…pgrade) Port the corresponding eden E2E scenarios to the evetest Go framework across networking (flow logs, DPC fallback/failover, intermittent connectivity, mgmt traffic routed via an app-based NAT gateway, and several smaller fixes), security (AppArmor status, vcomlink TPM-over-vsock), apps (VNC console access, app purge), LPS and upgrade. Adds the TwoMgmtPortsWithPublicNTP and MgmtViaAppTopology network models used by the rewritten tests. Signed-off-by: Milan Lenco <milan@zededa.com> Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Signed-off-by: Milan Lenco <milan@zededa.com>
593b7d5 to
c5ad210
Compare
|
Claude finished @milan-zededa's task in 2m 12s —— View job Re-review
The one finding from my previous pass is resolved and I found nothing new that blocks. Summary below. Fix confirmed — Production code (pillar) — re-verified correct:
Framework additions — checked, no issues:
Not re-raising: the CodeQL No security or correctness concerns. LGTM. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6244 +/- ##
==========================================
+ Coverage 23.21% 23.57% +0.36%
==========================================
Files 510 520 +10
Lines 93470 95186 +1716
==========================================
+ Hits 21697 22441 +744
- Misses 70025 70811 +786
- Partials 1748 1934 +186 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Description
Rewrites a batch of Eden E2E test scenarios (networking, security, apps, LPS, upgrade)
as native Go tests in the
evetestframework, plus some framework/library enhancementsand one SDN bugfix needed to support them.
Commits
zedrouter, zedagent: rename NI status field to CombinedNTPServersNetworkInstanceConfig.NtpServers(the NI's own raw configured list) andNetworkInstanceStatus.NTPServers(the combined NI+port list zedrouteractually maintains) differed only by case, so zedagent's reporting code
silently picked up the wrong one via field promotion through the embedded
config struct. Renamed the status field to
CombinedNTPServersand fixedzedagent to publish it.
evetest/sdn: fix dnsmasq router option not being suppressedA DHCP server config with
GatewayIPv4left nil (the documented way tomake clients skip installing a default IPv4 route) simply omitted the
dhcp-option=option:routerline instead of explicitly suppressing it.dnsmasq's own default, absent an explicit override, is to advertise its
own listening address on that subnet as the router, so clients still
received one anyway.
evetest: framework/library enhancementsAdds the
EdgeDevice/EdgeCluster/harness capabilities the testrewrites below need: flow-log streaming (
IterateDeviceFlowLogs,SubscribeToDeviceFlowLogs, the gRPC server iterator, and theevetest eve flow-logsCLI subcommand),EdgeDevice:GetArch,PowerOff,PowerOn,WaitForClusterNodeIsReady,and
EdgeDevice.DialViaSSH(an SSH-tunnelednet.Conn, used to reachthe Kubevirt VNC proxy which only binds to the device's loopback).
Also removes the now-unused
SkipIfHypervisorKubevirthelper (all testsnow support running at-least single-node EVE-K).
evetest: rewrite eden test suites (networking, security, apps, lps, upgrade)The actual eden -> evetest ports:
of EVE networking.
TestAppArmorEnabled(kernel AppArmor status) andTestVCom(vcomlink TPM-over-vsock request/response from inside aguest VM).
TestVNC(console access, VM and container apps) and apppurge.
profile switching, radio silence).
This leaves only the "storage" and "smoke" test suites as not yet ported from eden to evetest.
PR dependencies
Marking this PR as draft until a required Adam change is merged:
lf-edge/adam#157
How to test and validate this PR
Changelog notes
Fixed a bug where a network instance's device-level NTP servers (learned
from DHCP or configured directly on the port) were not included in the
NTP server list reported to the controller for apps attached to that
network instance -- only the network instance's own explicitly
configured NTP servers were. Apps now see the full, correct combined
list.
All other changes are test-only (evetest framework additions and eden
test-suite rewrites) plus one SDN test-harness bugfix; no other
user-facing EVE behavior changes.
PR Backports
Checklist