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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
0ac13220
Commit
0ac13220
authored
Mar 06, 2018
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests by latest proposal changes
parent
335bc0fe
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
7 additions
and
37 deletions
+7
-37
spec/migrations/migrate_create_trace_artifact_sidekiq_queue_spec.rb
...tions/migrate_create_trace_artifact_sidekiq_queue_spec.rb
+0
-0
spec/requests/api/runner_spec.rb
spec/requests/api/runner_spec.rb
+2
-2
spec/tasks/gitlab/traces_rake_spec.rb
spec/tasks/gitlab/traces_rake_spec.rb
+2
-2
spec/workers/archive_legacy_trace_worker_spec.rb
spec/workers/archive_legacy_trace_worker_spec.rb
+0
-30
spec/workers/archive_trace_worker_spec.rb
spec/workers/archive_trace_worker_spec.rb
+1
-1
spec/workers/build_finished_worker_spec.rb
spec/workers/build_finished_worker_spec.rb
+1
-1
spec/workers/concerns/pipeline_background_queue_spec.rb
spec/workers/concerns/pipeline_background_queue_spec.rb
+1
-1
No files found.
spec/migrations/migrate_create_trace_artifact_sidekiq_queue.rb
→
spec/migrations/migrate_create_trace_artifact_sidekiq_queue
_spec
.rb
View file @
0ac13220
File moved
spec/requests/api/runner_spec.rb
View file @
0ac13220
...
...
@@ -698,10 +698,10 @@ describe API::Runner do
end
end
context
'when tace is given'
do
context
'when t
r
ace is given'
do
it
'creates a trace artifact'
do
allow
(
BuildFinishedWorker
).
to
receive
(
:perform_async
).
with
(
job
.
id
)
do
CreateTraceArtifact
Worker
.
new
.
perform
(
job
.
id
)
ArchiveTrace
Worker
.
new
.
perform
(
job
.
id
)
end
update_job
(
state:
'success'
,
trace:
'BUILD TRACE UPDATED'
)
...
...
spec/tasks/gitlab/traces_rake_spec.rb
View file @
0ac13220
...
...
@@ -7,7 +7,7 @@ describe 'gitlab:traces rake tasks' do
shared_examples
'passes the job id to worker'
do
it
do
expect
(
Archive
Legacy
TraceWorker
).
to
receive
(
:bulk_perform_async
).
with
([[
job
.
id
]])
expect
(
ArchiveTraceWorker
).
to
receive
(
:bulk_perform_async
).
with
([[
job
.
id
]])
run_rake_task
(
'gitlab:traces:archive'
)
end
...
...
@@ -15,7 +15,7 @@ describe 'gitlab:traces rake tasks' do
shared_examples
'does not pass the job id to worker'
do
it
do
expect
(
Archive
Legacy
TraceWorker
).
not_to
receive
(
:bulk_perform_async
)
expect
(
ArchiveTraceWorker
).
not_to
receive
(
:bulk_perform_async
)
run_rake_task
(
'gitlab:traces:archive'
)
end
...
...
spec/workers/archive_legacy_trace_worker_spec.rb
deleted
100644 → 0
View file @
335bc0fe
require
'spec_helper'
describe
ArchiveLegacyTraceWorker
do
it
{
is_expected
.
to
be_a
(
ObjectStorageQueue
)
}
it
{
is_expected
.
not_to
be_a
(
PipelineQueue
)
}
describe
'#perform'
do
subject
{
described_class
.
new
.
perform
(
job
&
.
id
)
}
context
'when job is found'
do
let
(
:job
)
{
create
(
:ci_build
)
}
it
'executes service'
do
expect_any_instance_of
(
Gitlab
::
Ci
::
Trace
).
to
receive
(
:archive!
)
subject
end
end
context
'when job is not found'
do
let
(
:job
)
{
nil
}
it
'does not execute service'
do
expect_any_instance_of
(
Gitlab
::
Ci
::
Trace
).
not_to
receive
(
:archive!
)
subject
end
end
end
end
spec/workers/
create_trace_artifact
_worker_spec.rb
→
spec/workers/
archive_trace
_worker_spec.rb
View file @
0ac13220
require
'spec_helper'
describe
CreateTraceArtifact
Worker
do
describe
ArchiveTrace
Worker
do
describe
'#perform'
do
subject
{
described_class
.
new
.
perform
(
job
&
.
id
)
}
...
...
spec/workers/build_finished_worker_spec.rb
View file @
0ac13220
...
...
@@ -14,7 +14,7 @@ describe BuildFinishedWorker do
expect_any_instance_of
(
BuildTraceSectionsWorker
).
to
receive
(
:perform
)
expect_any_instance_of
(
BuildCoverageWorker
).
to
receive
(
:perform
)
expect
(
BuildHooksWorker
).
to
receive
(
:perform_async
)
expect
(
CreateTraceArtifact
Worker
).
to
receive
(
:perform_async
)
expect
(
ArchiveTrace
Worker
).
to
receive
(
:perform_async
)
described_class
.
new
.
perform
(
build
.
id
)
end
...
...
spec/workers/concerns/pipeline_background_queue_spec.rb
View file @
0ac13220
...
...
@@ -14,6 +14,6 @@ describe PipelineBackgroundQueue do
it
'sets a default object storage queue automatically'
do
expect
(
worker
.
sidekiq_options
[
'queue'
])
.
to
eq
'
object_storage
:dummy'
.
to
eq
'
pipeline_background
:dummy'
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