Repository navigation
Commit 8a08e40
committed
test: two more boot cases, and the printed reason is now readable
Case 5: TRINITY_PROFILE=regulated with TRINITY_MCP_AUTH_PROFILE set to personal
and then to local, everything else as case 4. Neither starts, and the printed
reason names regulated_requires_production_mcp_auth and the profile it refused.
The variable goes through config/runtime.exs rather than Application.put_env,
because that is the path an operator uses and the one that rejects a value
outside the three.
Case 6: case 4's configuration with case 1's broken key store. Does not start,
and the printed reason is
{:regulated_boot_refused, {:regulated_requires_receipts, {:key_file, :eisdir}}}.
Case 1 keeps passing, so the same key store still does not stop a default node,
which is the whole difference AC4 is about. This is also the first case to reach
the error branch of the receipts check at an actual boot: cases 1 to 4 never did,
so whether the reason survived Supervisor.stop/2 inside start/2 was untested
until now. It does.
Found while writing case 5: the report tail inspected the reason with limit: 3,
which printed BOOT_REFUSED {:trinity, {{...}, ...}} and hid it completely. The
earlier cases asserted the reason appeared somewhere in the captured output, and
matched the crash report OTP writes to stderr rather than the line the node
printed. Now inspected with limit: :infinity, and cases 5 and 6 assert against
the BOOT_REFUSED line alone via refusal_line/1.
Planted breaks, each reverted, lib/ left byte-identical:
skipping the receipts gate entirely (verify_regulated_receipts) turned case 6
red and left case 1 green, which is the pair the profile exists to create.
making AC1's check_mcp_auth/2 always pass turned case 5 red, and showed that
:personal is still caught by AC2's check_embedded_as/2 with a different reason
(regulated_refuses_personal_issuer). Case 5 catches that only because it
asserts the specific reason rather than that a refusal happened.
Signed-off-by: Ayla Croft <aylacroft@proton.me>1 parent e0e96ed commit 8a08e40
1 file changed
Lines changed: 115 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
67 | 72 | | |
68 | 73 | | |
69 | | - | |
70 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
71 | 81 | | |
72 | 82 | | |
73 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
74 | 91 | | |
75 | 92 | | |
76 | 93 | | |
| |||
215 | 232 | | |
216 | 233 | | |
217 | 234 | | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
218 | 331 | | |
0 commit comments