diff options
Diffstat (limited to 'spec/lib/container_registry/tag_spec.rb')
-rw-r--r-- | spec/lib/container_registry/tag_spec.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/spec/lib/container_registry/tag_spec.rb b/spec/lib/container_registry/tag_spec.rb index 3115dfe852f..9447112e4a8 100644 --- a/spec/lib/container_registry/tag_spec.rb +++ b/spec/lib/container_registry/tag_spec.rb @@ -97,6 +97,29 @@ describe ContainerRegistry::Tag do end end + context 'image is a helm chart' do + before do + stub_request(:get, 'http://registry.gitlab/v2/group/test/manifests/tag') + .with(headers: headers) + .to_return( + status: 200, + body: File.read(Rails.root + 'spec/fixtures/container_registry/tag_manifest_helm.json'), + headers: { 'Content-Type' => 'application/vnd.docker.distribution.manifest.v2+json' }) + + stub_request(:get, 'http://registry.gitlab/v2/group/test/blobs/sha256:65a07b841ece031e6d0ec5eb948eacb17aa6d7294cdeb01d5348e86242951487') + .with(headers: { 'Accept' => 'application/vnd.cncf.helm.config.v1+json' }) + .to_return( + status: 200, + body: File.read(Rails.root + 'spec/fixtures/container_registry/config_blob_helm.json')) + end + + context '#created_at' do + subject { tag.created_at } + + it { is_expected.to be_nil } + end + end + context 'schema v2' do before do stub_request(:get, 'http://registry.gitlab/v2/group/test/manifests/tag') |