All Downloads are FREE. Search and download functionalities are using the official Maven repository.

coursier.clitests.util.TestAuthProxy.scala Maven / Gradle / Ivy

The newest version!
package coursier.clitests.util

object TestAuthProxy {

  def authProxyTestImage =
    "bahamat/authenticated-proxy@sha256:568c759ac687f93d606866fbb397f39fe1350187b95e648376b971e9d7596e75"

  def defaultPort = 9083

  def withAuthProxy[T](f: DockerServer => T): T =
    DockerServer.withServer(authProxyTestImage, "", 80 -> defaultPort) { server =>
      f(server)
    }

  def m2Settings(port: Int, user: String, password: String): String =
    s"""
       |
       |   
       |      test-proxy
       |      http
       |      localhost
       |      $port
       |      $user
       |      $password
       |    
       |  
       |
       |""".stripMargin

  def m2Settings(): String =
    m2Settings(defaultPort, "jack", "insecure")

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy