git cl + git-numberer: add extra regression test case.
R=machenbach@chromium.org
BUG=chromium:642493,672043
Change-Id: Ie50637d6e01e40ddd15dcdfc1430c9554fa82976
Reviewed-on: https://chromium-review.googlesource.com/418715
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
diff --git a/tests/git_cl_test.py b/tests/git_cl_test.py
index bd0f8d5..d68129d 100755
--- a/tests/git_cl_test.py
+++ b/tests/git_cl_test.py
@@ -1242,7 +1242,7 @@
'plugin.git-numberer.validate-disabled-refglob'],),
'refs/heads/disabled\n'
'refs/branch-heads/*\n'),
- ] * 3 # 3 tests below have exactly same IO.
+ ] * 4 # 4 tests below have exactly same IO.
res = git_cl._GitNumbererState.load(
remote_url='https://chromium.googlesource.com/chromium/src',
@@ -1262,6 +1262,14 @@
self.assertEqual(res.pending_prefix, None)
self.assertEqual(res.should_git_number, False)
+ # Validator is disabled by default, even if it's not explicitely in disabled
+ # refglobs.
+ res = git_cl._GitNumbererState.load(
+ remote_url='https://chromium.googlesource.com/chromium/src',
+ remote_ref='refs/arbitrary/ref')
+ self.assertEqual(res.pending_prefix, None)
+ self.assertEqual(res.should_git_number, False)
+
@classmethod
def _gerrit_ensure_auth_calls(cls, issue=None, skip_auth_check=False):
cmd = ['git', 'config', '--bool', 'gerrit.skip-ensure-authenticated']