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
a5399768
Commit
a5399768
authored
Mar 09, 2019
by
Matija Čupić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract EE specs insto ee/ directory
parent
b2c69c59
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
29 deletions
+38
-29
ee/spec/workers/expire_pipeline_cache_worker_spec.rb
ee/spec/workers/expire_pipeline_cache_worker_spec.rb
+38
-0
spec/workers/expire_pipeline_cache_worker_spec.rb
spec/workers/expire_pipeline_cache_worker_spec.rb
+0
-29
No files found.
ee/spec/workers/expire_pipeline_cache_worker_spec.rb
0 → 100644
View file @
a5399768
# frozen_string_literal: true
require
'spec_helper'
describe
ExpirePipelineCacheWorker
do
let
(
:pipeline
)
{
create
(
:ci_empty_pipeline
)
}
subject
{
described_class
.
new
}
describe
'#perform'
do
context
'when pipeline is triggered by other pipeline'
do
let
(
:source
)
{
create
(
:ci_sources_pipeline
,
pipeline:
pipeline
)
}
it
'updates the cache of dependent pipeline'
do
dependent_pipeline_path
=
"/
#{
source
.
source_project
.
full_path
}
/pipelines/
#{
source
.
source_pipeline
.
id
}
.json"
allow_any_instance_of
(
Gitlab
::
EtagCaching
::
Store
).
to
receive
(
:touch
)
expect_any_instance_of
(
Gitlab
::
EtagCaching
::
Store
).
to
receive
(
:touch
).
with
(
dependent_pipeline_path
)
subject
.
perform
(
pipeline
.
id
)
end
end
context
'when pipeline triggered other pipeline'
do
let
(
:build
)
{
create
(
:ci_build
,
pipeline:
pipeline
)
}
let
(
:source
)
{
create
(
:ci_sources_pipeline
,
source_job:
build
)
}
it
'updates the cache of dependent pipeline'
do
dependent_pipeline_path
=
"/
#{
source
.
project
.
full_path
}
/pipelines/
#{
source
.
pipeline
.
id
}
.json"
allow_any_instance_of
(
Gitlab
::
EtagCaching
::
Store
).
to
receive
(
:touch
)
expect_any_instance_of
(
Gitlab
::
EtagCaching
::
Store
).
to
receive
(
:touch
).
with
(
dependent_pipeline_path
)
subject
.
perform
(
pipeline
.
id
)
end
end
end
end
spec/workers/expire_pipeline_cache_worker_spec.rb
View file @
a5399768
...
...
@@ -42,34 +42,5 @@ describe ExpirePipelineCacheWorker do
subject
.
perform
(
pipeline
.
id
)
end
context
'when pipeline is triggered by other pipeline'
do
let
(
:pipeline
)
{
create
(
:ci_empty_pipeline
)
}
let
(
:source
)
{
create
(
:ci_sources_pipeline
,
pipeline:
pipeline
)
}
it
'updates the cache of dependent pipeline'
do
dependent_pipeline_path
=
"/
#{
source
.
source_project
.
full_path
}
/pipelines/
#{
source
.
source_pipeline
.
id
}
.json"
allow_any_instance_of
(
Gitlab
::
EtagCaching
::
Store
).
to
receive
(
:touch
)
expect_any_instance_of
(
Gitlab
::
EtagCaching
::
Store
).
to
receive
(
:touch
).
with
(
dependent_pipeline_path
)
subject
.
perform
(
pipeline
.
id
)
end
end
context
'when pipeline triggered other pipeline'
do
let
(
:pipeline
)
{
create
(
:ci_empty_pipeline
)
}
let
(
:build
)
{
create
(
:ci_build
,
pipeline:
pipeline
)
}
let
(
:source
)
{
create
(
:ci_sources_pipeline
,
source_job:
build
)
}
it
'updates the cache of dependent pipeline'
do
dependent_pipeline_path
=
"/
#{
source
.
project
.
full_path
}
/pipelines/
#{
source
.
pipeline
.
id
}
.json"
allow_any_instance_of
(
Gitlab
::
EtagCaching
::
Store
).
to
receive
(
:touch
)
expect_any_instance_of
(
Gitlab
::
EtagCaching
::
Store
).
to
receive
(
:touch
).
with
(
dependent_pipeline_path
)
subject
.
perform
(
pipeline
.
id
)
end
end
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