Skip to content

Explicitly set user email before tagging in a test

Before this commit, I got a local failure:

--- FAIL: TestSuccessfulUpdateRemoteMirrorRequest (0.17s)
	testhelper.go:158: git [-C /home/zegerjan/src/gitlab.com/gitlab-org/gitaly/internal/testhelper/testdata/data/TestSuccessfulUpdateRemoteMirrorRequest312234598 tag -fam Overriding tag v1.0.0 0b4bc9a49b562e85de7cc9e834518ea6828729b9]
	testhelper.go:159:
		*** Please tell me who you are.

		Run

		  git config --global user.email "you@example.com"
		  git config --global user.name "Your Name"

		to set your account's default identity.
		Omit --global to set the identity only in this repository.

		fatal: unable to auto-detect email address (got 'zegerjan@zegerjan-XPS-15-9570.(none)')
	testhelper.go:160: exit status 128

The problem my system has, is the fact that the email adress can't be auto detected. This could be fixed on my system, but that might keep the problem for other developers.

What I don't understand right now, is that I did set the user.email on my local machine. So my first thought is that my user config, located in $HOME is not respected during tests. Probably because $HOME is not the same as for my local user.

Merge request reports