diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-22 18:06:39 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-22 18:06:39 +0300 |
commit | 68b6846fa6c7b630cc8dab7a8474dcc34e4d67d4 (patch) | |
tree | f592f2a5fed915184154ffd05e4e44298a192207 /spec/lib/gitlab/regex_spec.rb | |
parent | 4db9eeb44af5644eb1d080b4ccf4aff8b90656b9 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/regex_spec.rb')
-rw-r--r-- | spec/lib/gitlab/regex_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/lib/gitlab/regex_spec.rb b/spec/lib/gitlab/regex_spec.rb index 1397add9f5a..c580b46cf8d 100644 --- a/spec/lib/gitlab/regex_spec.rb +++ b/spec/lib/gitlab/regex_spec.rb @@ -61,6 +61,12 @@ describe Gitlab::Regex do it { is_expected.to match('my/image') } it { is_expected.to match('my/awesome/image-1') } it { is_expected.to match('my/awesome/image.test') } + it { is_expected.to match('my/awesome/image--test') } + # docker distribution allows for infinite `-` + # https://github.com/docker/distribution/blob/master/reference/regexp.go#L13 + # but we have a range of 0,10 to add a reasonable limit. + it { is_expected.not_to match('my/image-----------test') } + it { is_expected.not_to match('my/image-.test') } it { is_expected.not_to match('.my/image') } it { is_expected.not_to match('my/image.') } end |