Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/qa/spec
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-11-29 09:08:59 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-11-29 09:08:59 +0300
commit63c450b3e417739ddbe0bf89a6f843074e35c66c (patch)
tree4119094a8223f0e501a5cf28f6bffebea26b231b /qa/spec
parentf51c6a69f9804d1dde7a0f1717a91ca97001f871 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa/spec')
-rw-r--r--qa/spec/support/formatters/test_metrics_formatter_spec.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/qa/spec/support/formatters/test_metrics_formatter_spec.rb b/qa/spec/support/formatters/test_metrics_formatter_spec.rb
index 76bde98cc33..2b8a0791dc5 100644
--- a/qa/spec/support/formatters/test_metrics_formatter_spec.rb
+++ b/qa/spec/support/formatters/test_metrics_formatter_spec.rb
@@ -253,6 +253,27 @@ describe QA::Support::Formatters::TestMetricsFormatter do
end
end
+ context 'with additional custom metrics' do
+ it 'exports data to influxdb with additional metrics' do
+ run_spec do
+ it(
+ 'spec',
+ custom_test_metrics: { tags: { custom_tag: "tag" }, fields: { custom_field: 1 } },
+ testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/1234'
+ ) {}
+ end
+
+ custom_data = data.merge({
+ **data,
+ tags: data[:tags].merge({ custom_tag: "tag" }),
+ fields: data[:fields].merge({ custom_field: 1 })
+ })
+
+ expect(influx_write_api).to have_received(:write).once
+ expect(influx_write_api).to have_received(:write).with(data: [custom_data])
+ end
+ end
+
context 'with fabrication runtimes' do
let(:api_fabrication) { 4 }
let(:ui_fabrication) { 10 }