Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/gitlab/ci/build/credentials/registry_spec.rb')
-rw-r--r--spec/lib/gitlab/ci/build/credentials/registry_spec.rb43
1 files changed, 0 insertions, 43 deletions
diff --git a/spec/lib/gitlab/ci/build/credentials/registry_spec.rb b/spec/lib/gitlab/ci/build/credentials/registry_spec.rb
deleted file mode 100644
index c0a76973f60..00000000000
--- a/spec/lib/gitlab/ci/build/credentials/registry_spec.rb
+++ /dev/null
@@ -1,43 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-RSpec.describe Gitlab::Ci::Build::Credentials::Registry do
- let(:build) { create(:ci_build, name: 'spinach', stage: 'test', stage_idx: 0) }
- let(:registry_url) { 'registry.example.com:5005' }
-
- subject { described_class.new(build) }
-
- before do
- stub_container_registry_config(host_port: registry_url)
- end
-
- it 'contains valid DockerRegistry credentials' do
- expect(subject).to be_kind_of(described_class)
-
- expect(subject.username).to eq 'gitlab-ci-token'
- expect(subject.password).to eq build.token
- expect(subject.url).to eq registry_url
- expect(subject.type).to eq 'registry'
- end
-
- describe '.valid?' do
- subject { described_class.new(build).valid? }
-
- context 'when registry is enabled' do
- before do
- stub_container_registry_config(enabled: true)
- end
-
- it { is_expected.to be_truthy }
- end
-
- context 'when registry is disabled' do
- before do
- stub_container_registry_config(enabled: false)
- end
-
- it { is_expected.to be_falsey }
- end
- end
-end