lib/gitlab/qa/scenario/test/integration/saml.rb in gitlab-qa-4.18.0 vs lib/gitlab/qa/scenario/test/integration/saml.rb in gitlab-qa-4.19.0

- old
+ new

@@ -4,11 +4,11 @@ module QA module Scenario module Test module Integration class SAML < Scenario::Template - attr_reader :gitlab_name, :spec_suite + attr_reader :gitlab_name, :spec_suite, :saml_component def configure(gitlab, saml) raise NotImplementedError end @@ -22,26 +22,36 @@ Component::Gitlab.perform do |gitlab| gitlab.release = release gitlab.network = 'test' gitlab.name = gitlab_name + gitlab.set_accept_insecure_certs - Component::SAML.perform do |saml| - saml.network = 'test' - configure(gitlab, saml) + if saml_component + Component::SAML.perform do |saml| + saml.network = 'test' + configure(gitlab, saml) - saml.instance do - gitlab.instance do - puts "Running #{spec_suite} specs!" - - Component::Specs.perform do |specs| - specs.suite = spec_suite - specs.release = release - specs.network = gitlab.network - specs.args = [gitlab.address, *rspec_args] - end + saml.instance do + run_specs(gitlab, release, *rspec_args) end end + else + configure(gitlab, nil) + run_specs(gitlab, release, *rspec_args) + end + end + end + + def run_specs(gitlab, release, *rspec_args) + gitlab.instance do + puts "Running #{spec_suite} specs!" + + Component::Specs.perform do |specs| + specs.suite = spec_suite + specs.release = release + specs.network = gitlab.network + specs.args = [gitlab.address, *rspec_args] end end end end end