Commit f6453eca authored by Dan Davison's avatar Dan Davison

Merge branch 'qa-dd-refactor-autodevops-spec' into 'master'

Pare down create_project_with_auto_devops_spec

See merge request gitlab-org/gitlab-ce!25577
parents a235e602 91d29c55
...@@ -9,7 +9,7 @@ module QA ...@@ -9,7 +9,7 @@ module QA
attr_reader :api_url, :ca_certificate, :token, :rbac attr_reader :api_url, :ca_certificate, :token, :rbac
def initialize(rbac: false) def initialize(rbac: true)
@rbac = rbac @rbac = rbac
end end
......
...@@ -11,8 +11,7 @@ module QA ...@@ -11,8 +11,7 @@ module QA
end end
describe 'Auto DevOps support', :orchestrated, :kubernetes, :quarantine do describe 'Auto DevOps support', :orchestrated, :kubernetes, :quarantine do
[true, false].each do |rbac| context 'when rbac is enabled' do
context "when rbac is #{rbac ? 'enabled' : 'disabled'}" do
before(:all) do before(:all) do
login login
...@@ -39,7 +38,7 @@ module QA ...@@ -39,7 +38,7 @@ module QA
end end
# Create and connect K8s cluster # Create and connect K8s cluster
@cluster = Service::KubernetesCluster.new(rbac: rbac).create! @cluster = Service::KubernetesCluster.new.create!
Resource::KubernetesCluster.fabricate! do |cluster| Resource::KubernetesCluster.fabricate! do |cluster|
cluster.project = @project cluster.project = @project
cluster.cluster = @cluster cluster.cluster = @cluster
...@@ -48,22 +47,12 @@ module QA ...@@ -48,22 +47,12 @@ module QA
cluster.install_prometheus = true cluster.install_prometheus = true
cluster.install_runner = true cluster.install_runner = true
end end
@project.visit!
Page::Project::Menu.perform(&:click_ci_cd_settings)
Page::Project::Settings::CICD.perform do |p|
p.enable_auto_devops
end
end end
after(:all) do after(:all) do
@cluster&.remove! @cluster&.remove!
end end
before do
login
end
it 'runs auto devops' do it 'runs auto devops' do
@project.visit! @project.visit!
Page::Project::Menu.perform(&:click_ci_cd_pipelines) Page::Project::Menu.perform(&:click_ci_cd_pipelines)
...@@ -126,7 +115,6 @@ module QA ...@@ -126,7 +115,6 @@ module QA
push.file_content = 'new file contents' push.file_content = 'new file contents'
end end
@project.visit!
Page::Project::Menu.perform(&:click_ci_cd_pipelines) Page::Project::Menu.perform(&:click_ci_cd_pipelines)
Page::Project::Pipeline::Index.perform(&:go_to_latest_pipeline) Page::Project::Pipeline::Index.perform(&:go_to_latest_pipeline)
...@@ -153,8 +141,6 @@ module QA ...@@ -153,8 +141,6 @@ module QA
end end
Page::Project::Job::Show.perform do |job| Page::Project::Job::Show.perform do |job|
expect(job).to be_successful(timeout: 1200) expect(job).to be_successful(timeout: 1200)
job.click_element(:pipeline_path)
end end
Page::Project::Menu.perform(&:click_operations_environments) Page::Project::Menu.perform(&:click_operations_environments)
...@@ -172,7 +158,6 @@ module QA ...@@ -172,7 +158,6 @@ module QA
end end
end end
end end
end
describe 'Auto DevOps', :smoke do describe 'Auto DevOps', :smoke do
it 'enables AutoDevOps by default' do it 'enables AutoDevOps by default' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment