set-env Action #

Used in FLAT tests to change the environment of the FLAT application under test.

Normally, environment variables are set on server start-up and are immutable later on. They are available in the predefined variable $env.

The action allows to override variables in the $env structure for testing purposes.

Syntax #

<set-env>
{
  "VAR_NAME": "VALUE",
  "BUILD_TIME": {{ unixtime() - 3600 }}
}
</set-env>

The action argument is a JSON object and may be a JSON template. The property values should be of type string.

As environment variables from the system (shell or docker) can only be strings, numeric or boolean values are cast to their string representation. If a value is null, the corresponding environment variable is unset.

See also #