Add check config integration test#316
Open
RiSKeD wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
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
dutagentand runs--check-configagainst every*-example-cfg.ymlunderpkg/module/*/. - Fix IPMI example config to reference the registered module ID (
ipmi). - Remove invalid
argsusage from thedummy-statusmain 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.
72b48a0 to
cbe7e16
Compare
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>
cbe7e16 to
331fe60
Compare
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.
resolves #290