diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-21 06:10:16 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-21 06:10:16 +0300 |
commit | f2eb66fef8aa8cebea25bc9e671a1f146514682f (patch) | |
tree | ef3f5ad9803bb211acdfd9f0f013c987f43d8e97 /qa | |
parent | c7a46b04196859929e8e4c04fbcbf8490f228edf (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa')
-rw-r--r-- | qa/Gemfile | 3 | ||||
-rw-r--r-- | qa/Gemfile.lock | 37 | ||||
-rw-r--r-- | qa/qa/specs/features/browser_ui/7_configure/auto_devops/auto_devops_templates_spec.rb | 64 | ||||
-rw-r--r-- | qa/spec/spec_helper.rb | 1 |
4 files changed, 103 insertions, 2 deletions
diff --git a/qa/Gemfile b/qa/Gemfile index 8b9592a027b..d946b22a0e0 100644 --- a/qa/Gemfile +++ b/qa/Gemfile @@ -17,7 +17,8 @@ gem 'knapsack', '~> 1.17' gem 'parallel_tests', '~> 2.29' gem 'rotp', '~> 3.1.0' gem 'timecop', '~> 0.9.1' -gem "parallel", "~> 1.19" +gem 'parallel', '~> 1.19' +gem 'rspec-parameterized', '~> 0.4.2' group :development do gem 'pry-byebug', '~> 3.5.1', platform: :mri diff --git a/qa/Gemfile.lock b/qa/Gemfile.lock index b88cc47ad94..2356c90a0af 100644 --- a/qa/Gemfile.lock +++ b/qa/Gemfile.lock @@ -1,12 +1,16 @@ GEM remote: https://rubygems.org/ specs: + abstract_type (0.0.7) activesupport (6.0.3.1) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) tzinfo (~> 1.1) zeitwerk (~> 2.2, >= 2.2.2) + adamantium (0.2.0) + ice_nine (~> 0.11.0) + memoizable (~> 0.4.0) addressable (2.7.0) public_suffix (>= 2.0.2, < 5.0) airborne (0.3.4) @@ -15,6 +19,8 @@ GEM rack-test (>= 1.1.0, < 2.0) rest-client (>= 2.0.2, < 3.0) rspec (~> 3.8) + ast (2.4.1) + binding_ninja (0.2.3) byebug (9.1.0) capybara (3.29.0) addressable @@ -29,6 +35,9 @@ GEM launchy childprocess (3.0.0) coderay (1.1.2) + concord (0.1.5) + adamantium (~> 0.2.0) + equalizer (~> 0.0.9) concurrent-ruby (1.1.6) debase (0.2.4.1) debase-ruby_core_source (>= 0.10.2) @@ -36,6 +45,7 @@ GEM diff-lcs (1.3) domain_name (0.5.20190701) unf (>= 0.0.5, < 1.0.0) + equalizer (0.0.11) faker (1.9.3) i18n (>= 0.7) gitlab-qa (4.0.0) @@ -44,10 +54,13 @@ GEM domain_name (~> 0.5) i18n (1.8.2) concurrent-ruby (~> 1.0) + ice_nine (0.11.2) knapsack (1.17.1) rake launchy (2.4.3) addressable (~> 2.3) + memoizable (0.4.2) + thread_safe (~> 0.3, >= 0.3.1) method_source (0.9.0) mime-types (3.3.1) mime-types-data (~> 3.2015) @@ -61,6 +74,13 @@ GEM parallel (1.17.0) parallel_tests (2.29.0) parallel + parser (2.7.1.4) + ast (~> 2.4.1) + proc_to_ast (0.1.0) + coderay + parser + unparser + procto (0.0.3) pry (0.11.3) coderay (~> 1.1.0) method_source (~> 0.9.0) @@ -71,7 +91,7 @@ GEM rack (2.2.2) rack-test (1.1.0) rack (>= 1.0, < 3) - rake (12.3.0) + rake (12.3.3) regexp_parser (1.6.0) rest-client (2.1.0) http-accept (>= 1.7.0, < 2.0) @@ -91,6 +111,12 @@ GEM rspec-mocks (3.9.1) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.9.0) + rspec-parameterized (0.4.2) + binding_ninja (>= 0.2.3) + parser + proc_to_ast + rspec (>= 2.13, < 4) + unparser rspec-retry (0.6.1) rspec-core (> 3.3) rspec-support (3.9.3) @@ -109,6 +135,14 @@ GEM unf (0.1.4) unf_ext unf_ext (0.0.7.7) + unparser (0.4.7) + abstract_type (~> 0.0.7) + adamantium (~> 0.2.0) + concord (~> 0.1.5) + diff-lcs (~> 1.3) + equalizer (~> 0.0.9) + parser (>= 2.6.5) + procto (~> 0.0.2) xpath (3.2.0) nokogiri (~> 1.8) zeitwerk (2.3.0) @@ -133,6 +167,7 @@ DEPENDENCIES rest-client (~> 2.1.0) rotp (~> 3.1.0) rspec (~> 3.7) + rspec-parameterized (~> 0.4.2) rspec-retry (~> 0.6.1) rspec_junit_formatter (~> 0.4.1) ruby-debug-ide (~> 0.7.0) diff --git a/qa/qa/specs/features/browser_ui/7_configure/auto_devops/auto_devops_templates_spec.rb b/qa/qa/specs/features/browser_ui/7_configure/auto_devops/auto_devops_templates_spec.rb new file mode 100644 index 00000000000..d2408ab6fe2 --- /dev/null +++ b/qa/qa/specs/features/browser_ui/7_configure/auto_devops/auto_devops_templates_spec.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +module QA + RSpec.describe 'Configure' do + describe 'AutoDevOps Templates', only: { subdomain: :staging } do + # specify jobs to be disabled in the pipeline. + # CANARY_ENABLED will allow the pipeline to be + # blocked by a manual job, rather than fail + # during the production run + let(:optional_jobs) do + %w[ + LICENSE_MANAGEMENT_DISABLED + SAST_DISABLED DAST_DISABLED + DEPENDENCY_SCANNING_DISABLED + CONTAINER_SCANNING_DISABLED + CANARY_ENABLED + ] + end + + where(:template) do + %w[rails spring express] + end + + with_them do + let!(:project) do + Resource::Project.fabricate_via_api! do |project| + project.name = "#{template}-autodevops-project-template" + project.template_name = template + project.description = "Let's see if the #{template} project works..." + project.auto_devops_enabled = true + end + end + + let(:pipeline) do + Resource::Pipeline.fabricate_via_api! do |pipeline| + pipeline.project = project + pipeline.variables = + optional_jobs.map do |job| + { key: job, value: '1', variable_type: 'env_var' } + end + end + end + + before do + Flow::Login.sign_in + end + + it 'works with Auto DevOps' do + %w[build code_quality test].each do |job| + pipeline.visit! + + Page::Project::Pipeline::Show.perform do |show_page| + show_page.click_job(job) + end + + Page::Project::Job::Show.perform do |show| + expect(show).to have_passed(timeout: 360) + end + end + end + end + end + end +end diff --git a/qa/spec/spec_helper.rb b/qa/spec/spec_helper.rb index 0f818b9f89a..b3251c739a9 100644 --- a/qa/spec/spec_helper.rb +++ b/qa/spec/spec_helper.rb @@ -2,6 +2,7 @@ require_relative '../qa' require 'rspec/retry' +require 'rspec-parameterized' if ENV['CI'] && QA::Runtime::Env.knapsack? && !ENV['NO_KNAPSACK'] require 'knapsack' |