From 5d035c01c59fc7d10f7f71ea9589ca316db33a53 Mon Sep 17 00:00:00 2001 From: Gusted Date: Tue, 29 Aug 2023 22:00:16 +0200 Subject: [PATCH] [GITEA] Simplify cron list test (squash) - As per https://codeberg.org/forgejo/forgejo/pulls/1352#issuecomment-1076074 - Only test if the returned stuff is correct, not necessarily accurate. (cherry picked from commit 55bcaf60ec21aec000ff79635981a16566c77d43) (cherry picked from commit 4f03e4810619455e7dca65741cb53a9fd2d98bfe) (cherry picked from commit f35c31b9beef33e0aafc4e62e5b8fa38b3623494) (cherry picked from commit d08f486da2649c344fa447f41274c39ddd88e82e) --- tests/integration/api_admin_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/integration/api_admin_test.go b/tests/integration/api_admin_test.go index 85b9103e53..423a27eb52 100644 --- a/tests/integration/api_admin_test.go +++ b/tests/integration/api_admin_test.go @@ -298,11 +298,12 @@ func TestAPICron(t *testing.T) { req := NewRequest(t, "GET", urlStr) resp := MakeRequest(t, req, http.StatusOK) - assert.Equal(t, "27", resp.Header().Get("X-Total-Count")) + assert.NotEmpty(t, resp.Header().Get("X-Total-Count")) var crons []api.Cron DecodeJSON(t, resp, &crons) - assert.Len(t, crons, 27) + + assert.NotEmpty(t, crons) }) t.Run("Execute", func(t *testing.T) {