summaryrefslogtreecommitdiff
path: root/spec/lib/container_registry
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-16 12:07:43 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-16 12:07:43 +0000
commitd10a462fedbd7794a83abdba9b4526600f71de5b (patch)
tree4dbd21cb89013d9e07b05bac5101cd13585a8be5 /spec/lib/container_registry
parent13867d66e92c2fd8962a126db4fbdc32891343c9 (diff)
downloadgitlab-ce-d10a462fedbd7794a83abdba9b4526600f71de5b.tar.gz
Add latest changes from gitlab-org/gitlab@masterogolowinski-master-patch-80898
Diffstat (limited to 'spec/lib/container_registry')
-rw-r--r--spec/lib/container_registry/tag_spec.rb23
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')