GiteaClientTest

23

tests

0

failures

0

ignored

0.444s

duration

100%

successful

Tests

Test Duration Result
a blank build status context falls back to the repository-wide one 0.022s passed
a build's own status context replaces the repository-wide one 0.036s passed
is false when any required value is missing 0.003s passed
is true when baseUrl, owner, repo, and token are configured 0.004s passed
maps every build status to the documented Gitea state 0.096s passed
omits target_url when none is given 0.014s passed
only needs baseUrl and token, not owner/repo 0.008s passed
posts state, context, description, and target_url with token auth 0.065s passed
requests statuses sorted by recentupdate with token auth 0.032s passed
returns Disabled when unconfigured, without a request 0.002s passed
returns Error for an unknown state value 0.010s passed
returns Error for malformed JSON instead of throwing 0.011s passed
returns Error on HTTP 4xx/5xx instead of throwing 0.023s passed
returns Error when Gitea is unreachable instead of throwing 0.007s passed
returns None for an empty status list 0.010s passed
returns None when no status matches the context 0.013s passed
returns false on HTTP errors instead of throwing 0.016s passed
returns false when Gitea is unreachable instead of throwing 0.009s passed
returns false without a request when disabled 0.003s passed
returns null on HTTP errors, missing login, or malformed JSON instead of throwing 0.030s passed
returns null when baseUrl or token is missing 0.002s passed
returns the login of the token's user 0.011s passed
returns the newest status matching the configured context 0.017s passed

Standard output

Creating nstance of class de.hoennig.werkator.gitea.GiteaClientTest
2026-09-03T09:36:04.978Z  WARN 144 --- [r @coroutine#36] o.e.jetty.server.AbstractConnector       : Acceptors should be <= availableProcessors: oejs.NetworkTrafficServerConnector@69c70887{HTTP/1.1, (http/1.1, h2c)}{0.0.0.0:0} 
2026-09-03T09:36:05.002Z  WARN 144 --- [e-1812101815#36] o.eclipse.jetty.util.DeprecationWarning  : Using @Deprecated Class org.eclipse.jetty.ee10.servlets.CrossOriginFilter
2026-09-03T09:36:05.287Z  WARN 144 --- [-1812101815#317] de.hoennig.werkator.gitea.GiteaClient    : Could not publish Gitea status for abc123: 500 Internal Server Error: [no body]
2026-09-03T09:36:05.298Z  WARN 144 --- [-1812101815#317] 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-03T09:36:05.390Z  WARN 144 --- [-1812101815#318] 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-03T09:36:05.416Z  WARN 144 --- [-1812101815#318] de.hoennig.werkator.gitea.GiteaClient    : Could not read Gitea status for abc123: 404 Not Found: [no body]
2026-09-03T09:36:05.427Z  WARN 144 --- [-1812101815#318] de.hoennig.werkator.gitea.GiteaClient    : Could not read Gitea status for abc123: 500 Internal Server Error: [no body]
2026-09-03T09:36:05.437Z  WARN 144 --- [-1812101815#318] 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-03T09:36:05.487Z  WARN 144 --- [-1812101815#319] de.hoennig.werkator.gitea.GiteaClient    : Could not resolve Gitea username: 401 Unauthorized: [no body]
2026-09-03T09:36:05.498Z  WARN 144 --- [-1812101815#319] 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]