Skip to content

Commit

Permalink
Remove unused deployedVulnerabilityCount
Browse files Browse the repository at this point in the history
  • Loading branch information
colin-lamed committed Dec 19, 2024
1 parent f2e683d commit dd8fc1e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,6 @@ class VulnerabilitiesConnector @Inject() (
.get(url"$url/vulnerabilities/api/reports/${flag.asString}/counts?service=${serviceName.map(s => s"\"${s.asString}\"")}&team=${team.map(_.asString)}")
.execute[Seq[TotalVulnerabilityCount]]

def deployedVulnerabilityCount(
serviceName: ServiceName
)(using
HeaderCarrier
): Future[Option[TotalVulnerabilityCount]] =
given Reads[TotalVulnerabilityCount] = TotalVulnerabilityCount.reads
httpClientV2
.get(url"$url/vulnerabilities/api/services/${serviceName.asString}/deployed-report-count")
.execute[Option[TotalVulnerabilityCount]]

def timelineCounts(
serviceName : Option[ServiceName]
, team : Option[TeamName]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,33 +125,6 @@ class VulnerabilitiesConnectorSpec
}
}

"deployedVulnerabilityCount" should {
"return a count of distinct vulnerabilities for the given service" in {
stubFor(
get(urlMatching("/vulnerabilities/api/services/service1/deployed-report-count"))
.willReturn(aResponse().withBody(
"""{
"service": "service1",
"actionRequired": 5,
"noActionRequired": 4,
"investigationOngoing": 3,
"uncurated": 2
}"""
))
)

vulnerabilitiesConnector.deployedVulnerabilityCount(ServiceName("service1")).futureValue shouldBe Some(
TotalVulnerabilityCount(
service = ServiceName("service1"),
actionRequired = 5,
noActionRequired = 4,
investigationOngoing = 3,
uncurated = 2
)
)
}
}

"vulnerabilitiesCounts" should {
"return a sequence of TotalVulnerabilityCounts" in {
stubFor(
Expand Down

0 comments on commit dd8fc1e

Please sign in to comment.