-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #189 from davenverse/testing
Manager
- Loading branch information
Showing
8 changed files
with
182 additions
and
251 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ jobs: | |
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
scala: [2.12.15, 2.13.7] | ||
scala: [2.12.15, 2.13.7, 3.1.0] | ||
java: [[email protected], [email protected]] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
|
@@ -76,7 +76,7 @@ jobs: | |
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
scala: [2.13.7] | ||
scala: [3.1.0] | ||
java: [[email protected]] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
202 changes: 0 additions & 202 deletions
202
core/src/main/scala/io/chrisdavenport/whaletail/UnixSocket.scala
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
core/src/main/scala/io/chrisdavenport/whaletail/backdoors/EmberBackdoor.scala
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
|
||
import cats.implicits._ | ||
import cats.effect._ | ||
import org.typelevel.log4cats.slf4j.Slf4jLogger | ||
import io.chrisdavenport.whaletail.{ | ||
Docker, | ||
Containers, | ||
Images | ||
} | ||
import scala.concurrent.duration._ | ||
import io.chrisdavenport.whaletail.manager._ | ||
|
||
object TestingExample extends IOApp { | ||
|
||
def run(args: List[String]): IO[ExitCode] = { | ||
val logger = Slf4jLogger.getLogger[IO] | ||
implicit class LogAll[A](fa: IO[A]){ | ||
def logInfo(tag: String) = fa.flatTap(a => logger.info(tag ++ ": " ++ a.toString())) | ||
} | ||
for { | ||
client <- Docker.client[IO] | ||
container <- WhaleTailContainer.build(client, "redis", "latest".some, Map(6379 -> None), Map.empty, Map.empty) | ||
.evalTap(ReadinessStrategy.checkReadiness( | ||
client, | ||
_, | ||
ReadinessStrategy.LogRegex(".*Ready to accept connections.*\\s".r), | ||
30.seconds | ||
)) | ||
_ <- Resource.eval(logger.info(s"$container")) | ||
} yield () | ||
|
||
|
||
}.use(_ => IO.pure(ExitCode.Success)) | ||
} |
Oops, something went wrong.