summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bin/commit_in_branch_test.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/bin/commit_in_branch_test.py b/bin/commit_in_branch_test.py
index 95724f2e56c..d6033ec8e9d 100644
--- a/bin/commit_in_branch_test.py
+++ b/bin/commit_in_branch_test.py
@@ -12,10 +12,10 @@ from .commit_in_branch import (
def get_upstream() -> str:
- # Let's assume master is bound to the upstream remote and not a fork
+ # Let's assume main is bound to the upstream remote and not a fork
out = subprocess.check_output(['git', 'for-each-ref',
'--format=%(upstream)',
- 'refs/heads/master'],
+ 'refs/heads/main'],
stderr=subprocess.DEVNULL)
return out.decode().strip().split('/')[2]
@@ -24,7 +24,7 @@ def get_upstream() -> str:
'commit, expected',
[
('20.1-branchpoint', True),
- ('master', True),
+ ('main', True),
('e58a10af640ba58b6001f5c5ad750b782547da76', True),
('d043d24654c851f0be57dbbf48274b5373dea42b', True),
('dd2bd68fa69124c86cd008b256d06f44fab8e6cd', True),
@@ -46,9 +46,9 @@ def test_canonicalize_commit(commit: str, expected: bool) -> None:
'commit, expected',
[
(get_upstream() + '/20.1', True),
- (get_upstream() + '/master', True),
+ (get_upstream() + '/main', True),
('20.1', False),
- ('master', False),
+ ('main', False),
('e58a10af640ba58b6001f5c5ad750b782547da76', False),
('d043d24654c851f0be57dbbf48274b5373dea42b', False),
('dd2bd68fa69124c86cd008b256d06f44fab8e6cd', False),
@@ -69,7 +69,7 @@ def test_validate_branch(commit: str, expected: bool) -> None:
@pytest.mark.parametrize(
'commit, expected',
[
- ('master', True),
+ ('main', True),
('20.1-branchpoint', True),
('20.1', False),
(get_upstream() + '/20.1', True),
@@ -88,11 +88,11 @@ def test_is_commit_valid(commit: str, expected: bool) -> None:
[
('20.1', '20.1-branchpoint', True),
('20.1', '20.0', False),
- ('20.1', 'master', False),
+ ('20.1', 'main', False),
('20.1', 'e58a10af640ba58b6001f5c5ad750b782547da76', True),
('20.1', 'd043d24654c851f0be57dbbf48274b5373dea42b', True),
('20.1', 'dd2bd68fa69124c86cd008b256d06f44fab8e6cd', False),
- ('master', 'dd2bd68fa69124c86cd008b256d06f44fab8e6cd', True),
+ ('main', 'dd2bd68fa69124c86cd008b256d06f44fab8e6cd', True),
('20.0', 'd043d24654c851f0be57dbbf48274b5373dea42b', False),
])
def test_branch_has_commit(branch: str, commit: str, expected: bool) -> None:
@@ -107,7 +107,7 @@ def test_branch_has_commit(branch: str, commit: str, expected: bool) -> None:
('20.1', '20.1-branchpoint', ''),
('20.1', '20.0', ''),
('20.1', '20.2', ''),
- ('20.1', 'master', ''),
+ ('20.1', 'main', ''),
('20.1', 'd043d24654c851f0be57dbbf48274b5373dea42b', ''),
('20.0', 'dd2bd68fa69124c86cd008b256d06f44fab8e6cd', ''),
])