Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/user/reference/cli/azldev_component.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

97 changes: 97 additions & 0 deletions docs/user/reference/cli/azldev_component_test.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 31 additions & 7 deletions docs/user/reference/config/tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,9 @@ without enumerating every member.

Each entry under `[tests.<name>]` describes one configuration of one
runner. Framework-specific options live in a typed subtable
(`pytest`, `lisa`, `tmt`) whose contents are passed through
to the runner. azldev validates only the minimal set of keys each
framework requires (e.g. `pytest` requires `working-dir`/`test-paths`,
`tmt` requires `plan`/`source`, `lisa` requires at least one selector);
any other keys are passed through unvalidated so frameworks can evolve
independently.
(`pytest`, `lisa`, `tmt`). azldev validates the fields it consumes for local
execution; other framework-specific fields are passed through so frameworks
can evolve independently.

| Field | TOML Key | Type | Required | Description |
|-------|----------|------|----------|-------------|
Expand All @@ -27,7 +24,7 @@ independently.
| Metrics enabled | `metrics-enabled` | boolean | No | Hints to the test execution environment/validation service whether metrics from this test should be collected and stored |
| Required capabilities | `required-capabilities` | string array | No | Capability tokens the image must declare for this test to be applicable |
| Lisa | `lisa` | table | No | LISA-specific configuration (see [LISA fields](#lisa-fields)) |
| Tmt | `tmt` | table | No | TMT-specific configuration (opaque to azldev; metadata-only, no local execution) |
| Tmt | `tmt` | table | No | TMT plan configuration (see [TMT fields](#tmt-fields)) |
| Pytest | `pytest` | table | No | pytest-specific configuration (opaque to azldev) |

### LISA Fields
Expand All @@ -51,6 +48,33 @@ VM, same as legacy `[test-suites]` LISA suites).
At least one of `criteria`, `name`, `testcase-name`, or `testcase-names` is
required.

### TMT Fields

The `[tests.<name>.tmt]` subtable identifies a pinned upstream TMT plan. It is
also used by [`azldev component test`](../cli/azldev_component_test.md) to run
the mapped plan locally in a QEMU VM. Local execution clones the source at the
configured commit, provisions the supplied image with TMT/testcloud, and
installs the RPMs passed through `--rpm` before the plan runs.

| Field | TOML Key | Type | Description |
|-------|----------|------|-------------|
| Source | `source` | table (`git-url`, `ref`) | Git repository containing the plan. Required; `ref` must be a full 40-character hex commit SHA. |
| Plan | `plan` | string | Absolute TMT plan name to run. Required. |

For example, define a plan as follows:

```toml
[tests.example-tmt]
type = "tmt"

[tests.example-tmt.tmt]
source = { git-url = "https://example.test/tests.git", ref = "0123456789012345678901234567890123456789" }
plan = "/plans/example"
```

After associating `example-tmt` with a component, run it locally with
`azldev component test <component> --image-path <image.qcow2> --rpm <package.rpm>`.

## Test Group

Each entry under `[test-groups.<name>]` names an ordered list of test
Expand Down
1 change: 1 addition & 0 deletions internal/app/azldev/cmds/component/component.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,6 @@ components defined in the project configuration.`,
prepareOnAppInit(app, cmd)
queryOnAppInit(app, cmd)
renderOnAppInit(app, cmd)
testOnAppInit(app, cmd)
updateOnAppInit(app, cmd)
}
Loading
Loading