Commit Graph
4 Commits
Author SHA1 Message Date
Myasnikov Daniil cc942fed68 test(tests): run unit suites with Bats and retain POSIX coverage
The shell translator rewrites test bodies and loses Bats reporting.
The unit lane needs complete TAP results and JUnit reports without
changing how live-cluster suites run.

Sourced production helpers still need a dash pass, and unit test bodies
need nounset without exporting shell options into subprocesses.

Assisted-by: LLM
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-10-07 11:04:00 +03:00
Aleksei Sviridkin cc602f0dca docs(hack): drop a false universal from the nats-rd secrets check
The justification for the two nats-rd assertions ended with a claim
about every -rd package: none carries a tests directory or the test
target the helm-unittest runner looks for. At least one does now, so
a reader deciding where to put the next -rd assertion was told the
helm-unittest route is closed when it is open.

The assertions rest only on nats-rd lacking both, which still holds,
so the claim goes and the assertions stay as they are.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-09-23 00:10:54 +03:00
Aleksei Sviridkin 7a8f27c77b test(nats): compare both tenant grant surfaces against their whole form
The guard filtered each surface down to the entries that name a Secret
and compared the subset. Every such filter admits the spelling it did
not anticipate: on the ResourceDefinition a label selector names no
resource, and controller.cert-manager.io/fao is stamped on both
key-bearing Secrets, so a selector on it grants the CA private key; on
the dashboard Role a rule with no resourceNames names no Secret, a rule
with resources ["*"] names no resource, and a ClusterRole is not a
Role. All of them passed green.

Compare the whole ResourceDefinition include list, the rendered RBAC
kinds and the Role's complete rule list instead. Aggregating with
eval-all also drops the dependence on the Role being the first rendered
document. The header claimed both surfaces are out of reach of
helm-unittest for want of a chart template; both are rendered, and what
is missing is a suite that asserts on them.

Signed-off-by: Aleksei Sviridkin <3811295@gmail.com>
2026-08-15 22:40:58 +03:00
Aleksei Sviridkin 7e26358817 test(nats): pin the tenant-CA anchor and key-bearing Secret exclusion
The ResourceDefinition and the dashboard Role are the tenant-facing half of
the trust-anchor delivery path, and neither is a chart template, so the
helm-unittest suite covers neither. Deleting the tenant-CA selector or
granting a key-bearing Secret by name both left the suite fully green.

nats-<name>-ca holds the CA private key and nats-<name>-tls the server key.
Granting either to a tenant would let the holder issue certificates rather
than merely verify them. What a client needs is ca.crt alone, delivered as
the key-free <release>.tenant-ca projection and selected by label, since a
label is stamped only on an object the platform produced while a name grant
conveys whatever occupies the name.

The include set is asserted as a whitelist so a key-bearing Secret cannot
slip in under a spelling the test did not anticipate.

Signed-off-by: Aleksei Sviridkin <f@lex.la>
Assisted-By: Claude <noreply@anthropic.com>
2026-08-12 18:42:13 +03:00