git-commit-id-maven-plugin icon indicating copy to clipboard operation
git-commit-id-maven-plugin copied to clipboard

UT fail: Key difference for key: 'git.build.user.name'

Open gzm55 opened this issue 3 years ago • 0 comments

Describe the bug

UT fail with log:

[ERROR] Failures:
[ERROR]   NativeAndJGitProviderTest.testCompareBasic:64->verifyNativeAndJGit:128 Key difference for key: 'git.build.user.name'; jgit=; nativeKey=Local User Name; for src/test/resources/_git_with_no_changes expected:<[]> but was:<[Local User Name]>
[ERROR]   NativeAndJGitProviderTest.testCompareIso8601Time:100->verifyNativeAndJGit:128 Key difference for key: 'git.build.user.name'; jgit=; nativeKey=Local User Name; for src/test/resources/_git_with_no_changes expected:<[]> but was:<[Local User Name]>
[ERROR]   NativeAndJGitProviderTest.testCompareSubrepoInChild:88->verifyNativeAndJGit:128 Key difference for key: 'git.build.user.name'; jgit=; nativeKey=Local User Name; for src/test/resources/_git_with_no_changes expected:<[]> but was:<[Local User Name]>
[ERROR]   NativeAndJGitProviderTest.testCompareSubrepoInRoot:76->verifyNativeAndJGit:128 Key difference for key: 'git.build.user.name'; jgit=; nativeKey=Local User Name; for src/test/resources/_git_with_no_changes expected:<[]> but was:<[Local User Name]>
[INFO]
[ERROR] Tests run: 185, Failures: 4, Errors: 0, Skipped: 1

Steps to Reproduce

  • check latest code on master branch
  • create Second user-specific config at ~/.config/git/config
  • git config --global user.name "Local User Name" if not set before
  • mvn test

Expected behavior

  • mvn test successes

Additional context

The jgit seems not respect the Second user-specific configuration file at ~/.config/git/config (issue), whereas native git does.

gzm55 avatar Jul 13 '22 03:07 gzm55