Commit 7ea2b872 authored by GitLab Bot's avatar GitLab Bot

Add latest changes from gitlab-org/gitlab@master

parent 336e1756
...@@ -20,7 +20,7 @@ graph TB ...@@ -20,7 +20,7 @@ graph TB
Where `GitLab` is the collection of clients that can request Git operations. Where `GitLab` is the collection of clients that can request Git operations.
`Gitaly` is a Gitaly server before using Praefect. The Praefect node has two `Gitaly` is a Gitaly server before using Praefect. The Praefect node has two
storage nodes attached. Praefect itself doesn't storage data, but connects to storage nodes attached. Praefect itself doesn't store data, but connects to
three Gitaly nodes, `Praefect-Git-1`, `Praefect-Git-2`, and `Praefect-Git-3`. three Gitaly nodes, `Praefect-Git-1`, `Praefect-Git-2`, and `Praefect-Git-3`.
There should be no knowledge other than with Praefect about the existence of There should be no knowledge other than with Praefect about the existence of
the `Praefect-Git-X` nodes. the `Praefect-Git-X` nodes.
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe BranchFilterValidator do describe BranchFilterValidator do
...@@ -6,25 +8,25 @@ describe BranchFilterValidator do ...@@ -6,25 +8,25 @@ describe BranchFilterValidator do
describe '#validates_each' do describe '#validates_each' do
it 'allows valid branch names' do it 'allows valid branch names' do
validator.validate_each(hook, :push_events_branch_filter, "good_branch_name") validator.validate_each(hook, :push_events_branch_filter, +"good_branch_name")
validator.validate_each(hook, :push_events_branch_filter, "another/good_branch_name") validator.validate_each(hook, :push_events_branch_filter, +"another/good_branch_name")
expect(hook.errors.empty?).to be true expect(hook.errors.empty?).to be true
end end
it 'disallows bad branch names' do it 'disallows bad branch names' do
validator.validate_each(hook, :push_events_branch_filter, "bad branch~name") validator.validate_each(hook, :push_events_branch_filter, +"bad branch~name")
expect(hook.errors[:push_events_branch_filter].empty?).to be false expect(hook.errors[:push_events_branch_filter].empty?).to be false
end end
it 'allows wildcards' do it 'allows wildcards' do
validator.validate_each(hook, :push_events_branch_filter, "features/*") validator.validate_each(hook, :push_events_branch_filter, +"features/*")
validator.validate_each(hook, :push_events_branch_filter, "features/*/bla") validator.validate_each(hook, :push_events_branch_filter, +"features/*/bla")
validator.validate_each(hook, :push_events_branch_filter, "*-stable") validator.validate_each(hook, :push_events_branch_filter, +"*-stable")
expect(hook.errors.empty?).to be true expect(hook.errors.empty?).to be true
end end
it 'gets rid of whitespace' do it 'gets rid of whitespace' do
filter = ' master ' filter = +' master '
validator.validate_each(hook, :push_events_branch_filter, filter) validator.validate_each(hook, :push_events_branch_filter, filter)
expect(filter).to eq 'master' expect(filter).to eq 'master'
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe JsRegexValidator do describe JsRegexValidator do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe NamespacePathValidator do describe NamespacePathValidator do
...@@ -5,7 +7,7 @@ describe NamespacePathValidator do ...@@ -5,7 +7,7 @@ describe NamespacePathValidator do
describe '.valid_path?' do describe '.valid_path?' do
it 'handles invalid utf8' do it 'handles invalid utf8' do
expect(described_class.valid_path?("a\0weird\255path")).to be_falsey expect(described_class.valid_path?(+"a\0weird\255path")).to be_falsey
end end
end end
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe ProjectPathValidator do describe ProjectPathValidator do
...@@ -5,7 +7,7 @@ describe ProjectPathValidator do ...@@ -5,7 +7,7 @@ describe ProjectPathValidator do
describe '.valid_path?' do describe '.valid_path?' do
it 'handles invalid utf8' do it 'handles invalid utf8' do
expect(described_class.valid_path?("a\0weird\255path")).to be_falsey expect(described_class.valid_path?(+"a\0weird\255path")).to be_falsey
end end
end end
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe PublicUrlValidator do describe PublicUrlValidator do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe VariableDuplicatesValidator do describe VariableDuplicatesValidator do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe X509CertificateCredentialsValidator do describe X509CertificateCredentialsValidator do
......
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