GiteaClientTest

23

tests

0

failures

0

ignored

0.454s

duration

100%

successful

Tests

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

Standard output

Creating nstance of class de.hoennig.werkator.gitea.GiteaClientTest
2026-09-03T16:01:46.955Z  WARN 144 --- [r @coroutine#38] o.e.jetty.server.AbstractConnector       : Acceptors should be <= availableProcessors: oejs.NetworkTrafficServerConnector@19044e11{HTTP/1.1, (http/1.1, h2c)}{0.0.0.0:0} 
2026-09-03T16:01:46.986Z  WARN 144 --- [e-1201023997#38] o.eclipse.jetty.util.DeprecationWarning  : Using @Deprecated Class org.eclipse.jetty.ee10.servlets.CrossOriginFilter
2026-09-03T16:01:47.237Z  WARN 144 --- [-1201023997#342] de.hoennig.werkator.gitea.GiteaClient    : Could not publish Gitea status for abc123: 500 Internal Server Error: [no body]
2026-09-03T16:01:47.251Z  WARN 144 --- [-1201023997#342] 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-03T16:01:47.357Z  WARN 144 --- [-1201023997#343] 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-03T16:01:47.397Z  WARN 144 --- [-1201023997#343] de.hoennig.werkator.gitea.GiteaClient    : Could not read Gitea status for abc123: 404 Not Found: [no body]
2026-09-03T16:01:47.418Z  WARN 144 --- [-1201023997#343] de.hoennig.werkator.gitea.GiteaClient    : Could not read Gitea status for abc123: 500 Internal Server Error: [no body]
2026-09-03T16:01:47.425Z  WARN 144 --- [-1201023997#343] 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-03T16:01:47.475Z  WARN 144 --- [-1201023997#344] de.hoennig.werkator.gitea.GiteaClient    : Could not resolve Gitea username: 401 Unauthorized: [no body]
2026-09-03T16:01:47.494Z  WARN 144 --- [-1201023997#344] 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]