Skip to content

test: add generic boot-from-factory-config test#1545

Merged
wkz merged 2 commits into
mainfrom
factory-config-test
Jul 1, 2026
Merged

test: add generic boot-from-factory-config test#1545
wkz merged 2 commits into
mainfrom
factory-config-test

Conversation

@rical

@rical rical commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

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:

  • Bugfix
    • Regression tests
    • ChangeLog updates (for next release)
  • Feature
    • YANG model change => revision updated?
    • Regression tests added?
    • ChangeLog updates (for next release)
    • Documentation added?
  • Test changes
    • Checked in changed Readme.adoc (make test-spec)
    • Added new test to group Readme.adoc and yaml file
  • Code style update (formatting, renaming)
  • Refactoring (please detail in commit messages)
  • Build related changes
  • Documentation content changes
    • ChangeLog updated (for major changes)
  • Other (please describe):

@rical rical marked this pull request as ready for review June 23, 2026 13:14
@troglobit

Copy link
Copy Markdown
Contributor

Assigning to @wkz for review. Would be great to have this merged for the upcoming release.

@wkz wkz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice to not have to worry about these kinds of failures in the future! 😅

Comment thread test/case/system/factory_config/test.py
Comment thread test/case/system/factory_config/test.py Outdated
Comment thread test/case/system/factory_config/test.py
Comment thread test/case/system/factory_config/test.py Outdated
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>
@rical rical force-pushed the factory-config-test branch from 9a5bbf0 to d333c66 Compare June 30, 2026 08:33
Reboot at end of factory config test to restore test config.

Signed-off-by: Richard Alpe <richard@bit42.se>
@wkz wkz merged commit 2a766d7 into main Jul 1, 2026
9 checks passed
@wkz wkz deleted the factory-config-test branch July 1, 2026 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants