From 31672d0c32906d61ae4c919eef81d4993f4a53e6 Mon Sep 17 00:00:00 2001 From: Tim Harder Date: Wed, 31 Mar 2021 12:39:01 -0600 Subject: tests: update git repo default branch name --- tests/scripts/test_pkgdev_push.py | 8 ++++---- tests/test_git.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/scripts/test_pkgdev_push.py b/tests/scripts/test_pkgdev_push.py index 9a6c10c..cc13fb1 100644 --- a/tests/scripts/test_pkgdev_push.py +++ b/tests/scripts/test_pkgdev_push.py @@ -38,8 +38,8 @@ class TestPkgdevPushParseArgs: """Unknown arguments for ``pkgdev push`` are passed to ``git push``.""" git_repo = make_git_repo(repo.location) with chdir(git_repo.path): - options, _ = tool.parse_args(['push', 'origin', 'master']) - assert options.push_args == ['origin', 'master'] + options, _ = tool.parse_args(['push', 'origin', 'main']) + assert options.push_args == ['origin', 'main'] options, _ = tool.parse_args(['push', '-n', '--signed']) assert '--dry-run' in options.push_args assert '--signed' in options.push_args @@ -82,8 +82,8 @@ class TestPkgdevPush: self.child_git_repo.add_all('cat/pkg-0') # set up parent repo as origin and push to it self.child_git_repo.run(['git', 'remote', 'add', 'origin', self.parent_git_repo.path]) - self.child_git_repo.run(['git', 'push', '-u', 'origin', 'master']) - self.child_git_repo.run(['git', 'remote', 'set-head', 'origin', 'master']) + self.child_git_repo.run(['git', 'push', '-u', 'origin', 'main']) + self.child_git_repo.run(['git', 'remote', 'set-head', 'origin', 'main']) def test_push(self, capsys): self.child_repo.create_ebuild('cat/pkg-1') diff --git a/tests/test_git.py b/tests/test_git.py index 4874d0b..d19189a 100644 --- a/tests/test_git.py +++ b/tests/test_git.py @@ -24,4 +24,4 @@ class TestGitRun: def test_successful_run(self, git_repo): with chdir(git_repo.path): p = git.run('rev-parse', '--abbrev-ref', 'HEAD', stdout=subprocess.PIPE) - assert p.stdout.strip() == 'master' + assert p.stdout.strip() == 'main' -- cgit v1.2.3-65-gdbad