feat(projectconfig): accept [tests] and [test-groups] schema in config#229
Open
bhagyapathak wants to merge 1 commit into
Open
feat(projectconfig): accept [tests] and [test-groups] schema in config#229bhagyapathak wants to merge 1 commit into
bhagyapathak wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds support for a “new-shape” test configuration schema by introducing first-class project-level test definitions and groups, and enabling images/components to reference them.
Changes:
- Introduces
TestDefinition,TestGroup,TestRef, andComponentTestsConfigtypes for the new schema. - Extends
ConfigFile,ImageTestsConfig, andComponentConfigto carry new test/group references. - Updates fingerprint decision test to exclude component test-selection metadata from build inputs.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/projectconfig/tests.go | Adds the new schema types for tests, groups, and references. |
| internal/projectconfig/configfile.go | Adds top-level [tests] and [test-groups] maps to the config shape. |
| internal/projectconfig/image.go | Allows images to reference tests/groups via ImageTestsConfig.Tests. |
| internal/projectconfig/component.go | Allows components to reference tests/groups and deep-copies the new field. |
| internal/projectconfig/fingerprint_test.go | Excludes ComponentConfig.Tests from fingerprint build inputs. |
f0e30ee to
b44cb81
Compare
b44cb81 to
f7dbf0e
Compare
Comment on lines
115
to
+122
| // reference identifies a test suite defined in the top-level [test-suites] section | ||
| // and may carry per-test metadata in the future (e.g., required vs optional). | ||
| TestSuites []TestSuiteRef `toml:"test-suites,omitempty" json:"testSuites,omitempty" jsonschema:"title=Test Suites,description=List of test suite references that apply to this image"` | ||
|
|
||
| // Tests is the new-shape list of test or test-group references that apply to this | ||
| // image. References must resolve to entries in the project-level [tests] or | ||
| // [test-groups] maps; resolution is the responsibility of the test layer. | ||
| Tests []TestRef `toml:"tests,omitempty" json:"tests,omitempty" jsonschema:"title=Tests,description=List of test or test-group references that apply to this image"` |
Comment on lines
66
to
+73
| // Definitions of test suites. | ||
| TestSuites map[string]TestSuiteConfig `toml:"test-suites,omitempty" validate:"dive" jsonschema:"title=Test Suites,description=Definitions of test suites for this project"` | ||
|
|
||
| // Definitions of individual tests (new schema, [tests.X]). | ||
| Tests map[string]TestDefinition `toml:"tests,omitempty" validate:"dive" jsonschema:"title=Tests,description=Definitions of individual tests"` | ||
|
|
||
| // Definitions of test groups (new schema, [test-groups.X]). | ||
| TestGroups map[string]TestGroup `toml:"test-groups,omitempty" validate:"dive" jsonschema:"title=Test Groups,description=Definitions of named bundles of tests"` |
Comment on lines
+66
to
+67
| // Tests is the list of test or group references that apply to the component. | ||
| Tests []TestRef `toml:"tests,omitempty" json:"tests,omitempty" jsonschema:"title=Tests,description=Per-component test or group references"` |
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.
Adds a parse-only schema for declaring tests and reusable test groups in project TOML, plus matching per-component and per-image test reference lists.