Skip to content
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

fix(service): image registry with port is valid #26

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

k9withabone
Copy link
Owner

Image names with a registry that have a port are now valid.

Changed compose_spec::service::image::Name::new() to allow for using compose_spec::service::Image::set_registry() with a registry with a port. The first part of a name is now treated as a registry if it has a dot (.) regardless of whether the name has multiple parts.

Added compose_spec::service::image::InvalidNamePart::RegistryPort error variant for when a registry's port is not a valid port number.

Refactored image tests to not use unwrap().

Fixes #22

Image names with a registry that have a port are now valid.

Changed `compose_spec::service::image::Name::new()` to allow for
using `compose_spec::service::Image::set_registry()` with a registry
with a port. The first part of a name is now treated as a registry if it
has a dot (.) regardless of whether the name has multiple parts.

Added `compose_spec::service::image::InvalidNamePart::RegistryPort`
error variant for when a registry's port is not a valid port number.

Refactored image tests to not use `unwrap()`.

Fixes: #22
@k9withabone k9withabone added the bug Something isn't working label Sep 24, 2024
@k9withabone k9withabone added this to the v0.3.0 milestone Sep 24, 2024
@k9withabone k9withabone merged commit 2c50d2c into main Sep 26, 2024
9 checks passed
@k9withabone k9withabone deleted the image-registry-port branch September 26, 2024 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Image names with a port in the registry should be valid.
1 participant