From 7ff174d162af76d964e7158c5380364c5af13931 Mon Sep 17 00:00:00 2001 From: silverwind Date: Wed, 19 Oct 2022 20:46:18 +0200 Subject: [PATCH 1/3] Skip TestExportUserGPGKeys --- tests/integration/user_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/integration/user_test.go b/tests/integration/user_test.go index 110f5c89bfbd3..e27a7d7d8057f 100644 --- a/tests/integration/user_test.go +++ b/tests/integration/user_test.go @@ -140,6 +140,8 @@ func TestRenameReservedUsername(t *testing.T) { } func TestExportUserGPGKeys(t *testing.T) { + t.Skip("Test is flaky, see https://github.com/go-gitea/gitea/issues/19961") + defer tests.PrepareTestEnv(t)() // Export empty key list testExportUserGPGKeys(t, "user1", `-----BEGIN PGP PUBLIC KEY BLOCK----- From 9f550dc242fd667107c44a791350b40e1ab0fb2a Mon Sep 17 00:00:00 2001 From: silverwind Date: Wed, 19 Oct 2022 22:30:10 +0200 Subject: [PATCH 2/3] add condition to avoid lint error --- tests/integration/user_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/integration/user_test.go b/tests/integration/user_test.go index e27a7d7d8057f..d58194f656492 100644 --- a/tests/integration/user_test.go +++ b/tests/integration/user_test.go @@ -140,7 +140,9 @@ func TestRenameReservedUsername(t *testing.T) { } func TestExportUserGPGKeys(t *testing.T) { - t.Skip("Test is flaky, see https://github.com/go-gitea/gitea/issues/19961") + if os.Getenv("CI") != "" { + t.Skip("Test is flaky, see https://github.com/go-gitea/gitea/issues/19961") + } defer tests.PrepareTestEnv(t)() // Export empty key list From d22d97789ec7328c502acde29815cde6dd8768e2 Mon Sep 17 00:00:00 2001 From: silverwind Date: Thu, 20 Oct 2022 09:31:12 +0200 Subject: [PATCH 3/3] fix import --- tests/integration/user_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/integration/user_test.go b/tests/integration/user_test.go index d58194f656492..c22ed94826f9a 100644 --- a/tests/integration/user_test.go +++ b/tests/integration/user_test.go @@ -6,6 +6,7 @@ package integration import ( "net/http" + "os" "testing" issues_model "code.gitea.io/gitea/models/issues"