Boot a QEMU router from example-router.toml in e2e-toml #122
Loading…
Reference in a new issue
No description provided.
Delete branch "119-example-firstboot"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
example-router.tomlis the reference startup template, but only Go unit tests check it. No test boots a router from it, so a template that fails at first boot goes unnoticed.Change
cmd/provisioning-example -test-credentials FILEprints the template with its credential markers replaced by the synthetic values fromvalues.toml. It rejects a file that differs from the current template outside the markers. The Go test helperfillednow uses the same function.tests/e2e/toml/run.py:--target-mac OLD=NICpoints one activetarget_macline at a QEMU NIC.--lan-net CIDRselects the LAN user network.member6is added.make e2e-toml-exampleboots the filled template with these options on192.0.2.0/24.make e2e-tomlruns it, without|| true, and its report andconfig.dbaudit include it.tests/e2e/toml/README.mddescribes the run.Validation
go vet ./cmd/provisioning-example/: ok.go test -count=1 -run 'TestTestCredentialsFlag|TestPublishedTemplateRequiresCredentialsAndImportsWithTestValues|TestExcludedOptionsAreRejected' ./cmd/provisioning-example/: ok.cd tests/e2e/toml && python3 -m unittest test_example_profile test_overrides test_keep_config_db test_firstboot_history: 18 tests OK.go run ./tests/e2e/toml/validate profile.toml: exit 0. Only the 6target_maclines and thekaidokey changed.make e2e-toml-examplerun on the build VM. The sandbox has no KVM.Refs #119
🤖 Generated with Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.