From dd8fc1eba67ad1d4d3863fefa417c2b51b1b918b Mon Sep 17 00:00:00 2001 From: colin-lamed <9568290+colin-lamed@users.noreply.github.com> Date: Thu, 19 Dec 2024 16:44:09 +0000 Subject: [PATCH] Remove unused deployedVulnerabilityCount --- .../VulnerabilitiesConnector.scala | 10 ------- .../VulnerabilitiesConnectorSpec.scala | 27 ------------------- 2 files changed, 37 deletions(-) diff --git a/app/uk/gov/hmrc/cataloguefrontend/vulnerabilities/VulnerabilitiesConnector.scala b/app/uk/gov/hmrc/cataloguefrontend/vulnerabilities/VulnerabilitiesConnector.scala index e887292df..e7c7e7ec3 100644 --- a/app/uk/gov/hmrc/cataloguefrontend/vulnerabilities/VulnerabilitiesConnector.scala +++ b/app/uk/gov/hmrc/cataloguefrontend/vulnerabilities/VulnerabilitiesConnector.scala @@ -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] diff --git a/test/uk/gov/hmrc/cataloguefrontend/vulnerabilities/VulnerabilitiesConnectorSpec.scala b/test/uk/gov/hmrc/cataloguefrontend/vulnerabilities/VulnerabilitiesConnectorSpec.scala index 926a64cd5..43dcd9e56 100644 --- a/test/uk/gov/hmrc/cataloguefrontend/vulnerabilities/VulnerabilitiesConnectorSpec.scala +++ b/test/uk/gov/hmrc/cataloguefrontend/vulnerabilities/VulnerabilitiesConnectorSpec.scala @@ -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(