diff options
author | Thong Kuah <tkuah@gitlab.com> | 2019-05-20 15:55:11 +1200 |
---|---|---|
committer | Thong Kuah <tkuah@gitlab.com> | 2019-05-24 14:40:12 +1200 |
commit | f0efa2f91f8687a1cf0f39596790edaf338e8ec5 (patch) | |
tree | 8db640fa0967104f45cfd3fe96b6ca7a884889c6 /spec/models/clusters/cluster_spec.rb | |
parent | 7b5cc7b47e1aa0221b9aac85049388192ade4ed4 (diff) | |
download | gitlab-ce-f0efa2f91f8687a1cf0f39596790edaf338e8ec5.tar.gz |
Stop emitting AUTO_DEVOPS_DOMAIN Ci variable
Update documentation to reflect removal
Diffstat (limited to 'spec/models/clusters/cluster_spec.rb')
-rw-r--r-- | spec/models/clusters/cluster_spec.rb | 59 |
1 files changed, 6 insertions, 53 deletions
diff --git a/spec/models/clusters/cluster_spec.rb b/spec/models/clusters/cluster_spec.rb index 3ee8c340bfe..f066ed6b620 100644 --- a/spec/models/clusters/cluster_spec.rb +++ b/spec/models/clusters/cluster_spec.rb @@ -557,62 +557,15 @@ describe Clusters::Cluster do end context 'with no domain on cluster' do - context 'with a project cluster' do - let(:cluster) { create(:cluster, :project, :provided_by_gcp) } - let(:project) { cluster.project } + let(:cluster) { create(:cluster, :project, :provided_by_gcp) } + let(:project) { cluster.project } - context 'with domain set at instance level' do - before do - stub_application_setting(auto_devops_domain: 'global_domain.com') - - it { is_expected.to eq('global_domain.com') } - end - end - - context 'with domain set on ProjectAutoDevops' do - before do - auto_devops = project.build_auto_devops(domain: 'legacy-ado-domain.com') - auto_devops.save - end - - it { is_expected.to eq('legacy-ado-domain.com') } - end - - context 'with domain set as environment variable on project' do - before do - variable = project.variables.build(key: 'AUTO_DEVOPS_DOMAIN', value: 'project-ado-domain.com') - variable.save - end - - it { is_expected.to eq('project-ado-domain.com') } + context 'with domain set at instance level' do + before do + stub_application_setting(auto_devops_domain: 'global_domain.com') end - context 'with domain set as environment variable on the group project' do - let(:group) { create(:group) } - - before do - project.update(parent_id: group.id) - variable = group.variables.build(key: 'AUTO_DEVOPS_DOMAIN', value: 'group-ado-domain.com') - variable.save - end - - it { is_expected.to eq('group-ado-domain.com') } - end - end - - context 'with a group cluster' do - let(:cluster) { create(:cluster, :group, :provided_by_gcp) } - - context 'with domain set as environment variable for the group' do - let(:group) { cluster.group } - - before do - variable = group.variables.build(key: 'AUTO_DEVOPS_DOMAIN', value: 'group-ado-domain.com') - variable.save - end - - it { is_expected.to eq('group-ado-domain.com') } - end + it { is_expected.to eq('global_domain.com') } end end end |