Expand description
Helper utilities for the test runner.
Contains pure functions and static helpers used by the test runner
that don’t require self access: variable substitution, TLS defaults,
JSON formatting, and metadata conversion.
Structs§
Enums§
Constants§
- REQUEST_
CHANNEL_ BUFFER - Buffer size for the request message channel. Controls back-pressure for client streaming: larger values allow more buffered requests but consume more memory.
Functions§
- build_
proto_ config - Build proto config with document-relative path resolution, matching run behavior.
- build_
tls_ config - Build TLS config using TLS section and env defaults, matching run behavior.
- collect_
unresolved_ placeholders - Recursively collect unresolved
{{ identifier }}placeholders from all string values in a JSONvalue(used to guard outgoing request bodies). - effective_
address - Resolve effective address using ADDRESS section, env var, then protocol-dependent default.
protocol_overridetakes precedence over OPTIONS.protocol from the document. - find_
unresolved_ placeholders - Append the names of unresolved
{{ identifier }}placeholders found intexttoout. A placeholder is unresolved when its body is a well-formed variable identifier that is absent fromvariables(i.e. the substitutor would have left it verbatim). Names are de-duplicated, order preserved. - format_
json_ pretty - Format JSON value for display.
- format_
unresolved_ placeholders - Format unresolved variable names back as
{{a}}, {{b}}for error messages. - full_
service_ name - Build full service name from package and service.
- interpolate_
variables - Interpolate variables in a string template.
Replaces
{{var}}patterns with values from the variables map. ReturnsNoneif no substitutions were made. - metadata_
map_ to_ hashmap - Convert tonic metadata map to HashMap.
- parse_
bool_ flag - Parse truthy values from config-style strings.
- parse_
compression_ option - Resolve compression setting from OPTIONS section with env fallback.
- resolve_
compression - Resolve the effective compression mode honoring the canonical precedence
section attribute > OPTIONS > env default. An explicit-but-unknown value at either level is a configuration error (never a silent fall-back). - resolve_
effective_ runtime_ options - resolve_
tls_ path - Resolve a TLS file path relative to document or CWD.
- substitute_
variables - Recursively substitute variables in a JSON value.
If a string is exactly
{{var}}, it’s replaced with the actual Value type. Otherwise, string interpolation is performed. - tls_
env_ defaults - Default TLS configuration from environment variables.