summaryrefslogtreecommitdiff
path: root/crashboxd/src/test/scala/io/crashbox/ci/BuildStageSpec.scala
diff options
context:
space:
mode:
Diffstat (limited to 'crashboxd/src/test/scala/io/crashbox/ci/BuildStageSpec.scala')
-rw-r--r--crashboxd/src/test/scala/io/crashbox/ci/BuildStageSpec.scala44
1 files changed, 21 insertions, 23 deletions
diff --git a/crashboxd/src/test/scala/io/crashbox/ci/BuildStageSpec.scala b/crashboxd/src/test/scala/io/crashbox/ci/BuildStageSpec.scala
index ec5ec56..eb77c40 100644
--- a/crashboxd/src/test/scala/io/crashbox/ci/BuildStageSpec.scala
+++ b/crashboxd/src/test/scala/io/crashbox/ci/BuildStageSpec.scala
@@ -29,29 +29,27 @@ class BuildStageSpec extends FlatSpec with Matchers with BeforeAndAfterAll {
"BuildStage" should "have a test!" in {
- TestUtil.withTempFile{ dir =>
- TestUtil.withTempStream{ out =>
-
- val taskDef = TaskDef(DockerEnvironment("crashbox"), "sleep 10; exit 0")
- val resultSink = Sink.foreach[Builder.BuildState](x => println(x))
-
- val stage = new BuildSource(
- TaskId("build", 0),
- taskDef,
- executor,
- dir,
- out
- )
- val src = Source.fromGraph(stage)
-
- //val done = src.toMat(resultSink)(Keep.right).run()
-
- //executor.start("crashbox", "sleep 10000", dir, out)
- Thread.sleep(1000)
- assert(executor.clean())
- //Await.ready(done, 30.seconds)
- println("eot")
- }
+ IOUtil.withTemp{ (dir, out) =>
+
+ val taskDef = TaskDef(DockerEnvironment("crashbox"), "sleep 10; exit 0")
+ val resultSink = Sink.foreach[Builder.BuildState](x => println(x))
+
+ val stage = new BuildSource(
+ TaskId("build", 0),
+ taskDef,
+ executor,
+ dir,
+ out
+ )
+ val src = Source.fromGraph(stage)
+
+ //val done = src.toMat(resultSink)(Keep.right).run()
+
+ //executor.start("crashbox", "sleep 10000", dir, out)
+ Thread.sleep(1000)
+ assert(executor.clean())
+ //Await.ready(done, 30.seconds)
+ println("eot")
}
}
}