• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

input-output-hk / atala-prism-building-blocks / 8795121910

23 Apr 2024 04:45AM UTC coverage: 31.908% (+0.4%) from 31.528%
8795121910

Pull #975

CryptoKnightIOG
feat: VC Verification test coverage (#972)

Signed-off-by: Bassam Riman <bassam.riman@iohk.io>
Pull Request #975: feat: Vc Verification Api

104 of 281 new or added lines in 15 files covered. (37.01%)

379 existing lines in 106 files now uncovered.

4619 of 14476 relevant lines covered (31.91%)

0.32 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

57.89
/prism-agent/service/server/src/main/scala/io/iohk/atala/system/controller/SystemEndpoints.scala
1
package io.iohk.atala.system.controller
2

3
import io.iohk.atala.api.http.EndpointOutputs.*
4
import io.iohk.atala.api.http.{ErrorResponse, RequestContext}
5
import io.iohk.atala.system.controller.http.HealthInfo
6
import sttp.apispec.Tag
7
import sttp.tapir.ztapir.stringBody
8
import sttp.tapir.json.zio.jsonBody
9
import sttp.tapir.*
10

11
object SystemEndpoints {
12

13
  private val tagName = "System"
14
  private val tagDescription =
1✔
15
    s"""
16
       |The __${tagName}__ is a REST API that allows to check the system health and scrap the runtime metrics.
17
       |
18
       |The __health__ endpoint returns the current version of the running service.
19
       |This information can be used to check the health status of the running service in the docker or kubernetes environment.
20
       |
21
       |The __metrics__ endpoint returns the runtime metrics of the running service scraped from the internal prometheus registry.
22
       |This information is collected by the prometheus server and can be used to monitor the running service.
1✔
23
       |""".stripMargin
24

1✔
25
  val tag = Tag(tagName, Some(tagDescription))
26

27
  val health: PublicEndpoint[
28
    (RequestContext),
29
    ErrorResponse,
30
    HealthInfo,
31
    Any
UNCOV
32
  ] =
×
33
    endpoint.get
×
34
      .in(extractFromRequest[RequestContext](RequestContext.apply))
×
35
      .in("_system" / "health")
×
36
      .out(jsonBody[HealthInfo].description("The health info object."))
37
      .errorOut(basicFailures)
1✔
38
      .tag(tagName)
1✔
39
      .summary("Check the health status of the running service")
1✔
40
      .description("Returns the health info object of the running service")
1✔
41
      .name("systemHealth")
42

43
  val metrics: PublicEndpoint[
44
    (RequestContext),
45
    ErrorResponse,
46
    String,
47
    Any
48
  ] =
×
49
    endpoint.get
×
50
      .in(extractFromRequest[RequestContext](RequestContext.apply))
×
51
      .in("_system" / "metrics")
×
52
      .out(stringBody.description("The metrics as plain strings."))
53
      .errorOut(basicFailures)
1✔
54
      .tag(tagName)
1✔
55
      .summary("Collect the runtime metrics of the running service")
1✔
56
      .description("Returns the metrics of the running service from the internal Prometheus registry")
1✔
57
      .name("systemMetrics")
58

59
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc