GiteaClientTest

23

tests

0

failures

0

ignored

0.610s

duration

100%

successful

Tests

Test Duration Result
a blank build status context falls back to the repository-wide one 0.030s passed
a build's own status context replaces the repository-wide one 0.049s passed
is false when any required value is missing 0.003s passed
is true when baseUrl, owner, repo, and token are configured 0.003s passed
maps every build status to the documented Gitea state 0.141s passed
omits target_url when none is given 0.034s passed
only needs baseUrl and token, not owner/repo 0.010s passed
posts state, context, description, and target_url with token auth 0.131s passed
requests statuses sorted by recentupdate with token auth 0.021s passed
returns Disabled when unconfigured, without a request 0.004s passed
returns Error for an unknown state value 0.013s passed
returns Error for malformed JSON instead of throwing 0.015s passed
returns Error on HTTP 4xx/5xx instead of throwing 0.028s passed
returns Error when Gitea is unreachable instead of throwing 0.008s passed
returns None for an empty status list 0.013s passed
returns None when no status matches the context 0.016s passed
returns false on HTTP errors instead of throwing 0.018s passed
returns false when Gitea is unreachable instead of throwing 0.010s 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.033s passed
returns null when baseUrl or token is missing 0.004s passed
returns the login of the token's user 0.011s passed
returns the newest status matching the configured context 0.012s passed

Standard output

Creating nstance of class de.hoennig.werkator.gitea.GiteaClientTest
2026-09-03T12:35:09.602Z  WARN 146 --- [r @coroutine#37] o.e.jetty.server.AbstractConnector       : Acceptors should be <= availableProcessors: oejs.NetworkTrafficServerConnector@6a59bbf0{HTTP/1.1, (http/1.1, h2c)}{0.0.0.0:0} 
2026-09-03T12:35:09.629Z  WARN 146 --- [e-1574841618#37] o.eclipse.jetty.util.DeprecationWarning  : Using @Deprecated Class org.eclipse.jetty.ee10.servlets.CrossOriginFilter
2026-09-03T12:35:10.060Z  WARN 146 --- [-1574841618#330] de.hoennig.werkator.gitea.GiteaClient    : Could not publish Gitea status for abc123: 500 Internal Server Error: [no body]
2026-09-03T12:35:10.072Z  WARN 146 --- [-1574841618#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-03T12:35:10.166Z  WARN 146 --- [-1574841618#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-03T12:35:10.212Z  WARN 146 --- [-1574841618#331] de.hoennig.werkator.gitea.GiteaClient    : Could not read Gitea status for abc123: 404 Not Found: [no body]
2026-09-03T12:35:10.220Z  WARN 146 --- [-1574841618#331] de.hoennig.werkator.gitea.GiteaClient    : Could not read Gitea status for abc123: 500 Internal Server Error: [no body]
2026-09-03T12:35:10.231Z  WARN 146 --- [-1574841618#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-03T12:35:10.289Z  WARN 146 --- [-1574841618#332] de.hoennig.werkator.gitea.GiteaClient    : Could not resolve Gitea username: 401 Unauthorized: [no body]
2026-09-03T12:35:10.307Z  WARN 146 --- [-1574841618#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]