summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-01-26 18:27:42 +0800
committerLin Jen-Shin <godfat@godfat.org>2017-01-26 18:27:42 +0800
commitac6e202f46de232afd5c319e02be5f0bf9793177 (patch)
tree18125a1503810ac8d8f3ab0505fb482eaac20ebf
parente9d8fc94e6e13f8b2d145f549d4a939ca25a3d93 (diff)
downloadgitlab-ce-ac6e202f46de232afd5c319e02be5f0bf9793177.tar.gz
Revert "Make sure TraceReader uses Encoding.default_external"
This reverts commit e9d8fc94e6e13f8b2d145f549d4a939ca25a3d93.
-rw-r--r--lib/gitlab/ci/trace_reader.rb1
-rw-r--r--spec/lib/gitlab/ci/trace_reader_spec.rb16
2 files changed, 2 insertions, 15 deletions
diff --git a/lib/gitlab/ci/trace_reader.rb b/lib/gitlab/ci/trace_reader.rb
index 1d7ddeb3e0f..37e51536e8f 100644
--- a/lib/gitlab/ci/trace_reader.rb
+++ b/lib/gitlab/ci/trace_reader.rb
@@ -42,7 +42,6 @@ module Gitlab
end
chunks.join.lines.last(max_lines).join
- .force_encoding(Encoding.default_external)
end
end
end
diff --git a/spec/lib/gitlab/ci/trace_reader_spec.rb b/spec/lib/gitlab/ci/trace_reader_spec.rb
index ff5551bf703..f06d78694d6 100644
--- a/spec/lib/gitlab/ci/trace_reader_spec.rb
+++ b/spec/lib/gitlab/ci/trace_reader_spec.rb
@@ -11,25 +11,13 @@ describe Gitlab::Ci::TraceReader do
last_lines = random_lines
expected = lines.last(last_lines).join
- result = subject.read(last_lines: last_lines)
- expect(result).to eq(expected)
- expect(result.encoding).to eq(Encoding.default_external)
+ expect(subject.read(last_lines: last_lines)).to eq(expected)
end
end
it 'returns everything if trying to get too many lines' do
- result = build_subject.read(last_lines: lines.size * 2)
-
- expect(result).to eq(lines.join)
- expect(result.encoding).to eq(Encoding.default_external)
- end
-
- it 'returns all contents if last_lines is not specified' do
- result = build_subject.read
-
- expect(result).to eq(lines.join)
- expect(result.encoding).to eq(Encoding.default_external)
+ expect(build_subject.read(last_lines: lines.size * 2)).to eq(lines.join)
end
it 'raises an error if not passing an integer for last_lines' do