Commit b0c1104a authored by Nick Thomas's avatar Nick Thomas

Merge branch 'fix-ee-namespace-for-designs-counter' into 'master'

Fix EE namespacing of DesignsCounterService

See merge request gitlab-org/gitlab-ee!14881
parents 62929b36 b6f207ee
......@@ -67,7 +67,7 @@ module DesignManagement
def build_repository_action(file, design)
action = new_file?(design) ? :create : :update
on_success { ::EE::Gitlab::UsageCounters::DesignsCounter.count(action) }
on_success { ::Gitlab::UsageCounters::DesignsCounter.count(action) }
{
action: action,
......
......@@ -10,7 +10,7 @@ module EE
override :usage_data_counters
def usage_data_counters
super + [::EE::Gitlab::UsageCounters::DesignsCounter]
super + [::Gitlab::UsageCounters::DesignsCounter]
end
override :features_usage_data
......
# frozen_string_literal: true
module EE::Gitlab::UsageCounters
module Gitlab::UsageCounters
class DesignsCounter
extend ::Gitlab::UsageDataCounters::RedisCounter
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe EE::Gitlab::UsageCounters::DesignsCounter do
describe Gitlab::UsageCounters::DesignsCounter do
it_behaves_like 'a redis usage counter', 'Designs', :create
it_behaves_like 'a redis usage counter', 'Designs', :update
it_behaves_like 'a redis usage counter', 'Designs', :delete
......
......@@ -58,7 +58,7 @@ describe DesignManagement::SaveDesignsService do
end
it "updates the creation count" do
counter = EE::Gitlab::UsageCounters::DesignsCounter
counter = Gitlab::UsageCounters::DesignsCounter
expect { service.execute }.to change { counter.read(:create) }.by(1)
end
......@@ -131,7 +131,7 @@ describe DesignManagement::SaveDesignsService do
end
it 'increments the update counter' do
counter = EE::Gitlab::UsageCounters::DesignsCounter
counter = Gitlab::UsageCounters::DesignsCounter
expect { service.execute }.to change { counter.read(:update) }.by 1
end
......@@ -158,7 +158,7 @@ describe DesignManagement::SaveDesignsService do
end
it 'counts one creation and one update' do
counter = EE::Gitlab::UsageCounters::DesignsCounter
counter = Gitlab::UsageCounters::DesignsCounter
expect { service.execute }
.to change { counter.read(:create) }.by(1)
.and change { counter.read(:update) }.by(1)
......@@ -187,7 +187,7 @@ describe DesignManagement::SaveDesignsService do
end
it 'increments the creation count by 2' do
counter = EE::Gitlab::UsageCounters::DesignsCounter
counter = Gitlab::UsageCounters::DesignsCounter
expect { service.execute }.to change { counter.read(:create) }.by 2
end
......
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