Commit acf20ca5 authored by Jan Provaznik's avatar Jan Provaznik

Merge branch '242016-fj-add-instance-gitpod-enabled-to-usage-data' into 'master'

Add Gitpod enabled instance setting to Usage Data

See merge request gitlab-org/gitlab!42563
parents 072a2879 0694a110
---
title: Add Gitpod enabled instance setting to Usage Data
merge_request: 42563
author:
type: changed
......@@ -242,7 +242,8 @@ module Gitlab
signup_enabled: alt_usage_data(fallback: nil) { Gitlab::CurrentSettings.allow_signup? },
web_ide_clientside_preview_enabled: alt_usage_data(fallback: nil) { Gitlab::CurrentSettings.web_ide_clientside_preview_enabled? },
ingress_modsecurity_enabled: Feature.enabled?(:ingress_modsecurity),
grafana_link_enabled: alt_usage_data(fallback: nil) { Gitlab::CurrentSettings.grafana_enabled? }
grafana_link_enabled: alt_usage_data(fallback: nil) { Gitlab::CurrentSettings.grafana_enabled? },
gitpod_enabled: alt_usage_data(fallback: nil) { Gitlab::CurrentSettings.gitpod_enabled? }
}
end
......
......@@ -628,6 +628,7 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures do
expect(subject[:gitlab_shared_runners_enabled]).to eq(Gitlab.config.gitlab_ci.shared_runners_enabled)
expect(subject[:web_ide_clientside_preview_enabled]).to eq(Gitlab::CurrentSettings.web_ide_clientside_preview_enabled?)
expect(subject[:grafana_link_enabled]).to eq(Gitlab::CurrentSettings.grafana_enabled?)
expect(subject[:gitpod_enabled]).to eq(Gitlab::CurrentSettings.gitpod_enabled?)
end
context 'with embedded Prometheus' do
......@@ -657,6 +658,20 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures do
expect(subject[:grafana_link_enabled]).to eq(false)
end
end
context 'with Gitpod' do
it 'returns true when is enabled' do
stub_application_setting(gitpod_enabled: true)
expect(subject[:gitpod_enabled]).to eq(true)
end
it 'returns false when is disabled' do
stub_application_setting(gitpod_enabled: false)
expect(subject[:gitpod_enabled]).to eq(false)
end
end
end
describe '.components_usage_data' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment