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

fixing full_name not returning docker_id when it should #14412

Merged
merged 1 commit into from
Mar 20, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/models/container_image.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class ContainerImage < ApplicationRecord
after_create :raise_creation_event

def full_name
docker_id if image_ref && image_ref.start_with?(DOCKER_PULLABLE_PREFIX)
return docker_id if image_ref && image_ref.start_with?(DOCKER_PULLABLE_PREFIX)
result = ""
result << "#{container_image_registry.full_name}/" unless container_image_registry.nil?
result << name
Expand Down
3 changes: 3 additions & 0 deletions spec/models/container_image_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
reg = ContainerImageRegistry.new(:name => "docker.io", :host => "docker.io", :port => "1234")
image.container_image_registry = reg
expect(image.full_name).to eq("docker.io:1234/fedora:v1")

image.image_ref = "docker-pullable://registry/repo/name@id"
expect(image.full_name).to eq("registry/repo/name@id")
end

it "#display_registry" do
Expand Down