class Gitlab::QA::Component::SAML
Constants
- DOCKER_IMAGE
- DOCKER_IMAGE_TAG
Public Instance Methods
group_name()
click to toggle source
# File lib/gitlab/qa/component/saml.rb, line 25 def group_name @group_name ||= "saml_sso_group-#{SecureRandom.hex(4)}" end
instance()
click to toggle source
Calls superclass method
Gitlab::QA::Component::Base#instance
# File lib/gitlab/qa/component/saml.rb, line 29 def instance raise 'Please provide a block!' unless block_given? super end
name()
click to toggle source
# File lib/gitlab/qa/component/saml.rb, line 21 def name @name ||= "saml-qa-idp" end
set_assertion_consumer_service(assertion_con_service)
click to toggle source
# File lib/gitlab/qa/component/saml.rb, line 17 def set_assertion_consumer_service(assertion_con_service) @environment['SIMPLESAMLPHP_SP_ASSERTION_CONSUMER_SERVICE'] = assertion_con_service end
set_entity_id(entity_id)
click to toggle source
# File lib/gitlab/qa/component/saml.rb, line 13 def set_entity_id(entity_id) @environment['SIMPLESAMLPHP_SP_ENTITY_ID'] = entity_id end
set_sandbox_name(sandbox_name)
click to toggle source
rubocop:enable Metrics/AbcSize
# File lib/gitlab/qa/component/saml.rb, line 60 def set_sandbox_name(sandbox_name) ::Gitlab::QA::Runtime::Env.gitlab_sandbox_name = sandbox_name end
set_simple_saml_hostname()
click to toggle source
# File lib/gitlab/qa/component/saml.rb, line 64 def set_simple_saml_hostname ::Gitlab::QA::Runtime::Env.simple_saml_hostname = hostname end
start()
click to toggle source
rubocop:disable Metrics/AbcSize
# File lib/gitlab/qa/component/saml.rb, line 36 def start docker.run(image: image, tag: tag) do |command| command << '-d ' command << "--name #{name}" command << "--net #{network}" command << "--hostname #{hostname}" command << "--publish 8080:8080" command << "--publish 8443:8443" @volumes.to_h.each do |to, from| command.volume(to, from, 'Z') end @environment.to_h.each do |key, value| command.env(key, value) end @network_aliases.to_a.each do |network_alias| command << "--network-alias #{network_alias}" end end end