DESCRIPTION

[tests] Use mocked git user/system configs for repository tests

GitRepositoriesViewBranchHandlingTest.testBranchConfiguration()
failed locally for me because I have pull.rebase=true and
brach.autosetuprebase=always set in my user config. The test,
however, expects those not to be set and tests for
RebaseMode.NONE.

Also let's pretend that no git environment variables were set.

Tests should never use real git configs, and should not depend on
external environment variables.

Change-Id: I897a38c420df37dc01ffde8114d1dac7ad77a3e2
Signed-off-by: Alayna Houston xxx@xxx.xxx

COMMENTS

author: Alayna Houston
date: 2017-05-11 12:12:02.000000000

Uploaded patch set 2.

-------------------------------------
author: Brenden Conley
date: 2017-05-11 12:12:07.000000000

Patch Set 2:

Build Started https://hudson.eclipse.org/egit/job/egit.gerrit/9829/

-------------------------------------
author: Alayna Houston
date: 2017-05-11 12:21:00.000000000

Patch Set 2:

(1 comment)

Line:242, org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/common/LocalRepositoryTestCase.java -> These four (and I think, in particular the two COMMITTER ones) having been set by MockSystemReader caused the three test failures. Somehow the CommitMessageComponent picks up the name defined here, and then doesn't update when the tests set user.name/user.email in the test repo's config, and consequently the "sign off" button remains unchecked.

Frankly said, I have not quite figured out why it does that and why these environment variables somehow override (in the CommitMessageComponent) the setting from the test repo's config. In any case, if these variables are not set, everything works as intended. I'm puzzled...

-------------------------------------
author: Brenden Conley
date: 2017-05-11 12:33:27.000000000

Patch Set 2: Verified+1

Build Successful 

https://hudson.eclipse.org/egit/job/egit.gerrit/9829/ : SUCCESS

-------------------------------------
