mirror of
https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git
synced 2025-07-14 03:49:48 +03:00
test: specify default git branch
don't assume that master is the default branch name. Signed-off-by: Caleb Connolly <kc@postmarketos.org> Reviewed-by: Oliver Smith <ollieparanoid@postmarketos.org> Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20230629-suffix-type-hint-v1-3-e92802ae20a8@postmarketos.org%3E
This commit is contained in:
parent
d32be64820
commit
78b78410a4
2 changed files with 7 additions and 7 deletions
|
@ -44,7 +44,7 @@ def test_can_fast_forward(args, tmpdir):
|
|||
pmb.helpers.run.user(args, ["git"] + git_args, tmpdir, "stdout")
|
||||
|
||||
# Create test git repo
|
||||
run_git(["init", "."])
|
||||
run_git(["init", "-b", "master", "."])
|
||||
run_git(["commit", "--allow-empty", "-m", "commit on master"])
|
||||
run_git(["checkout", "-b", branch_origin])
|
||||
run_git(["commit", "--allow-empty", "-m", "commit on branch_origin"])
|
||||
|
@ -71,7 +71,7 @@ def test_clean_worktree(args, tmpdir):
|
|||
pmb.helpers.run.user(args, ["git"] + git_args, tmpdir, "stdout")
|
||||
|
||||
# Create test git repo
|
||||
run_git(["init", "."])
|
||||
run_git(["init", "-b", "master", "."])
|
||||
run_git(["commit", "--allow-empty", "-m", "commit on master"])
|
||||
|
||||
assert func(args, tmpdir) is True
|
||||
|
@ -98,7 +98,7 @@ def test_get_upstream_remote(args, monkeypatch, tmpdir):
|
|||
pmb.helpers.run.user(args, ["git"] + git_args, tmpdir, "stdout")
|
||||
|
||||
# Create git repo
|
||||
run_git(["init", "."])
|
||||
run_git(["init", "-b", "master", "."])
|
||||
run_git(["commit", "--allow-empty", "-m", "commit on master"])
|
||||
|
||||
# No upstream remote
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue