Skip to content

Fix image push tests permissions in CI #128

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Siddhant-K-code
Copy link

Implemented a mock-based testing approach that validates push functionality without requiring external registry permissions.

fixes #56

@adityaramani
Copy link
Contributor

Thanks for the PR! Will take a deeper look and get back!

In the meantime could you please set up commit signing and re push your commits?

Replace disabled external registry push tests with mock-based tests that don't require registry write permissions.

Changes:
- Replace testImageStorePush() with testImageStorePushWithMock()
- Replace pushIndex() with pushIndexWithMock()
- Add MockRegistryClient implementing ContentClient protocol
- Add testPush() extension method for dependency injection
- Fix Makefile Swift path for environment compatibility

This enables external contributors to run complete test suite without registry credentials.

Resolves apple#56
@Siddhant-K-code Siddhant-K-code force-pushed the fix/image-push-tests-permissions branch from 0b27707 to 825f0ad Compare June 14, 2025 18:15
@Siddhant-K-code
Copy link
Author

Thanks, I've signed the commit 825f0ad

- Add Hashable conformance to Descriptor struct for dictionary key usage
- Add missing imports: ContainerizationError, Crypto, NIOCore
- Fix SHA256Digest type references to SHA256.Digest
- Fix MockRegistryClient Sendable conformance with @unchecked Sendable
- Fix Image.Config/Image.Rootfs references to ImageConfig/Rootfs
- Fix progress handler usage to match ProgressHandler signature
- Fix nil type context annotations for progress parameters
@Siddhant-K-code Siddhant-K-code force-pushed the fix/image-push-tests-permissions branch from c2b4575 to f044c26 Compare June 14, 2025 18:34
@adityaramani adityaramani self-assigned this Jun 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Image push tests permissions in CI
2 participants