Would someone know how to escape dots . in Helm and precisely the unittest plugin? The template
[...]
spec:
config:
my.config: "foo"
The test
[...]
asserts:
- equal:
path: "spec.config.my\.config"
value: "foo"
Throws
yaml: line 23: found unknown escape character
The helm-unittest documentation states:
Map keys in
path
containing periods (.
) are supported with the use of ajsonPath
syntax: For more detail on thejsonPath
syntax.
The example syntax looks like root.ancestor.parent["dotted.field.name"]
. Adapting it to your example,
asserts:
- equal:
path: spec.config["my.config"]
value: "foo"