Commit 46d0221
committed
test(e2e): normalise container-augmented config fields in settings contract
`it_should_allow_admins_to_get_all_the_settings` compares the live
settings response with `env.server_settings_masking_secrets()`, which
the host loads from the same TOML the container starts from. The
container's entry script (ADR-T-009 §7) however augments that config
before the daemon comes up — when no PEM and no path is supplied for
`auth.{private,public}_key`, it defaults the key paths to
`/etc/torrust/index/auth/{private,public}.pem`, and the runtime DB
URL points at the in-container bind-mount target
(`/var/lib/torrust/index/database/...`) rather than the host path the
runner uses (`./storage/index/lib/database/...`).
The result is two fields that legitimately diverge between expected
and actual even on a green run, so the equality assertion fired on
environment plumbing rather than on real contract drift. Clear
`auth.private_key_path`, `auth.public_key_path`, and
`database.connect_url` on both sides before comparing, with a comment
explaining why each one is masked and pointing at ADR-T-009 §7. The
rest of the response — including the masked secrets the test was
originally written to cover — is still asserted byte-for-byte.1 parent edc6ca6 commit 46d0221
1 file changed
Lines changed: 22 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
80 | | - | |
81 | | - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
82 | 101 | | |
83 | 102 | | |
84 | 103 | | |
0 commit comments