GiteaClientTest

23

tests

0

failures

0

ignored

1.156s

duration

100%

successful

Tests

Test Duration Result
a blank build status context falls back to the repository-wide one 0.034s passed
a build's own status context replaces the repository-wide one 0.068s passed
is false when any required value is missing 0.005s passed
is true when baseUrl, owner, repo, and token are configured 0.009s passed
maps every build status to the documented Gitea state 0.181s passed
omits target_url when none is given 0.054s passed
only needs baseUrl and token, not owner/repo 0.017s passed
posts state, context, description, and target_url with token auth 0.221s passed
requests statuses sorted by recentupdate with token auth 0.053s passed
returns Disabled when unconfigured, without a request 0.014s passed
returns Error for an unknown state value 0.029s passed
returns Error for malformed JSON instead of throwing 0.022s passed
returns Error on HTTP 4xx/5xx instead of throwing 0.055s passed
returns Error when Gitea is unreachable instead of throwing 0.028s passed
returns None for an empty status list 0.028s passed
returns None when no status matches the context 0.031s passed
returns false on HTTP errors instead of throwing 0.046s passed
returns false when Gitea is unreachable instead of throwing 0.051s passed
returns false without a request when disabled 0.014s passed
returns null on HTTP errors, missing login, or malformed JSON instead of throwing 0.104s passed
returns null when baseUrl or token is missing 0.004s passed
returns the login of the token's user 0.024s passed
returns the newest status matching the configured context 0.064s passed

Standard output

Creating nstance of class de.hoennig.werkator.gitea.GiteaClientTest
2026-09-03T10:11:16.816Z  WARN 144 --- [r @coroutine#37] o.e.jetty.server.AbstractConnector       : Acceptors should be <= availableProcessors: oejs.NetworkTrafficServerConnector@aabb853{HTTP/1.1, (http/1.1, h2c)}{0.0.0.0:0} 
2026-09-03T10:11:16.947Z  WARN 144 --- [pe-623783446#37] o.eclipse.jetty.util.DeprecationWarning  : Using @Deprecated Class org.eclipse.jetty.ee10.servlets.CrossOriginFilter
2026-09-03T10:11:17.656Z  WARN 144 --- [e-623783446#330] de.hoennig.werkator.gitea.GiteaClient    : Could not publish Gitea status for abc123: 500 Internal Server Error: [no body]
2026-09-03T10:11:17.719Z  WARN 144 --- [e-623783446#330] de.hoennig.werkator.gitea.GiteaClient    : Could not publish Gitea status for abc123: I/O error on POST request for "http://localhost:1/api/v1/repos/the-owner/the-repo/statuses/abc123": null
2026-09-03T10:11:17.936Z  WARN 144 --- [e-623783446#331] de.hoennig.werkator.gitea.GiteaClient    : Could not parse Gitea status response for abc123: Cannot deserialize value of type `java.util.ArrayList<de.hoennig.werkator.gitea.GiteaClient$GiteaCommitStatus>` from Object value (token `JsonToken.START_OBJECT`)
 at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 1]
2026-09-03T10:11:18.005Z  WARN 144 --- [e-623783446#331] de.hoennig.werkator.gitea.GiteaClient    : Could not read Gitea status for abc123: 404 Not Found: [no body]
2026-09-03T10:11:18.029Z  WARN 144 --- [e-623783446#331] de.hoennig.werkator.gitea.GiteaClient    : Could not read Gitea status for abc123: 500 Internal Server Error: [no body]
2026-09-03T10:11:18.066Z  WARN 144 --- [e-623783446#331] de.hoennig.werkator.gitea.GiteaClient    : Could not read Gitea status for abc123: I/O error on GET request for "http://localhost:1/api/v1/repos/the-owner/the-repo/commits/abc123/statuses": null
2026-09-03T10:11:18.187Z  WARN 144 --- [e-623783446#332] de.hoennig.werkator.gitea.GiteaClient    : Could not resolve Gitea username: 401 Unauthorized: [no body]
2026-09-03T10:11:18.256Z  WARN 144 --- [e-623783446#332] de.hoennig.werkator.gitea.GiteaClient    : Could not parse Gitea user response: Unrecognized token 'not': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false')
 at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 1]