Closed mwmahlberg closed 2 years ago
This is because both Citrus/YAKS and Apache Camel do use the ${}
placeholder syntax. So YAKS tries to replace that placeholder ${body}
and can not find a test variable named body
.
To solve this you can disable the YAKS placeholder replacement for Apache Camel resources with the env setting: YAKS_CAMELK_SUPPORT_VARIABLES_IN_SOURCES=false
You can globally add this env setting to the yaks-config.yaml
configuration. Or you can disable this in your feature file explicitly with:
Given Disable variable support in Camel-K sources
As an alternative you may want to use variable expression escaping like this ${//body//}
. This syntax prevents YAKS from replacing this as a test variable, too.
@christophd Will verify that this was my actual problem and get back to you.
@mwmahlberg any news on this?
I have a feature file loading a Camel K integration:
with
basic-test.yaml
looking like this:This causes (abridged):
My working theory here is that the source files are processed by the same template engine as the feature file. Is that wanted behavior?
For completeness, my
jaks-config.yaml
: