summaryrefslogtreecommitdiff
path: root/qa/spec/support/formatters/test_stats_formatter_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'qa/spec/support/formatters/test_stats_formatter_spec.rb')
-rw-r--r--qa/spec/support/formatters/test_stats_formatter_spec.rb12
1 files changed, 8 insertions, 4 deletions
diff --git a/qa/spec/support/formatters/test_stats_formatter_spec.rb b/qa/spec/support/formatters/test_stats_formatter_spec.rb
index fec7ec1c7c0..859d45a660b 100644
--- a/qa/spec/support/formatters/test_stats_formatter_spec.rb
+++ b/qa/spec/support/formatters/test_stats_formatter_spec.rb
@@ -18,12 +18,13 @@ describe QA::Support::Formatters::TestStatsFormatter do
let(:quarantined) { 'false' }
let(:influx_client) { instance_double('InfluxDB2::Client', create_write_api: influx_write_api) }
let(:influx_write_api) { instance_double('InfluxDB2::WriteApi', write: nil) }
+ let(:stage) { '1_manage' }
+ let(:file_path) { "./qa/specs/features/#{stage}/subfolder/some_spec.rb" }
let(:influx_client_args) do
{
bucket: 'e2e-test-stats',
org: 'gitlab-qa',
- use_ssl: false,
precision: InfluxDB2::WritePrecision::NANOSECOND
}
end
@@ -34,14 +35,15 @@ describe QA::Support::Formatters::TestStatsFormatter do
time: DateTime.strptime(ci_timestamp).to_time,
tags: {
name: 'stats export spec',
- file_path: './spec/support/formatters/test_stats_formatter_spec.rb',
+ file_path: file_path.gsub('./qa/specs/features', ''),
status: :passed,
reliable: reliable,
quarantined: quarantined,
retried: "false",
job_name: "test-job",
merge_request: "false",
- run_type: run_type
+ run_type: run_type,
+ stage: stage
},
fields: {
id: './spec/support/formatters/test_stats_formatter_spec.rb[1:1]',
@@ -57,7 +59,9 @@ describe QA::Support::Formatters::TestStatsFormatter do
def run_spec(&spec)
spec ||= -> { it('spec') {} }
- describe_successfully('stats export', &spec)
+ describe_successfully('stats export', &spec).tap do |example_group|
+ example_group.examples.each { |ex| ex.metadata[:file_path] = file_path }
+ end
send_stop_notification
end