Skip to content
Snippets Groups Projects
Commit 9f5d32c1 authored by Matthias Käppler's avatar Matthias Käppler :bicyclist_tone5: Committed by Andrejs Cunskis
Browse files

Replace metrics OmnibusConfig with Scenario class

parent 8d05291e
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -5,10 +5,8 @@ ce:metrics:
- .high-capacity
- .ce-variables
- .rspec-report-opts
- .combined-gitlab-qa-options-script
variables:
GITLAB_QA_OPTIONS_COMBINED: "$GITLAB_QA_OPTIONS --omnibus-config metrics"
QA_RSPEC_TAGS: "--tag metrics"
QA_SCENARIO: "Test::Integration::Metrics"
 
ce:metrics-quarantine:
extends:
Loading
Loading
@@ -18,10 +16,8 @@ ce:metrics-quarantine:
- .ce-variables
- .quarantine
- .rspec-report-opts
- .combined-gitlab-qa-options-script
variables:
GITLAB_QA_OPTIONS_COMBINED: "$GITLAB_QA_OPTIONS --omnibus-config metrics"
QA_RSPEC_TAGS: "--tag metrics"
QA_SCENARIO: "Test::Integration::Metrics"
 
ee:metrics:
extends:
Loading
Loading
@@ -30,10 +26,8 @@ ee:metrics:
- .high-capacity
- .ee-variables
- .rspec-report-opts
- .combined-gitlab-qa-options-script
variables:
GITLAB_QA_OPTIONS_COMBINED: "$GITLAB_QA_OPTIONS --omnibus-config metrics"
QA_RSPEC_TAGS: "--tag metrics"
QA_SCENARIO: "Test::Integration::Metrics"
 
ee:metrics-quarantine:
extends:
Loading
Loading
@@ -43,7 +37,5 @@ ee:metrics-quarantine:
- .ee-variables
- .quarantine
- .rspec-report-opts
- .combined-gitlab-qa-options-script
variables:
GITLAB_QA_OPTIONS_COMBINED: "$GITLAB_QA_OPTIONS --omnibus-config metrics"
QA_RSPEC_TAGS: "--tag quarantine --tag metrics"
QA_SCENARIO: "Test::Integration::Metrics"
# frozen_string_literal: true
module Gitlab
module QA
module Runtime
module OmnibusConfigurations
class Metrics < Default
def configuration
<<~RUBY
puma['exporter_enabled'] = true
puma['exporter_port'] = 8083
sidekiq['metrics_enabled'] = true
sidekiq['listen_port'] = 8082
RUBY
end
end
end
end
end
end
# frozen_string_literal: true
module Gitlab
module QA
module Scenario
module Test
module Integration
class Metrics < Scenario::Template
PUMA_METRICS_SERVER_PORT = 8083
SIDEKIQ_METRICS_SERVER_PORT = 8082
def perform(release, *rspec_args)
Component::Gitlab.perform do |gitlab|
gitlab.release = release
gitlab.network = 'test'
gitlab.name = 'gitlab'
gitlab.ports = [PUMA_METRICS_SERVER_PORT, SIDEKIQ_METRICS_SERVER_PORT]
gitlab.omnibus_configuration << <<~RUBY
puma['exporter_enabled'] = true
puma['exporter_port'] = #{PUMA_METRICS_SERVER_PORT}
sidekiq['metrics_enabled'] = true
sidekiq['listen_port'] = #{SIDEKIQ_METRICS_SERVER_PORT}
RUBY
gitlab.instance do
Component::Specs.perform do |specs|
specs.suite = 'Test::Integration::Metrics'
specs.release = gitlab.release
specs.network = gitlab.network
specs.args = [gitlab.address, *rspec_args]
end
end
end
end
end
end
end
end
end
end
Loading
Loading
@@ -177,18 +177,5 @@ module Gitlab::QA::Runtime
end
end
end
describe OmnibusConfigurations::Metrics do
describe '#configuration' do
subject { described_class.new }
it 'enables dedicated metrics servers' do
expect(subject.configuration).to include("puma['exporter_enabled'] = true")
expect(subject.configuration).to include("puma['exporter_port'] = 8083")
expect(subject.configuration).to include("sidekiq['metrics_enabled'] = true")
expect(subject.configuration).to include("sidekiq['listen_port'] = 8082")
end
end
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment