Commit 6ab9a9df authored by Fabio Pitino's avatar Fabio Pitino

Fix integration specs for tracing

parent 83aa0fb5
......@@ -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([@-_])(.*?)([@-~])/)
......
......@@ -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
......
......@@ -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
......
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