Repository navigation
evetest: add TestLocalDatastore for mDNS-discovered datastores - #7097
Conversation
Rewrite of the Eden local_datastore test. An app running in a Local network instance advertises evetest-local-ds.local over mDNS and serves a random file over HTTP. A standalone volume is then downloaded from that ".local" datastore and verified by SHA256. A negative variant uses a host name nobody advertises and expects "mDNS host not found". The app is a new test app, lfedge/evetest-local-ds. HTTPStorage gets an OmitPort option, because the downloader recognizes a local datastore by the URL host ending with ".local", which a ":port" suffix would hide. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Milan Lenco <milan@zededa.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7097 +/- ##
==========================================
+ Coverage 29.08% 29.58% +0.49%
==========================================
Files 550 561 +11
Lines 99453 101048 +1595
==========================================
+ Hits 28926 29893 +967
- Misses 68243 68919 +676
+ Partials 2284 2236 -48 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Evetest: Claude chose to skip 26 test/suite name(s) as unrelated to or redundant for this PR. Which ones and why: run summary. Comment |
TestDatastoreSuite: failures likely caused by this PRTestLocalDatastoreFailureClaude's conclusionThis confirms it directly: the registry mirror knows Root causeLive evidence shows |
|
Regarding the TestDatastoreSuite failure -- it is expected to fail until this PR is merged and |
|
I'm going to merge this and will check tomorrow how it went in the nightly evetest run. |
Description
Rewrite of the Eden
local_datastoretest for evetest. It covers the "localdatastore" feature: a datastore whose host name ends with
.localis notresolved with DNS, but discovered with mDNS on the bridges of EVE's network
instances (
pkg/pillar/cmd/downloader/mdns.go). This code is currentlyexercised only by Eden.
TestLocalDatastore(added toTestDatastoreSuite):lfedge/evetest-local-ds, in a Local networkinstance. The app advertises
evetest-local-ds.localover mDNS (avahi) andserves files over plain HTTP, like the
ubuntu-http-serverof the Eden test.http://evetest-local-ds.localand waits for it to reach
CREATED_VOLUME(the SHA256 is verified by EVE)..localhost that nobody advertises fails withmDNS host not found.The image size is configurable with
EVETEST_LOCAL_DS_IMAGE_SIZE_MIB(default 4).
Other changes:
evetest/testapps/local-ds(avahi +python3 -m http.server).HTTPStoragegets anOmitPortoption. The downloader recognizes a localdatastore by the URL host ending with
.local, which the:80suffix thatevetest always added would hide.
PR dependencies
The
lfedge/evetest-local-ds:1.0image is published bypublish-evetest.ymlonly after this PR is merged to master, so
TestLocalDatastorecannot pull itbefore that (build it locally with
make build-test-appsinevetest/).How to test and validate this PR
Build the test app image, then run the test:
Also runs as part of
TestDatastoreSuite. To check the coverage gap it ismeant to fill, run it against a
COVER=yEVE image and check thatfindDSmDNS,queryService,findLocalBridgesandfindLocalDsSrcinpkg/pillar/cmd/downloader/mdns.goare covered.Changelog notes
No user-facing changes (adds an evetest test).
PR Backports
Kubevirt hypervisor constant does not exist there).
the suite definition).
the suite definition).
All four branches contain the local datastore code (
mdns.gois identical tomaster's).
Checklist
🤖 Generated with Claude Code