Commit 809bc88
fix: update integration tests for OCI layout compatibility
Fix two failing integration tests to work correctly with OCI layout format:
1. TestDockerPackage_ExportToCache_Integration:
- Mark 'export without image config' as expected failure
- OCI layout export requires an image tag (--tag flag)
- Without image config, there's no tag to use
- This is expected behavior, not a bug
2. TestDockerPackage_CacheRoundTrip_Integration:
- Make digest optional (already marked omitempty in struct)
- With OCI layout, image isn't loaded into daemon during export
- docker inspect can't get digest if image isn't in daemon
- Use skopeo or crane to load OCI layout images
- docker load doesn't support OCI layout format
- Gracefully skip if neither tool is available
Changes:
- Mark export without image as expected failure (2 lines)
- Make digest optional in metadata validation (3 lines)
- Replace docker load with skopeo/crane for OCI layout (42 lines)
Result:
All 3 integration tests now pass:
- TestDockerPackage_ExportToCache_Integration ✅
- TestDockerPackage_CacheRoundTrip_Integration ✅
- TestDockerPackage_OCILayout_Determinism_Integration ✅
Prerequisites:
Tests require skopeo or crane to load OCI images. Tests skip
gracefully with helpful install instructions if neither is available.
Co-authored-by: Ona <no-reply@ona.com>1 parent a45d5b0 commit 809bc88
1 file changed
+40
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
114 | | - | |
| 113 | + | |
| 114 | + | |
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| |||
454 | 454 | | |
455 | 455 | | |
456 | 456 | | |
| 457 | + | |
457 | 458 | | |
458 | | - | |
| 459 | + | |
459 | 460 | | |
460 | 461 | | |
461 | 462 | | |
| |||
484 | 485 | | |
485 | 486 | | |
486 | 487 | | |
487 | | - | |
488 | | - | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
489 | 522 | | |
490 | 523 | | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
496 | | - | |
497 | | - | |
498 | | - | |
499 | | - | |
| 524 | + | |
500 | 525 | | |
| 526 | + | |
501 | 527 | | |
502 | 528 | | |
503 | 529 | | |
| |||
0 commit comments