diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-20 00:13:17 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-20 00:13:17 +0300 |
commit | 9adb0b9ffb2d4a552f8c6f32d16fe863cc2975b0 (patch) | |
tree | a8efe8a32f0ead261f8dc0c7f87c22283fda578f /spec/lib/gitlab/pages/virtual_host_finder_spec.rb | |
parent | 87ce80bead0b20a30641785626c3dededada40d9 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/pages/virtual_host_finder_spec.rb')
-rw-r--r-- | spec/lib/gitlab/pages/virtual_host_finder_spec.rb | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/spec/lib/gitlab/pages/virtual_host_finder_spec.rb b/spec/lib/gitlab/pages/virtual_host_finder_spec.rb index 49eee772f8d..8c34968bbfc 100644 --- a/spec/lib/gitlab/pages/virtual_host_finder_spec.rb +++ b/spec/lib/gitlab/pages/virtual_host_finder_spec.rb @@ -40,23 +40,9 @@ RSpec.describe Gitlab::Pages::VirtualHostFinder, feature_category: :pages do it 'returns the virual domain when there are pages deployed for the project' do expect(virtual_domain).to be_an_instance_of(Pages::VirtualDomain) - expect(virtual_domain.cache_key).to match(/pages_domain_for_domain_#{pages_domain.id}_/) expect(virtual_domain.lookup_paths.length).to eq(1) expect(virtual_domain.lookup_paths.first.project_id).to eq(project.id) end - - context 'when :cache_pages_domain_api is disabled' do - before do - stub_feature_flags(cache_pages_domain_api: false) - end - - it 'returns the virual domain when there are pages deployed for the project' do - expect(virtual_domain).to be_an_instance_of(Pages::VirtualDomain) - expect(virtual_domain.cache_key).to be_nil - expect(virtual_domain.lookup_paths.length).to eq(1) - expect(virtual_domain.lookup_paths.first.project_id).to eq(project.id) - end - end end end @@ -76,23 +62,8 @@ RSpec.describe Gitlab::Pages::VirtualHostFinder, feature_category: :pages do virtual_domain = described_class.new("#{project.namespace.path}.example.com").execute expect(virtual_domain).to be_an_instance_of(Pages::VirtualDomain) - expect(virtual_domain.cache_key).to match(/pages_domain_for_namespace_#{project.namespace.id}_/) expect(virtual_domain.lookup_paths.length).to eq(0) end - - context 'when :cache_pages_domain_api is disabled' do - before do - stub_feature_flags(cache_pages_domain_api: false) - end - - it 'returns the virual domain with no lookup_paths' do - virtual_domain = described_class.new("#{project.namespace.path}.example.com".downcase).execute - - expect(virtual_domain).to be_an_instance_of(Pages::VirtualDomain) - expect(virtual_domain.cache_key).to be_nil - expect(virtual_domain.lookup_paths.length).to eq(0) - end - end end context 'when there are pages deployed for the project' do @@ -111,7 +82,6 @@ RSpec.describe Gitlab::Pages::VirtualHostFinder, feature_category: :pages do virtual_domain = described_class.new("#{project.namespace.path}.example.com").execute expect(virtual_domain).to be_an_instance_of(Pages::VirtualDomain) - expect(virtual_domain.cache_key).to match(/pages_domain_for_namespace_#{project.namespace.id}_/) expect(virtual_domain.lookup_paths.length).to eq(1) expect(virtual_domain.lookup_paths.first.project_id).to eq(project.id) end @@ -120,25 +90,9 @@ RSpec.describe Gitlab::Pages::VirtualHostFinder, feature_category: :pages do virtual_domain = described_class.new("#{project.namespace.path}.Example.com").execute expect(virtual_domain).to be_an_instance_of(Pages::VirtualDomain) - expect(virtual_domain.cache_key).to match(/pages_domain_for_namespace_#{project.namespace.id}_/) expect(virtual_domain.lookup_paths.length).to eq(1) expect(virtual_domain.lookup_paths.first.project_id).to eq(project.id) end - - context 'when :cache_pages_domain_api is disabled' do - before_all do - stub_feature_flags(cache_pages_domain_api: false) - end - - it 'returns the virual domain when there are pages deployed for the project' do - virtual_domain = described_class.new("#{project.namespace.path}.example.com").execute - - expect(virtual_domain).to be_an_instance_of(Pages::VirtualDomain) - expect(virtual_domain.cache_key).to be_nil - expect(virtual_domain.lookup_paths.length).to eq(1) - expect(virtual_domain.lookup_paths.first.project_id).to eq(project.id) - end - end end end @@ -187,18 +141,6 @@ RSpec.describe Gitlab::Pages::VirtualHostFinder, feature_category: :pages do expect(virtual_domain.lookup_paths.first.project_id).to eq(project.id) end end - - context 'when :cache_pages_domain_api is disabled' do - before do - stub_feature_flags(cache_pages_domain_api: false) - end - - it 'returns the virual domain when there are pages deployed for the project' do - expect(virtual_domain).to be_an_instance_of(Pages::VirtualDomain) - expect(virtual_domain.lookup_paths.length).to eq(1) - expect(virtual_domain.lookup_paths.first.project_id).to eq(project.id) - end - end end end |