Component test reference
verifier config
The config subcommand
Read, write, or delete individual fields in a Verifier config file.
Synopsis
verifier config <field> [value] [-c FILE] [-u]
Description
verifier config reads or modifies one field in the
configuration YAML file pointed to by -c (default
verifier.yaml). It does not validate the full config or
start a component; use verifier doctor to check the whole
configuration.
-c is accepted on either side of the subcommand name, so
verifier config -c staging.yaml timeout_ms and
verifier -c staging.yaml config timeout_ms do the same
thing. Given both, the one after config wins.
Three operations are available:
- Read: give a field name only. Verifier prints the current value. An optional field with no value prints an empty line.
- Write: give a field name and a value. Verifier writes the value to the file, creating the field if it does not exist.
- Delete: give a field name and
--unset. Verifier removes the field.
Giving both a value and --unset is an error.
If the config file does not exist, Verifier asks whether to create
one with default values and, if you agree, writes it before applying
your operation. The path must end in .yaml or
.yml. The prompt reads from standard input, so in a
non-interactive environment the command fails instead of creating the
file.
Writes validate before they land: Verifier re-parses the edited config and rejects a change that would make it invalid, leaving the file untouched. A successful write rewrites the whole file, so comments and original formatting are lost.
Field names follow YAML path notation. Indexed paths address entries in sequences, and quoted keys address map entries:
timeout_ms
component
transports[0].name
transports[1].connections[0]
package_serializers["example::nav"]
For the full list of configurable fields and their types, see verifier docs open config.
Options
field: Required The config field name to read, write, or delete.value: Optional The value to write. Omit to read the field.-c/--config FILE: Optional (Defaults toverifier.yaml) The configuration file to read or modify.-u/--unset: Optional Delete the field from the config file.
Examples
Read the current timeout:
verifier config timeout_ms
Set the timeout to 2000 milliseconds:
verifier config timeout_ms 2000
Set the component under test:
verifier config component example.sensor.Sensor
Set the number of iterations:
verifier config iterations 5
Read the name of the first transport:
verifier config transports[0].name
Set the serializer for a specific package:
verifier config package_serializers["example::nav"] protobuf
Delete a field:
verifier config timeout_ms --unset
Use a non-default config file:
verifier config -c staging.yaml component example.sensor.Sensor
Read a field from a config file in another directory:
verifier config -c ci/staging.yaml timeout_ms