Built-in bindings¶
Chainsaw provides built-in bindings listed below.
Common¶
| Name | Purpose | Type | 
|---|---|---|
$values |  Values provided when invoking chainsaw with --values flag |  any |  
$namespace |  Name of the current test namespace | string |  
$client |  Kubernetes client chainsaw is connected to (if not running with --no-cluster) |  object |  
$config |  Kubernetes client config chainsaw is connected to (if not running with --no-cluster) |  object |  
In tests¶
| Name | Purpose | Type | 
|---|---|---|
$test.id |  Current test id | int |  
$test.scenarioId |  Current test scenario id | int |  
$test.metadata |  Current test metadata | metav1.ObjectMeta | 
Note
$test.idstarts at 1 for the first test
In steps¶
| Name | Purpose | Type | 
|---|---|---|
$step.id |  Current step id | int |  
Note
$step.idstarts at 1 for the first step
In operations¶
| Name | Purpose | Type | 
|---|---|---|
$operation.id |  Current operation id | int |  
$operation.resourceId |  Current resource id | int |  
Note
$operation.idstarts at 1 for the first operation$operation.resourceIdmaps to the resource id (starting at 1) in case the operation loads a file that contains multiple resources (the same operation is repeated once per resource)
In checks and outputs¶
| Name | Purpose | Type | 
|---|---|---|
@ |  The state of the resource (if any) at the end of the operation | any |  
$error |  The error message (if any) at the end of the operation | string |  
$stdout |  The content of the standard console output (if any) at the end of the operation | string |  
$stderr |  The content of the standard console error output (if any) at the end of the operation | string |  
Note
$stdoutand$stderrare only available inscriptandcommandoperations