Bug 29744: (QA follow-up) Only consider PLACK_ENV for underscore
authorTomas Cohen Arazi <tomascohen@theke.io>
Fri, 23 Sep 2022 15:04:54 +0000 (12:04 -0300)
committerTomas Cohen Arazi <tomascohen@theke.io>
Fri, 23 Sep 2022 15:05:05 +0000 (12:05 -0300)
commite50948516169fd803159fc902f24e6aea0980bdf
tree6785e73927b4395be58cd1111605fba9fc10138a
parentaa4dc15b971e05612b12f17f4996a32be2b65f9c
Bug 29744: (QA follow-up) Only consider PLACK_ENV for underscore

When run under certain circumstances (in jenkins, for example) some ENV
variables are set for convenience, like PLACK_WORKERS and
PLACK_MAX_REQUESTS and is causing some tests to fail (notably, shib
ones).

This patch makes the regex only consider PLACK_ENV when testing for the
underscore case.

Tests are updated accordingly, and they are also rewritten to test for
boolean values instead of empty string, or zero or one, etc. The
implementation shouldn't matter as long as the boolean evaluation is
correct and it is clearer for devs what to expect.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
C4/Context.pm
t/Context.t