From 62fcb9ffa9e40db6f34e7dd0d36804d73ef01435 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Sun, 22 Dec 2019 06:07:52 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- scripts/insert-rspec-profiling-data | 2 ++ spec/lib/banzai/pipeline/wiki_pipeline_spec.rb | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/insert-rspec-profiling-data b/scripts/insert-rspec-profiling-data index 88c9d8c12b1..3af5fe763a2 100755 --- a/scripts/insert-rspec-profiling-data +++ b/scripts/insert-rspec-profiling-data @@ -35,6 +35,8 @@ def insert_data(path) files.each do |filename| puts "#{Time.now} Inserting #{filename}..." + # Strip file of NULL bytes to ensure data gets inserted + system("sed", "-i", "-e", "s/\\x00//g", filename) result = RspecProfiling::Collectors::PSQL::Result.copy_from(filename) puts "#{Time.now} Inserted #{result.cmd_tuples} lines in #{filename}, DB response: #{result.cmd_status}" end diff --git a/spec/lib/banzai/pipeline/wiki_pipeline_spec.rb b/spec/lib/banzai/pipeline/wiki_pipeline_spec.rb index e1814ea403e..8c009bc409b 100644 --- a/spec/lib/banzai/pipeline/wiki_pipeline_spec.rb +++ b/spec/lib/banzai/pipeline/wiki_pipeline_spec.rb @@ -230,7 +230,7 @@ describe Banzai::Pipeline::WikiPipeline do ] invalid_slugs.each do |slug| - context "with the invalid slug #{slug}" do + context "with the invalid slug #{slug.delete("\000")}" do invalid_js_links.each do |link| it "doesn't include a prohibited slug in a (.) relative link '#{link}'" do output = described_class.to_html(