Skip to content

feat(projectconfig): accept [tests] and [test-groups] schema in config#229

Open
bhagyapathak wants to merge 1 commit into
microsoft:mainfrom
bhagyapathak:bhagya/azldev-test-schema
Open

feat(projectconfig): accept [tests] and [test-groups] schema in config#229
bhagyapathak wants to merge 1 commit into
microsoft:mainfrom
bhagyapathak:bhagya/azldev-test-schema

Conversation

@bhagyapathak
Copy link
Copy Markdown

@bhagyapathak bhagyapathak commented Jun 4, 2026

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.

Copilot AI review requested due to automatic review settings June 4, 2026 10:10
@bhagyapathak bhagyapathak changed the title feat(projectconfig): accept [tests] and [test-groups] schema in confi… feat(projectconfig): accept [tests] and [test-groups] schema in config Jun 4, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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, and ComponentTestsConfig types for the new schema.
  • Extends ConfigFile, ImageTestsConfig, and ComponentConfig to 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.

Comment thread internal/projectconfig/configfile.go Outdated
Comment thread internal/projectconfig/image.go
Comment thread internal/projectconfig/configfile.go Outdated
Copilot AI review requested due to automatic review settings June 4, 2026 16:03
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

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

Comment thread schemas/azldev.schema.json
Comment thread schemas/azldev.schema.json
Comment thread internal/projectconfig/tests.go
Comment thread docs/user/reference/config/tests.md
@bhagyapathak bhagyapathak force-pushed the bhagya/azldev-test-schema branch from f0e30ee to b44cb81 Compare June 5, 2026 13:57
Copilot AI review requested due to automatic review settings June 5, 2026 15:37
@bhagyapathak bhagyapathak force-pushed the bhagya/azldev-test-schema branch from b44cb81 to f7dbf0e Compare June 5, 2026 15:37
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

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

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"`
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.

2 participants