Add method that returns location of registry image

This commit is contained in:
Grzegorz Bizon 2017-04-10 13:07:36 +02:00
parent 046f4086e4
commit 7ec3c2dcee
2 changed files with 11 additions and 0 deletions

View File

@ -29,6 +29,10 @@ module ContainerRegistry
"#{repository.path}:#{name}"
end
def location
"#{repository.location}:#{name}"
end
def [](key)
return unless manifest

View File

@ -50,6 +50,13 @@ describe ContainerRegistry::Tag do
end
end
describe '#location' do
it 'returns a full location of the tag' do
expect(tag.location)
.to eq 'registry.gitlab/group/test:tag'
end
end
context 'manifest processing' do
context 'schema v1' do
before do