test: add generic boot-from-factory-config test#1545
Merged
Conversation
Contributor
|
Assigning to @wkz for review. Would be great to have this merged for the upcoming release. |
wkz
requested changes
Jun 29, 2026
wkz
left a comment
Contributor
There was a problem hiding this comment.
Very nice to not have to worry about these kinds of failures in the future! 😅
Verify that the device's factory-default configuration boots cleanly and that the device remains usable afterwards -- i.e. it does not fall back to the fail-secure failure-config. The test exercises the device's own first-boot bootstrap path: it clears the startup-config and reboots with the test-mode startup override set, so confd initialises running from the factory-config (its first-boot path). That mirrors a factory-fresh / factory-reset device and avoids applying a full config swap over the live management session -- confd cannot replace the whole running datastore from within an RPC without timing out, and a factory config may reconfigure the very transport we are connected over. The test is image-generic, using whatever factory-config the running image was built with, so it covers both the stock Infix factory config and any spin factory config. A single-node (1x1) topology is used on purpose: a factory config is not written with a lab full of peers in mind, so booting it across a multi-node topology could trigger broadcast storms or similar. NETCONF only, as it is the one management transport present in every factory config. Signed-off-by: Richard Alpe <richard@bit42.se>
9a5bbf0 to
d333c66
Compare
Reboot at end of factory config test to restore test config. Signed-off-by: Richard Alpe <richard@bit42.se>
wkz
approved these changes
Jul 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Verify that the device’s factory-default configuration boots cleanly and that the device remains usable afterwards. I.e. it does not fall back to the fail-secure failure-config.
This exercises the device’s own first-boot bootstrap path: with no startup-config present, confd initialises running from the factory-config. That is exactly what a factory-fresh (or factory-reset) device does, and it avoids applying a full config swap over the live management session.
The test is image-generic: it uses whatever factory-config the running image was built with, so it covers both the stock Infix factory config and any spin factory config.
A single-node topology is used on purpose: a factory config is not written with a lab full of peers in mind, so applying it across a multi-node topology could trigger broadcast storms or similar.
Checklist
Tick relevant boxes, this PR is-a or has-a: