TestMoreKinds checks that each masked value is no longer in what is
sent, after taking out the {{KIND_…}} placeholders. A user name goes as
a made-up name instead, eight lowercase letters from a key that is new
each run, and that name can spell a short user name: on ubuntu CI at
500f39886, "ops" was still in "scp a.txt zpxopsat@{{HOSTNAME_…}}". The
check now takes out the made-up name for the value first; the test
still checks separately that the made-up name is what was sent.
The other tests that check a user name is gone use names of eight or
more letters (developer, rinakato), which eight random letters spell
with odds around 26^-8, so they are left as they are.
Run on mote at this head (origin/main 256910f17):
- A probe test searched for a key whose made-up name for "ops"
contains "ops" (key 2207: dopsubnz), set it, and ran TestMoreKinds:
red with the old check ("ops" still in "dopsubnz@…", CI's red), ok
with this one. The probe is not committed.
- go test -count=1 ./internal/redact: ok. gofmt -l clean.
Fixes#4345.