Repository navigation
test(nodes): give the DistributedBackendManager fixtures a system state - #12877
Merged
Merged
Conversation
The disable-backend-install switch (#12754) makes InstallBackend and UpgradeBackend read d.systemState.DisableBackendInstall. The test fixtures build the manager as a struct literal or through NewDistributedBackendManager with an empty ApplicationConfig, so systemState is nil and every install and upgrade spec panics with a nil pointer dereference. Set a zero-value SystemState in each fixture. That keeps installs allowed, which is what these specs expect. Assisted-by: Claude Code:claude-haiku-5-5
mudler
approved these changes
Oct 24, 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.
The
core/services/nodessuite panics on master in 23DistributedBackendManagerspecs, so the Linuxtestsjob fails.#12754 (
--disable-backend-install) madeInstallBackendandUpgradeBackendreadd.systemState.DisableBackendInstall. The test fixtures build the manager without a system state, sosystemStateis nil and every install and upgrade spec dereferences it.This PR gives each fixture a zero-value
system.SystemState, which keeps installs allowed. The fixtures are:managers_distributed_test.go: the outerBeforeEach, and the OpStatus context, which builds the manager throughNewDistributedBackendManagerwith an emptyApplicationConfig.managers_agent_node_test.gonoroute_reactions_test.goNo production code changes.
Verification
now()and interval syntax, and are not related to this change.gofmt -lis clean.🤖 Generated with Claude Code