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
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
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`.
There should be no knowledge other than with Praefect about the existence of
the `Praefect-Git-X` nodes.
......
# frozen_string_literal: true
require 'spec_helper'
describe BranchFilterValidator do
......@@ -6,25 +8,25 @@ describe BranchFilterValidator do
describe '#validates_each' 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, "another/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")
expect(hook.errors.empty?).to be true
end
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
end
it 'allows wildcards' do
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, "*-stable")
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, +"*-stable")
expect(hook.errors.empty?).to be true
end
it 'gets rid of whitespace' do
filter = ' master '
filter = +' master '
validator.validate_each(hook, :push_events_branch_filter, filter)
expect(filter).to eq 'master'
......
# frozen_string_literal: true
require 'spec_helper'
describe JsRegexValidator do
......
# frozen_string_literal: true
require 'spec_helper'
describe NamespacePathValidator do
......@@ -5,7 +7,7 @@ describe NamespacePathValidator do
describe '.valid_path?' 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
......
# frozen_string_literal: true
require 'spec_helper'
describe ProjectPathValidator do
......@@ -5,7 +7,7 @@ describe ProjectPathValidator do
describe '.valid_path?' 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
......
# frozen_string_literal: true
require 'spec_helper'
describe PublicUrlValidator do
......
# frozen_string_literal: true
require 'spec_helper'
describe VariableDuplicatesValidator do
......
# frozen_string_literal: true
require 'spec_helper'
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