Skip to content

Commit e561cb7

Browse files
fix test on ci
1 parent df8205b commit e561cb7

File tree

2 files changed

+70
-7
lines changed

2 files changed

+70
-7
lines changed

tests/core/test_selector_native.py

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,16 @@ def test_expand_git_selection_integration(tmp_path: Path, mocker: MockerFixture)
656656

657657
subprocess.run(["git", "add", "."], cwd=repo_path, check=True, capture_output=True)
658658
subprocess.run(
659-
["git", "commit", "-m", "Initial commit"],
659+
[
660+
"git",
661+
"-c",
662+
"user.name=Max",
663+
"-c",
664+
"user.email=max@rb.com",
665+
"commit",
666+
"-m",
667+
"Initial commit",
668+
],
660669
cwd=repo_path,
661670
check=True,
662671
capture_output=True,
@@ -691,7 +700,16 @@ def test_expand_git_selection_integration(tmp_path: Path, mocker: MockerFixture)
691700
)
692701

693702
subprocess.run(
694-
["git", "commit", "-m", "Update model_a"],
703+
[
704+
"git",
705+
"-c",
706+
"user.name=Max",
707+
"-c",
708+
"user.email=max@rb.com",
709+
"commit",
710+
"-m",
711+
"Update model_a",
712+
],
695713
cwd=repo_path,
696714
check=True,
697715
capture_output=True,

tests/utils/test_git_client.py

Lines changed: 50 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,16 @@ def test_git_uncommitted_changes(git_repo: Path):
1919
test_file.write_text("SELECT 1 AS a")
2020
subprocess.run(["git", "add", "model.sql"], cwd=git_repo, check=True, capture_output=True)
2121
subprocess.run(
22-
["git", "commit", "-m", "Initial commit"],
22+
[
23+
"git",
24+
"-c",
25+
"user.name=Max",
26+
"-c",
27+
"user.email=max@rb.com",
28+
"commit",
29+
"-m",
30+
"Initial commit",
31+
],
2332
cwd=git_repo,
2433
check=True,
2534
capture_output=True,
@@ -48,7 +57,16 @@ def test_git_both_staged_and_unstaged_changes(git_repo: Path):
4857
file2.write_text("SELECT 2")
4958
subprocess.run(["git", "add", "."], cwd=git_repo, check=True, capture_output=True)
5059
subprocess.run(
51-
["git", "commit", "-m", "Initial commit"],
60+
[
61+
"git",
62+
"-c",
63+
"user.name=Max",
64+
"-c",
65+
"user.email=max@rb.com",
66+
"commit",
67+
"-m",
68+
"Initial commit",
69+
],
5270
cwd=git_repo,
5371
check=True,
5472
capture_output=True,
@@ -74,7 +92,16 @@ def test_git_untracked_files(git_repo: Path):
7492
initial_file.write_text("SELECT 0")
7593
subprocess.run(["git", "add", "initial.sql"], cwd=git_repo, check=True, capture_output=True)
7694
subprocess.run(
77-
["git", "commit", "-m", "onitial commit"],
95+
[
96+
"git",
97+
"-c",
98+
"user.name=Max",
99+
"-c",
100+
"user.email=max@rb.com",
101+
"commit",
102+
"-m",
103+
"Initial commit",
104+
],
78105
cwd=git_repo,
79106
check=True,
80107
capture_output=True,
@@ -99,7 +126,16 @@ def test_git_committed_changes(git_repo: Path):
99126
test_file.write_text("SELECT 1")
100127
subprocess.run(["git", "add", "model.sql"], cwd=git_repo, check=True, capture_output=True)
101128
subprocess.run(
102-
["git", "commit", "-m", "Initial commit"],
129+
[
130+
"git",
131+
"-c",
132+
"user.name=Max",
133+
"-c",
134+
"user.email=max@rb.com",
135+
"commit",
136+
"-m",
137+
"Initial commit",
138+
],
103139
cwd=git_repo,
104140
check=True,
105141
capture_output=True,
@@ -115,7 +151,16 @@ def test_git_committed_changes(git_repo: Path):
115151
test_file.write_text("SELECT 2")
116152
subprocess.run(["git", "add", "model.sql"], cwd=git_repo, check=True, capture_output=True)
117153
subprocess.run(
118-
["git", "commit", "-m", "an update on feature bramch"],
154+
[
155+
"git",
156+
"-c",
157+
"user.name=Max",
158+
"-c",
159+
"user.email=max@rb.com",
160+
"commit",
161+
"-m",
162+
"Update on feature branch",
163+
],
119164
cwd=git_repo,
120165
check=True,
121166
capture_output=True,

0 commit comments

Comments
 (0)