Skip to content

Commit

Permalink
Merge pull request #226 from jczuchnowski/fix-mockserver
Browse files Browse the repository at this point in the history
Fix MockServer container tag
  • Loading branch information
dimafeng authored May 31, 2022
2 parents be65fbb + 654f1bf commit 82382e5
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
package com.dimafeng.testcontainers

import org.testcontainers.containers.{MockServerContainer => JavaMockServerContainer}
import org.testcontainers.utility.DockerImageName

case class MockServerContainer(
version: String = MockServerContainer.defaultVersion
) extends SingleContainer[JavaMockServerContainer] {

override val container: JavaMockServerContainer = new JavaMockServerContainer(version)
override val container: JavaMockServerContainer =
new JavaMockServerContainer(
MockServerContainer.defaultImageName.withTag(s"mockserver-$version")
)

def endpoint: String = container.getEndpoint

Expand All @@ -15,10 +19,12 @@ case class MockServerContainer(

object MockServerContainer {

val defaultVersion = JavaMockServerContainer.VERSION
private[testcontainers] final val defaultImageName = DockerImageName.parse("mockserver/mockserver")

private[testcontainers] final val defaultVersion = "5.13.2"

case class Def(
version: String = MockServerContainer.defaultVersion
version: String = defaultVersion
) extends ContainerDef {

override type Container = MockServerContainer
Expand Down

0 comments on commit 82382e5

Please sign in to comment.