Class: Gitlab::QA::Scenario::Test::Integration::OAuth
- Inherits:
-
Gitlab::QA::Scenario::Template
- Object
- Gitlab::QA::Scenario::Template
- Gitlab::QA::Scenario::Test::Integration::OAuth
- Defined in:
- lib/gitlab/qa/scenario/test/integration/oauth.rb
Instance Attribute Summary collapse
-
#gitlab_name ⇒ Object
readonly
Returns the value of attribute gitlab_name.
Instance Method Summary collapse
-
#initialize ⇒ OAuth
constructor
A new instance of OAuth.
- #perform(release, *rspec_args) ⇒ Object
Methods inherited from Gitlab::QA::Scenario::Template
Constructor Details
#initialize ⇒ OAuth
Returns a new instance of OAuth.
11 12 13 |
# File 'lib/gitlab/qa/scenario/test/integration/oauth.rb', line 11 def initialize @gitlab_name = 'gitlab-oauth' end |
Instance Attribute Details
#gitlab_name ⇒ Object (readonly)
Returns the value of attribute gitlab_name.
9 10 11 |
# File 'lib/gitlab/qa/scenario/test/integration/oauth.rb', line 9 def gitlab_name @gitlab_name end |
Instance Method Details
#perform(release, *rspec_args) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/gitlab/qa/scenario/test/integration/oauth.rb', line 15 def perform(release, *rspec_args) Runtime::Env.require_oauth_environment! release = Release.new(release) Component::Gitlab.perform do |gitlab| gitlab.release = release gitlab.network = 'test' gitlab.name = gitlab_name gitlab.omnibus_config = <<~OMNIBUS gitlab_rails['omniauth_enabled'] = true; gitlab_rails['omniauth_allow_single_sign_on'] = ['github']; gitlab_rails['omniauth_block_auto_created_users'] = false; gitlab_rails['omniauth_providers'] = [ { name: 'github', app_id: '$GITHUB_OAUTH_APP_ID', app_secret: '$GITHUB_OAUTH_APP_SECRET', url: 'https://github.com/', verify_ssl: false, args: { scope: 'user:email' } } ]; OMNIBUS gitlab.instance do puts 'Running OAuth specs!' Component::Specs.perform do |specs| specs.suite = 'Test::Integration::OAuth' specs.release = release specs.network = gitlab.network specs.args = [gitlab.address, *rspec_args] end end end end |