Add installation type to usage ping data
This commit is contained in:
parent
75ee50f85f
commit
9f76632d80
|
@ -0,0 +1 @@
|
|||
source
|
|
@ -33,6 +33,7 @@ module Gitlab
|
|||
APP_DIRS_PATTERN = %r{^/?(app|config|ee|lib|spec|\(\w*\))}
|
||||
SUBDOMAIN_REGEX = %r{\Ahttps://[a-z0-9]+\.gitlab\.com\z}
|
||||
VERSION = File.read(root.join("VERSION")).strip.freeze
|
||||
INSTALLATION_TYPE = File.read(root.join("INSTALLATION_TYPE")).strip.freeze
|
||||
|
||||
def self.com?
|
||||
# Check `gl_subdomain?` as well to keep parity with gitlab.com
|
||||
|
|
|
@ -21,6 +21,7 @@ module Gitlab
|
|||
uuid: Gitlab::CurrentSettings.uuid,
|
||||
hostname: Gitlab.config.gitlab.host,
|
||||
version: Gitlab::VERSION,
|
||||
installation_type: Gitlab::INSTALLATION_TYPE,
|
||||
active_user_count: User.active.count,
|
||||
recorded_at: Time.now,
|
||||
mattermost_enabled: Gitlab.config.mattermost.enabled,
|
||||
|
|
|
@ -32,6 +32,7 @@ describe Gitlab::UsageData do
|
|||
mattermost_enabled
|
||||
edition
|
||||
version
|
||||
installation_type
|
||||
uuid
|
||||
hostname
|
||||
signup
|
||||
|
@ -156,6 +157,7 @@ describe Gitlab::UsageData do
|
|||
it "gathers license data" do
|
||||
expect(subject[:uuid]).to eq(Gitlab::CurrentSettings.uuid)
|
||||
expect(subject[:version]).to eq(Gitlab::VERSION)
|
||||
expect(subject[:installation_type]).to eq(Gitlab::INSTALLATION_TYPE)
|
||||
expect(subject[:active_user_count]).to eq(User.active.count)
|
||||
expect(subject[:recorded_at]).to be_a(Time)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue