mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-06-27 21:00:05 +02:00
feat: auto cleanup of offline runners (#7803)
Fixes #7646 Adds a cron job to cleanup action runners that have been offline or inactive for X amount of time. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7803 Reviewed-by: Gusted <gusted@noreply.codeberg.org> Co-authored-by: Julian Schlarb <julian.schlarb@denktmit.de> Co-committed-by: Julian Schlarb <julian.schlarb@denktmit.de>
This commit is contained in:
parent
4d44ae39e1
commit
4b6ccbd631
8 changed files with 274 additions and 2 deletions
|
@ -333,11 +333,11 @@ func TestAPICron(t *testing.T) {
|
|||
AddTokenAuth(token)
|
||||
resp := MakeRequest(t, req, http.StatusOK)
|
||||
|
||||
assert.Equal(t, "28", resp.Header().Get("X-Total-Count"))
|
||||
assert.Equal(t, "29", resp.Header().Get("X-Total-Count"))
|
||||
|
||||
var crons []api.Cron
|
||||
DecodeJSON(t, resp, &crons)
|
||||
assert.Len(t, crons, 28)
|
||||
assert.Len(t, crons, 29)
|
||||
})
|
||||
|
||||
t.Run("Execute", func(t *testing.T) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue