Skip to content

Commit 5d5d615

Browse files
committed
fix: pull test succeeds when git attribution not configured
1 parent 362590b commit 5d5d615

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/UnitTest/SourceControl/Git/Pull.cls

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ Method TestPull()
4848
do ..WriteFile(remoteDir_"/cls/TestGit/SampleClass2.cls","Class TestGit.SampleClass2 {}")
4949
do $zf(-100,"/SHELL","git","init",remoteDir)
5050
do $zf(-100,"/SHELL","git", "-C", remoteDir, "add", ".")
51-
do $zf(-100,"/SHELL","git", "-C", remoteDir, "commit", "-m", "initial commit in remote for unit test")
51+
do $zf(-100,"/SHELL","git", "-C", remoteDir, "commit", "--author", "unit test <[email protected]>"
52+
,"-m", "initial commit in remote for unit test")
5253
// initialize local repo, cloning remote.
5354
$$$ThrowOnError(##class(SourceControl.Git.Utils).Clone(remoteDir_"/.git"))
5455
// import all and confirm classes exist
@@ -63,7 +64,8 @@ Method TestPull()
6364
do ..WriteFile(remoteDir_"/cls/TestGit/SampleClass2.cls","Class TestGit.SampleClass2 { Parameter foo = ""bar""; }")
6465
do ..WriteFile(remoteDir_"/cls/TestGit/SampleClass3.cls","Class TestGit.SampleClass3 {}")
6566
do $zf(-100,"/SHELL","git", "-C", remoteDir, "add", ".")
66-
do $zf(-100,"/SHELL","git", "-C", remoteDir, "commit", "-m", "delete, modify, and add classes on remote")
67+
do $zf(-100,"/SHELL","git", "-C", remoteDir, "commit", "--author", "unit test <[email protected]>"
68+
, "-m", "delete, modify, and add classes on remote")
6769
// pull on local and confirm changes were loaded.
6870
$$$ThrowOnError(##class(SourceControl.Git.API).Pull())
6971
do $$$AssertNotTrue($$$comClassDefined("TestGit.SampleClass1"))

0 commit comments

Comments
 (0)