From ec77db2ddb466f8fb82d5ec17ced0630420a81b1 Mon Sep 17 00:00:00 2001 From: Gusted Date: Tue, 20 Dec 2022 23:59:02 +0100 Subject: [PATCH] Specify ID in `TestAPITeam` - There have been CI failures(https://codeberg.org/forgejo/forgejo/issues/111) in this specific test function. The code on itself looks good, the CI failures are likely caused by not specifying any field in `TeamUser`, which might have caused to unittest to return another `TeamUser` than the code expects. --- tests/integration/api_team_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/api_team_test.go b/tests/integration/api_team_test.go index a667949c096f9..c67d5412a7ff5 100644 --- a/tests/integration/api_team_test.go +++ b/tests/integration/api_team_test.go @@ -25,7 +25,7 @@ import ( func TestAPITeam(t *testing.T) { defer tests.PrepareTestEnv(t)() - teamUser := unittest.AssertExistsAndLoadBean(t, &organization.TeamUser{}) + teamUser := unittest.AssertExistsAndLoadBean(t, &organization.TeamUser{ID: 1}) team := unittest.AssertExistsAndLoadBean(t, &organization.Team{ID: teamUser.TeamID}) user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: teamUser.UID})