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
path: root/qa
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-04 21:08:50 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-04 21:08:50 +0300
commitca05512007cea51e05d3431b2c8bd7228c754370 (patch)
tree5202d429acd68c071445aff9e352379173ec9c0b /qa
parent6b833f1e0340e00fdee074da9c42c0d4e07a46d2 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa')
-rw-r--r--qa/qa/page/project/pipeline/show.rb4
-rw-r--r--qa/qa/specs/features/browser_ui/4_verify/pipeline/create_and_process_pipeline_spec.rb102
2 files changed, 51 insertions, 55 deletions
diff --git a/qa/qa/page/project/pipeline/show.rb b/qa/qa/page/project/pipeline/show.rb
index 45fffbf6000..1003b828a32 100644
--- a/qa/qa/page/project/pipeline/show.rb
+++ b/qa/qa/page/project/pipeline/show.rb
@@ -30,9 +30,9 @@ module QA::Page
element :pipeline_badges
end
- def running?
+ def running?(wait: 0)
within('.ci-header-container') do
- page.has_content?('running')
+ page.has_content?('running', wait: wait)
end
end
diff --git a/qa/qa/specs/features/browser_ui/4_verify/pipeline/create_and_process_pipeline_spec.rb b/qa/qa/specs/features/browser_ui/4_verify/pipeline/create_and_process_pipeline_spec.rb
index d4853a7bcf3..3e000c6381e 100644
--- a/qa/qa/specs/features/browser_ui/4_verify/pipeline/create_and_process_pipeline_spec.rb
+++ b/qa/qa/specs/features/browser_ui/4_verify/pipeline/create_and_process_pipeline_spec.rb
@@ -1,78 +1,74 @@
# frozen_string_literal: true
module QA
- context 'Verify', :orchestrated, :docker do
+ context 'Verify', :docker do
describe 'Pipeline creation and processing' do
let(:executor) { "qa-runner-#{Time.now.to_i}" }
- after do
- Service::DockerRun::GitlabRunner.new(executor).remove!
- end
-
- it 'users creates a pipeline which gets processed' do
- Flow::Login.sign_in
-
- project = Resource::Project.fabricate! do |project|
- project.name = 'project-with-pipelines'
- project.description = 'Project with CI/CD Pipelines.'
+ let(:project) do
+ Resource::Project.fabricate_via_api! do |project|
+ project.name = 'project-with-pipeline'
end
+ end
+ before do
Resource::Runner.fabricate! do |runner|
runner.project = project
runner.name = executor
- runner.tags = %w[qa test]
+ runner.tags = [executor]
end
+ end
- Resource::Repository::ProjectPush.fabricate! do |push|
- push.project = project
- push.file_name = '.gitlab-ci.yml'
- push.commit_message = 'Add .gitlab-ci.yml'
- push.file_content = <<~EOF
- test-success:
- tags:
- - qa
- - test
- script: echo 'OK'
-
- test-failure:
- tags:
- - qa
- - test
- script:
- - echo 'FAILURE'
- - exit 1
-
- test-tags:
- tags:
- - qa
- - docker
- script: echo 'NOOP'
+ after do
+ Service::DockerRun::GitlabRunner.new(executor).remove!
+ end
- test-artifacts:
- tags:
- - qa
- - test
- script: mkdir my-artifacts; echo "CONTENTS" > my-artifacts/artifact.txt
- artifacts:
- paths:
- - my-artifacts/
- EOF
- end.project.visit!
+ it 'users creates a pipeline which gets processed', :smoke do
+ Flow::Login.sign_in
- expect(page).to have_content('Add .gitlab-ci.yml')
+ Resource::Repository::Commit.fabricate_via_api! do |commit|
+ commit.project = project
+ commit.commit_message = 'Add .gitlab-ci.yml'
+ commit.add_files(
+ [
+ {
+ file_path: '.gitlab-ci.yml',
+ content: <<~YAML
+ test-success:
+ tags:
+ - #{executor}
+ script: echo 'OK'
- Page::Project::Menu.perform(&:click_ci_cd_pipelines)
+ test-failure:
+ tags:
+ - #{executor}
+ script:
+ - echo 'FAILURE'
+ - exit 1
- expect(page).to have_content('All 1')
- expect(page).to have_content('Add .gitlab-ci.yml')
+ test-tags:
+ tags:
+ - invalid
+ script: echo 'NOOP'
- puts 'Waiting for the runner to process the pipeline'
- sleep 15 # Runner should process all jobs within 15 seconds.
+ test-artifacts:
+ tags:
+ - #{executor}
+ script: mkdir my-artifacts; echo "CONTENTS" > my-artifacts/artifact.txt
+ artifacts:
+ paths:
+ - my-artifacts/
+ YAML
+ }
+ ]
+ )
+ end.project.visit!
+ Page::Project::Menu.perform(&:click_ci_cd_pipelines)
Page::Project::Pipeline::Index.perform(&:click_on_latest_pipeline)
Page::Project::Pipeline::Show.perform do |pipeline|
- expect(pipeline).to be_running
+ expect(pipeline).to be_running(wait: 30)
expect(pipeline).to have_build('test-success', status: :success)
expect(pipeline).to have_build('test-failure', status: :failed)
expect(pipeline).to have_build('test-tags', status: :pending)