Skip to content

Add check config integration test#316

Open
RiSKeD wants to merge 1 commit into
mainfrom
test/check-config-integration-test
Open

Add check config integration test#316
RiSKeD wants to merge 1 commit into
mainfrom
test/check-config-integration-test

Conversation

@RiSKeD

@RiSKeD RiSKeD commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

resolves #290

Copilot AI review requested due to automatic review settings April 9, 2026 09:05
@RiSKeD RiSKeD changed the title Test/check config integration test Check config integration test Apr 9, 2026
@RiSKeD RiSKeD changed the title Check config integration test Add check config integration test Apr 9, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds an integration test to ensure dutagent --check-config successfully validates all shipped example module configs (regression coverage for the GPIO-related crash reported in #290), and updates example YAMLs to match current validation rules/module IDs.

Changes:

  • Add an integration test that builds dutagent and runs --check-config against every *-example-cfg.yml under pkg/module/*/.
  • Fix IPMI example config to reference the registered module ID (ipmi).
  • Remove invalid args usage from the dummy-status main module example.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
test/integration/dutagent/checkconfig_test.go Builds dutagent and validates all example configs via --check-config, asserting clean exit and expected output.
pkg/module/ipmi/ipmi-example-cfg.yml Updates example to use the correct module name (ipmi).
pkg/module/dummy/dummy-example-cfg.yml Removes invalid args from a main module example so config validation passes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread test/integration/dutagent/checkconfig_test.go
Comment thread test/integration/dutagent/checkconfig_test.go
Comment thread test/integration/dutagent/checkconfig_test.go
@RiSKeD RiSKeD force-pushed the test/check-config-integration-test branch 2 times, most recently from 72b48a0 to cbe7e16 Compare June 30, 2026 10:06
Build the dutagent binary in TestMain and run --check-config against
every module example config file, asserting exit 0 and the expected
"Configuration is valid" output.

Regression coverage for the GPIO --check-config panic and the
requirement that all shipped example configs are kept valid.

Signed-off-by: Fabian Wienand <fabian.wienand@blindspot.software>
@RiSKeD RiSKeD force-pushed the test/check-config-integration-test branch from cbe7e16 to 331fe60 Compare July 1, 2026 10:09
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.

dutagent config validation crash

2 participants