Expand description
#2134: a suite’s configuration, env { NAME = "value" … }.
A suite or case declares the variables and secrets its participants see.
At system each participant’s Worker env holds them, as Wrangler would
put them there; at unit/integration they are what the Secrets test
double answers. One map applies to every participant, and a case’s env
layers over its suite’s, name by name.
The checks here are tier-independent: a name given twice at one scope
(bynk.suite.duplicate_env) and a value that is not a String literal
(bynk.suite.env_not_literal). The system-only binding clash
(bynk.suite.env_binding_clash) needs each Worker’s binding names, which
the emitter computes, so it is check_env_binding_clash, called from
there with them.
Functions§
- case_
env - The variables and secrets
caseruns with: its suite’senventries, overlaid by the case’s own, name by name. Only literal values are kept; a non-literal is alreadybynk.suite.env_not_literal. - check_
env_ binding_ clash bynk.suite.env_binding_clash: atsystem, anenventry lands on each participant’s Workerenv, so a name one of them already binds (a Service Binding, KV namespace or Durable Object namespace), or a key the harness sets there itself (a call edge’s key, a foreign caller’s secret), is refused.bindingsmaps each such name to what holds it, as a phrase (“a binding ofshop.ledger’s Worker”).- check_
env_ clauses bynk.suite.duplicate_envandbynk.suite.env_not_literalfor one suite declaration: its ownenvclauses as one scope, and each case’s as another.- has_env
- Whether
declgives anyenventry, at the suite or on a case. - remote_
env_ disagreement - #2138 (end-to-end testing track §3.7): a case run against a named target.
A deployed target already runs with its own variables, so the runner can’t
apply the case’s
env; the case runs only if itsenvand the target’s declaredvarsagree on every name either mentions. Refused (bynk.test.remote_unsupported_env), first match reported: