mrutkows / openwhisk-knative-build

Knative build resources for Apache OpenWhisk Functions
Apache License 2.0
0 stars 1 forks source link

Create test case to verify "in-process" Action metadata (i.e., __OW_xxx env. vars.) #16

Open mrutkows opened 5 years ago

mrutkows commented 5 years ago

with the support of Knative, we need a test case that verifies that the __OW_xxx env. vars exposed/accessible by Action functions contains values as described here:

https://github.com/apache/incubator-openwhisk/blob/master/docs/actions.md#accessing-action-metadata-within-the-action-body

Specifically, this includes:

__OW_API_HOST
__OW_API_KEY
__OW_NAMESPACE
__OW_ACTION_NAME (ding ding, we have a winner!)
__OW_ACTIVATION_ID
__OW_DEADLINE

under knative, we may need to set logical default values OR figure out in our proxy changes (/init, /run processing changes) to take knative/kube variables and translate them.

mrutkows commented 5 years ago

The tests MUST verify no unwanted env. vars are passed (to the process that actually runs the functions and its env.) that would allow any type of special platform-specific code or expose security issues.