Commit 72ad8ea7 authored by Marius Bobin's avatar Marius Bobin

Add more tests for CI minutes cost factor

parent 31462b14
...@@ -91,18 +91,23 @@ RSpec.describe Gitlab::Ci::Minutes::CostFactor do ...@@ -91,18 +91,23 @@ RSpec.describe Gitlab::Ci::Minutes::CostFactor do
:instance | Gitlab::VisibilityLevel::PUBLIC | 0 | 5 | nil | nil | 0 :instance | Gitlab::VisibilityLevel::PUBLIC | 0 | 5 | nil | nil | 0
:instance | Gitlab::VisibilityLevel::PUBLIC | 0 | 5 | 0 | 400 | 0 :instance | Gitlab::VisibilityLevel::PUBLIC | 0 | 5 | 0 | 400 | 0
:instance | Gitlab::VisibilityLevel::PUBLIC | 0 | 5 | 400 | 0 | 0 :instance | Gitlab::VisibilityLevel::PUBLIC | 0 | 5 | 400 | 0 | 0
:instance | Gitlab::VisibilityLevel::PUBLIC | 2 | 5 | 400 | 0 | 2
:instance | Gitlab::VisibilityLevel::PUBLIC | 2 | 5 | nil | 400 | 2
:instance | Gitlab::VisibilityLevel::PUBLIC | 2 | 5 | nil | 0 | 0
:instance | Gitlab::VisibilityLevel::INTERNAL | 0 | 5 | nil | 400 | 5 :instance | Gitlab::VisibilityLevel::INTERNAL | 0 | 5 | nil | 400 | 5
:instance | Gitlab::VisibilityLevel::INTERNAL | 0 | 5 | nil | nil | 0 :instance | Gitlab::VisibilityLevel::INTERNAL | 0 | 5 | nil | nil | 0
:instance | Gitlab::VisibilityLevel::INTERNAL | 0 | 5 | nil | 0 | 0 :instance | Gitlab::VisibilityLevel::INTERNAL | 0 | 5 | nil | 0 | 0
:instance | Gitlab::VisibilityLevel::INTERNAL | 0 | 5 | 0 | 400 | 0 :instance | Gitlab::VisibilityLevel::INTERNAL | 0 | 5 | 0 | 400 | 0
:instance | Gitlab::VisibilityLevel::INTERNAL | 0 | 5 | 400 | 0 | 5 :instance | Gitlab::VisibilityLevel::INTERNAL | 0 | 5 | 400 | 0 | 5
:instance | Gitlab::VisibilityLevel::INTERNAL | 0 | 0 | 400 | 0 | 0
:instance | Gitlab::VisibilityLevel::PRIVATE | 0 | 5 | nil | 400 | 5 :instance | Gitlab::VisibilityLevel::PRIVATE | 0 | 5 | nil | 400 | 5
:instance | Gitlab::VisibilityLevel::PRIVATE | 0 | 5 | nil | nil | 0 :instance | Gitlab::VisibilityLevel::PRIVATE | 0 | 5 | nil | nil | 0
:instance | Gitlab::VisibilityLevel::PRIVATE | 0 | 5 | nil | 0 | 0 :instance | Gitlab::VisibilityLevel::PRIVATE | 0 | 5 | nil | 0 | 0
:instance | Gitlab::VisibilityLevel::PRIVATE | 0 | 5 | 0 | 400 | 0 :instance | Gitlab::VisibilityLevel::PRIVATE | 0 | 5 | 0 | 400 | 0
:instance | Gitlab::VisibilityLevel::PRIVATE | 0 | 5 | 400 | 0 | 5 :instance | Gitlab::VisibilityLevel::PRIVATE | 0 | 5 | 400 | 0 | 5
:instance | Gitlab::VisibilityLevel::PRIVATE | 0 | 0 | 400 | 0 | 0
end end
with_them do with_them do
...@@ -143,18 +148,23 @@ RSpec.describe Gitlab::Ci::Minutes::CostFactor do ...@@ -143,18 +148,23 @@ RSpec.describe Gitlab::Ci::Minutes::CostFactor do
:instance | Gitlab::VisibilityLevel::PUBLIC | 0 | 5 | nil | 0 | 0 :instance | Gitlab::VisibilityLevel::PUBLIC | 0 | 5 | nil | 0 | 0
:instance | Gitlab::VisibilityLevel::PUBLIC | 0 | 5 | 0 | 400 | 0 :instance | Gitlab::VisibilityLevel::PUBLIC | 0 | 5 | 0 | 400 | 0
:instance | Gitlab::VisibilityLevel::PUBLIC | 0 | 5 | 400 | 0 | 0.008 :instance | Gitlab::VisibilityLevel::PUBLIC | 0 | 5 | 400 | 0 | 0.008
:instance | Gitlab::VisibilityLevel::PUBLIC | 2 | 5 | 400 | 0 | 2
:instance | Gitlab::VisibilityLevel::PUBLIC | 2 | 5 | nil | 400 | 2
:instance | Gitlab::VisibilityLevel::PUBLIC | 2 | 5 | nil | 0 | 0
:instance | Gitlab::VisibilityLevel::INTERNAL | 0 | 5 | nil | 400 | 5 :instance | Gitlab::VisibilityLevel::INTERNAL | 0 | 5 | nil | 400 | 5
:instance | Gitlab::VisibilityLevel::INTERNAL | 0 | 5 | nil | nil | 0 :instance | Gitlab::VisibilityLevel::INTERNAL | 0 | 5 | nil | nil | 0
:instance | Gitlab::VisibilityLevel::INTERNAL | 0 | 5 | nil | 0 | 0 :instance | Gitlab::VisibilityLevel::INTERNAL | 0 | 5 | nil | 0 | 0
:instance | Gitlab::VisibilityLevel::INTERNAL | 0 | 5 | 0 | 400 | 0 :instance | Gitlab::VisibilityLevel::INTERNAL | 0 | 5 | 0 | 400 | 0
:instance | Gitlab::VisibilityLevel::INTERNAL | 0 | 5 | 400 | 0 | 5 :instance | Gitlab::VisibilityLevel::INTERNAL | 0 | 5 | 400 | 0 | 5
:instance | Gitlab::VisibilityLevel::INTERNAL | 0 | 0 | 400 | 0 | 0
:instance | Gitlab::VisibilityLevel::PRIVATE | 0 | 5 | nil | 400 | 5 :instance | Gitlab::VisibilityLevel::PRIVATE | 0 | 5 | nil | 400 | 5
:instance | Gitlab::VisibilityLevel::PRIVATE | 0 | 5 | nil | nil | 0 :instance | Gitlab::VisibilityLevel::PRIVATE | 0 | 5 | nil | nil | 0
:instance | Gitlab::VisibilityLevel::PRIVATE | 0 | 5 | nil | 0 | 0 :instance | Gitlab::VisibilityLevel::PRIVATE | 0 | 5 | nil | 0 | 0
:instance | Gitlab::VisibilityLevel::PRIVATE | 0 | 5 | 0 | 400 | 0 :instance | Gitlab::VisibilityLevel::PRIVATE | 0 | 5 | 0 | 400 | 0
:instance | Gitlab::VisibilityLevel::PRIVATE | 0 | 5 | 400 | 0 | 5 :instance | Gitlab::VisibilityLevel::PRIVATE | 0 | 5 | 400 | 0 | 5
:instance | Gitlab::VisibilityLevel::PRIVATE | 0 | 0 | 400 | 0 | 0
end end
with_them do with_them do
......
...@@ -50,9 +50,9 @@ RSpec.describe EE::Ci::Runner do ...@@ -50,9 +50,9 @@ RSpec.describe EE::Ci::Runner do
it { is_expected.to eq(1.1) } it { is_expected.to eq(1.1) }
context 'with unlimited minutes' do context 'with unlimited minutes' do
let(:shared_runners_minutes) { 400 } let(:shared_runners_minutes) { 0 }
it { is_expected.to eq(1.1) } it { is_expected.to eq(0) }
end end
end 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