Commit 1905f12
committed
fix(scaffold): correct entity ID format in generated tests
When generating test files with --index-events, the entity ID format was
using the old string concatenation format ('-1') instead of the format
produced by concatI32() ('01000000'). This caused all generated tests to
fail out-of-the-box.
Changes:
- Update entity ID in test assertions from '-1' to '01000000' format
- Improve comment to explain concatI32() encoding with little-endian bytes
- Correct terminology from "default address" to "default transaction hash"
This fixes a bug introduced in commit 34aee49 (Oct 2022) when Bytes as ID
with @immutable was implemented. The mapping and schema templates were
updated but the test template was missed.1 parent 8455ab9 commit 1905f12
2 files changed
Lines changed: 20 additions & 14 deletions
Lines changed: 16 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
315 | 315 | | |
316 | 316 | | |
317 | 317 | | |
318 | | - | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
319 | 321 | | |
320 | 322 | | |
321 | | - | |
| 323 | + | |
322 | 324 | | |
323 | 325 | | |
324 | 326 | | |
325 | 327 | | |
326 | 328 | | |
327 | | - | |
| 329 | + | |
328 | 330 | | |
329 | 331 | | |
330 | 332 | | |
331 | 333 | | |
332 | 334 | | |
333 | | - | |
| 335 | + | |
334 | 336 | | |
335 | 337 | | |
336 | 338 | | |
337 | 339 | | |
338 | 340 | | |
339 | | - | |
| 341 | + | |
340 | 342 | | |
341 | 343 | | |
342 | 344 | | |
343 | 345 | | |
344 | 346 | | |
345 | | - | |
| 347 | + | |
346 | 348 | | |
347 | 349 | | |
348 | 350 | | |
| |||
482 | 484 | | |
483 | 485 | | |
484 | 486 | | |
485 | | - | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
486 | 490 | | |
487 | 491 | | |
488 | | - | |
| 492 | + | |
489 | 493 | | |
490 | 494 | | |
491 | 495 | | |
492 | 496 | | |
493 | 497 | | |
494 | | - | |
| 498 | + | |
495 | 499 | | |
496 | 500 | | |
497 | 501 | | |
498 | 502 | | |
499 | 503 | | |
500 | | - | |
| 504 | + | |
501 | 505 | | |
502 | 506 | | |
503 | 507 | | |
504 | 508 | | |
505 | 509 | | |
506 | | - | |
| 510 | + | |
507 | 511 | | |
508 | 512 | | |
509 | 513 | | |
510 | 514 | | |
511 | 515 | | |
512 | | - | |
| 516 | + | |
513 | 517 | | |
514 | 518 | | |
515 | 519 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
| 94 | + | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
175 | 177 | | |
176 | 178 | | |
177 | 179 | | |
| |||
0 commit comments