Boot a QEMU router from example-router.toml in e2e-toml #122

Open
Alex wants to merge 1 commit from 119-example-firstboot into main
Owner

Problem

  • example-router.toml is 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.
  • The user decided: check it in release validation, not on every PR.

Change

  • cmd/provisioning-example -test-credentials FILE prints the template with its credential markers replaced by the synthetic values from values.toml. It rejects a file that differs from the current template outside the markers. The Go test helper filled now uses the same function.
  • tests/e2e/toml/run.py:
    • --target-mac OLD=NIC points one active target_mac line at a QEMU NIC.
    • --lan-net CIDR selects the LAN user network.
    • A sixth NIC member6 is added.
  • make e2e-toml-example boots the filled template with these options on 192.0.2.0/24. make e2e-toml runs it, without || true, and its report and config.db audit include it.
  • ADR 0026 records the decision. tests/e2e/toml/README.md describes 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.
  • Offline: filled the template, applied the Makefile's MAC pairs and an SSH key, then go run ./tests/e2e/toml/validate profile.toml: exit 0. Only the 6 target_mac lines and the kaido key changed.
  • Pending: a real make e2e-toml-example run on the build VM. The sandbox has no KVM.

Refs #119

🤖 Generated with Claude Code

## Problem - `example-router.toml` is 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. - The user decided: check it in release validation, not on every PR. ## Change - `cmd/provisioning-example -test-credentials FILE` prints the template with its credential markers replaced by the synthetic values from `values.toml`. It rejects a file that differs from the current template outside the markers. The Go test helper `filled` now uses the same function. - `tests/e2e/toml/run.py`: - `--target-mac OLD=NIC` points one active `target_mac` line at a QEMU NIC. - `--lan-net CIDR` selects the LAN user network. - A sixth NIC `member6` is added. - `make e2e-toml-example` boots the filled template with these options on `192.0.2.0/24`. `make e2e-toml` runs it, without `|| true`, and its report and `config.db` audit include it. - ADR 0026 records the decision. `tests/e2e/toml/README.md` describes 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. - Offline: filled the template, applied the Makefile's MAC pairs and an SSH key, then `go run ./tests/e2e/toml/validate profile.toml`: exit 0. Only the 6 `target_mac` lines and the `kaido` key changed. - Pending: a real `make e2e-toml-example` run on the build VM. The sandbox has no KVM. Refs #119 🤖 Generated with [Claude Code](https://claude.com/claude-code)
make e2e-toml-example fills the template's credential markers with the
synthetic test values, points its six ports at the VM's NICs and boots
it on the template's LAN. make e2e-toml runs it, so release validation
proves that the published template boots.

Refs #119

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This pull request is blocked because it's outdated.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin "119-example-firstboot:119-example-firstboot"
git switch "119-example-firstboot"
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Alex/kaido-core!122
No description provided.