Skip to content

Commit

Permalink
Merge pull request #135 from hmrc/update_wiremock
Browse files Browse the repository at this point in the history
BAU update wiremock
  • Loading branch information
colin-lamed authored Oct 12, 2021
2 parents 0dbee4e + 09ea1e7 commit f0d8e2d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ trait WireMockSupport extends BeforeAndAfterAll with BeforeAndAfterEach {

/** If true (default) it will clear the wireMock settings before each test */
lazy val resetWireMockMappings: Boolean = true
lazy val resetWireMockRequests: Boolean = true

def startWireMock(): Unit =
if (!wireMockServer.isRunning) {
Expand All @@ -78,6 +79,8 @@ trait WireMockSupport extends BeforeAndAfterAll with BeforeAndAfterEach {
super.beforeEach()
if (resetWireMockMappings)
wireMockServer.resetMappings()
if (resetWireMockRequests)
wireMockServer.resetRequests()
}

override protected def afterAll(): Unit = {
Expand Down
12 changes: 6 additions & 6 deletions project/AppDependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ object AppDependencies {
"org.scalatestplus" %% "scalatestplus-mockito" % "1.0.0-M2" % Test,
"org.scalatestplus" %% "scalatestplus-scalacheck" % "3.1.0.0-RC2" % Test,
"org.scalacheck" %% "scalacheck" % "1.15.2" % Test,
"com.github.tomakehurst" % "wiremock" % "1.58" % Test,
"com.github.tomakehurst" % "wiremock-jre8" % "2.26.3" % Test,
"ch.qos.logback" % "logback-classic" % "1.2.3" % Test,
"ch.qos.logback" % "logback-core" % "1.2.3" % Test,
"org.mockito" % "mockito-all" % "1.10.19" % Test,
Expand All @@ -67,11 +67,11 @@ object AppDependencies {

// Dependencies for http-verbs-test modules
def testCompileCommon(playVersion: String) = Seq(
"org.scalatest" %% "scalatest" % scalaTestVerson(playVersion), // version provided transitively is chosen for compatibility with scalatestplus-play
"com.github.tomakehurst" % "wiremock" % "1.58",
"org.scalatest" %% "scalatest" % "3.2.3" % Test,
"com.vladsch.flexmark" % "flexmark-all" % "0.35.10" % Test,
"org.slf4j" % "slf4j-simple" % "1.7.30" % Test
"org.scalatest" %% "scalatest" % scalaTestVerson(playVersion), // version provided transitively is chosen for compatibility with scalatestplus-play
"com.github.tomakehurst" % "wiremock-jre8" % "2.26.3", // last version with jackson dependencies compatible with play
"org.scalatest" %% "scalatest" % "3.2.3" % Test,
"com.vladsch.flexmark" % "flexmark-all" % "0.35.10" % Test,
"org.slf4j" % "slf4j-simple" % "1.7.30" % Test
)

val testCompilePlay26 =
Expand Down

0 comments on commit f0d8e2d

Please sign in to comment.