Commit 993d6456 authored by Aishwarya Subramanian's avatar Aishwarya Subramanian Committed by James Lopez

Tick runner queue after CI minutes is purchased

parent 8686eccb
---
title: Tick instance runner after customer purchases additional CI minutes
merge_request: 14494
author:
type: fixed
......@@ -26,6 +26,7 @@ module EE
if params[:extra_shared_runners_minutes_limit].present?
update_attrs[:last_ci_minutes_notification_at] = nil
update_attrs[:last_ci_minutes_usage_notification_level] = nil
::Ci::Runner.instance_type.each(&:tick_runner_queue)
end
namespace.update(update_attrs)
......
......@@ -170,6 +170,16 @@ describe API::Namespaces do
end
end
end
context "when customer purchases extra CI minutes" do
it "ticks instance runners" do
runners = Ci::Runner.instance_type
put api("/namespaces/#{group1.full_path}", admin), params: { plan: 'silver', extra_shared_runners_minutes_limit: 1000 }
expect(runners).to all(receive(:tick_runner_queue))
end
end
end
describe 'POST :id/gitlab_subscription' 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