diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-19 12:11:29 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-19 12:11:29 +0300 |
commit | 39e7e7beda5ab61c707eb050304a68bffa91dabd (patch) | |
tree | c024ee27baa67beddb8d5e19d564d56bbe4acf94 /spec/controllers | |
parent | 8c68904468d88beaeb618bfe81289a6c1eb8538c (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/controllers')
4 files changed, 39 insertions, 1 deletions
diff --git a/spec/controllers/projects/analytics/cycle_analytics/stages_controller_spec.rb b/spec/controllers/projects/analytics/cycle_analytics/stages_controller_spec.rb index 8903592ba15..b9e569b1647 100644 --- a/spec/controllers/projects/analytics/cycle_analytics/stages_controller_spec.rb +++ b/spec/controllers/projects/analytics/cycle_analytics/stages_controller_spec.rb @@ -16,7 +16,6 @@ RSpec.describe Projects::Analytics::CycleAnalytics::StagesController do end before do - stub_feature_flags(use_vsa_aggregated_tables: false) sign_in(user) end diff --git a/spec/controllers/projects/cycle_analytics_controller_spec.rb b/spec/controllers/projects/cycle_analytics_controller_spec.rb index ccd213fdffa..f5dd8abd67b 100644 --- a/spec/controllers/projects/cycle_analytics_controller_spec.rb +++ b/spec/controllers/projects/cycle_analytics_controller_spec.rb @@ -30,6 +30,18 @@ RSpec.describe Projects::CycleAnalyticsController do let(:request_params) { { namespace_id: project.namespace, project_id: project } } let(:target_id) { 'p_analytics_valuestream' } end + + it_behaves_like 'Snowplow event tracking' do + subject { get :show, params: request_params, format: :html } + + let(:request_params) { { namespace_id: project.namespace, project_id: project } } + let(:feature_flag_name) { :route_hll_to_snowplow_phase2 } + let(:category) { described_class.name } + let(:action) { 'perform_analytics_usage_action' } + let(:namespace) { project.namespace } + let(:label) { 'redis_hll_counters.analytics.analytics_total_unique_counts_monthly' } + let(:property) { 'p_analytics_valuestream' } + end end include_examples GracefulTimeoutHandling diff --git a/spec/controllers/projects/graphs_controller_spec.rb b/spec/controllers/projects/graphs_controller_spec.rb index be89fa0d361..9227c7dd70a 100644 --- a/spec/controllers/projects/graphs_controller_spec.rb +++ b/spec/controllers/projects/graphs_controller_spec.rb @@ -89,6 +89,21 @@ RSpec.describe Projects::GraphsController do let(:request_params) { { namespace_id: project.namespace.path, project_id: project.path, id: 'master' } } let(:target_id) { 'p_analytics_repo' } end + + it_behaves_like 'Snowplow event tracking' do + subject do + sign_in(user) + get :charts, params: request_params, format: :html + end + + let(:request_params) { { namespace_id: project.namespace.path, project_id: project.path, id: 'master' } } + let(:feature_flag_name) { :route_hll_to_snowplow_phase2 } + let(:category) { described_class.name } + let(:action) { 'perform_analytics_usage_action' } + let(:namespace) { project.namespace } + let(:label) { 'redis_hll_counters.analytics.analytics_total_unique_counts_monthly' } + let(:property) { 'p_analytics_repo' } + end end context 'when languages were previously detected' do diff --git a/spec/controllers/projects/pipelines_controller_spec.rb b/spec/controllers/projects/pipelines_controller_spec.rb index 06930d8727b..48aaff67c95 100644 --- a/spec/controllers/projects/pipelines_controller_spec.rb +++ b/spec/controllers/projects/pipelines_controller_spec.rb @@ -841,6 +841,18 @@ RSpec.describe Projects::PipelinesController do let(:request_params) { { namespace_id: project.namespace, project_id: project, id: pipeline.id, chart: tab[:chart_param] } } let(:target_id) { ['p_analytics_pipelines', tab[:event]] } end + + it_behaves_like 'Snowplow event tracking' do + subject { get :charts, params: request_params, format: :html } + + let(:request_params) { { namespace_id: project.namespace, project_id: project, id: pipeline.id, chart: tab[:chart_param] } } + let(:feature_flag_name) { :route_hll_to_snowplow_phase2 } + let(:category) { described_class.name } + let(:action) { 'perform_analytics_usage_action' } + let(:namespace) { project.namespace } + let(:label) { 'redis_hll_counters.analytics.analytics_total_unique_counts_monthly' } + let(:property) { 'p_analytics_pipelines' } + end end end |