disable gravatar in test (#32529)

When running e2e tests on flaky networks, gravatar can cause a timeout
and test failures. Turn off, and populate avatars on e2e test suite run
to make them reliable.
This commit is contained in:
Rowan Bohde 2024-11-20 22:30:48 -06:00 committed by GitHub
parent d11f8d24b0
commit 9ac74a1a40
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 89 additions and 92 deletions

View file

@ -18,6 +18,7 @@ import (
func TestRepository_ContributorsGraph(t *testing.T) {
assert.NoError(t, unittest.PrepareTestDatabase())
repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 2})
assert.NoError(t, repo.LoadOwner(db.DefaultContext))
mockCache, err := cache.NewStringCache(setting.Cache{})
@ -46,7 +47,7 @@ func TestRepository_ContributorsGraph(t *testing.T) {
assert.EqualValues(t, &ContributorData{
Name: "Ethan Koenig",
AvatarLink: "https://secure.gravatar.com/avatar/b42fb195faa8c61b8d88abfefe30e9e3?d=identicon",
AvatarLink: "/assets/img/avatar_default.png",
TotalCommits: 1,
Weeks: map[int64]*WeekData{
1511654400000: {