Add method that returns location of registry image
This commit is contained in:
parent
046f4086e4
commit
7ec3c2dcee
|
@ -29,6 +29,10 @@ module ContainerRegistry
|
|||
"#{repository.path}:#{name}"
|
||||
end
|
||||
|
||||
def location
|
||||
"#{repository.location}:#{name}"
|
||||
end
|
||||
|
||||
def [](key)
|
||||
return unless manifest
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue