Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
3886bfc0
Commit
3886bfc0
authored
Jun 21, 2021
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test EE::RegisterJobService with pending builds queue disabled
parent
a1572e65
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
+18
-2
ee/spec/services/ci/register_job_service_spec.rb
ee/spec/services/ci/register_job_service_spec.rb
+18
-2
No files found.
ee/spec/services/ci/register_job_service_spec.rb
View file @
3886bfc0
...
...
@@ -2,14 +2,14 @@
require
'spec_helper'
RSpec
.
describe
Ci
::
RegisterJobService
do
RSpec
.
describe
Ci
::
RegisterJobService
,
'#execute'
do
let_it_be_with_refind
(
:shared_runner
)
{
create
(
:ci_runner
,
:instance
)
}
let!
(
:project
)
{
create
(
:project
,
shared_runners_enabled:
true
)
}
let!
(
:pipeline
)
{
create
(
:ci_empty_pipeline
,
project:
project
)
}
let!
(
:pending_build
)
{
create
(
:ci_build
,
:pending
,
:queued
,
pipeline:
pipeline
)
}
describe
'#execute
'
do
shared_examples
'namespace minutes quota
'
do
context
'shared runners minutes limit'
do
subject
{
described_class
.
new
(
shared_runner
).
execute
.
build
}
...
...
@@ -267,4 +267,20 @@ RSpec.describe Ci::RegisterJobService do
end
end
end
context
'when legacy queuing is being used'
do
before
do
stub_feature_flags
(
ci_pending_builds_queue_source:
false
)
end
include_examples
'namespace minutes quota'
end
context
'when new pending builds table is used'
do
before
do
stub_feature_flags
(
ci_pending_builds_queue_source:
true
)
end
include_examples
'namespace minutes quota'
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment