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
6ab9a9df
Commit
6ab9a9df
authored
Jun 14, 2019
by
Fabio Pitino
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix integration specs for tracing
parent
83aa0fb5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
3 deletions
+5
-3
lib/gitlab/ci/ansi2html.rb
lib/gitlab/ci/ansi2html.rb
+2
-0
spec/controllers/projects/jobs_controller_spec.rb
spec/controllers/projects/jobs_controller_spec.rb
+1
-1
spec/support/shared_examples/ci_trace_shared_examples.rb
spec/support/shared_examples/ci_trace_shared_examples.rb
+2
-2
No files found.
lib/gitlab/ci/ansi2html.rb
View file @
6ab9a9df
...
...
@@ -155,7 +155,9 @@ module Gitlab
stream
.
each_line
do
|
line
|
s
=
StringScanner
.
new
(
line
)
until
s
.
eos?
if
s
.
scan
(
Gitlab
::
Regex
.
build_trace_section_regex
)
handle_section
(
s
)
elsif
s
.
scan
(
/\e([@-_])(.*?)([@-~])/
)
...
...
spec/controllers/projects/jobs_controller_spec.rb
View file @
6ab9a9df
...
...
@@ -540,7 +540,7 @@ describe Projects::JobsController, :clean_gitlab_redis_shared_state do
expect
(
response
).
to
have_gitlab_http_status
(
:ok
)
expect
(
json_response
[
'id'
]).
to
eq
job
.
id
expect
(
json_response
[
'status'
]).
to
eq
job
.
status
expect
(
json_response
[
'html'
]).
to
eq
(
'
BUILD TRACE
'
)
expect
(
json_response
[
'html'
]).
to
eq
(
'
<span class="">BUILD TRACE</span>
'
)
end
end
...
...
spec/support/shared_examples/ci_trace_shared_examples.rb
View file @
6ab9a9df
...
...
@@ -5,11 +5,11 @@ shared_examples_for 'common trace features' do
end
it
"returns formatted html"
do
expect
(
trace
.
html
).
to
eq
(
"
12<br>34
"
)
expect
(
trace
.
html
).
to
eq
(
"
<span class=
\"\"
>12<br/><span class=
\"\"
>34</span></span>
"
)
end
it
"returns last line of formatted html"
do
expect
(
trace
.
html
(
last_lines:
1
)).
to
eq
(
"
34
"
)
expect
(
trace
.
html
(
last_lines:
1
)).
to
eq
(
"
<span class=
\"\"
>34</span>
"
)
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