diff options
Diffstat (limited to 'crashbox-server/src/test/scala')
-rw-r--r-- | crashbox-server/src/test/scala/io/crashbox/ci/SourceSpec.scala | 5 | ||||
-rw-r--r-- | crashbox-server/src/test/scala/io/crashbox/ci/TestUtil.scala | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/crashbox-server/src/test/scala/io/crashbox/ci/SourceSpec.scala b/crashbox-server/src/test/scala/io/crashbox/ci/SourceSpec.scala index 9bef01d..a03e476 100644 --- a/crashbox-server/src/test/scala/io/crashbox/ci/SourceSpec.scala +++ b/crashbox-server/src/test/scala/io/crashbox/ci/SourceSpec.scala @@ -23,10 +23,11 @@ class SourceSpec extends FlatSpec with Matchers with Source with Core { } "GitFetchers" should "be able to clone a local repository" in { - TestUtil.withTempDir{ remote => + TestUtil.withTempDir { remote => makeRepo(remote) TestUtil.withTempDir { local => - val cloned = Await.result(fetchSource(remote.toURI().toURL(), local), Timeout) + val cloned = + Await.result(fetchSource(remote.toURI().toURL(), local), Timeout) assert(cloned.listFiles().length == 3) } } diff --git a/crashbox-server/src/test/scala/io/crashbox/ci/TestUtil.scala b/crashbox-server/src/test/scala/io/crashbox/ci/TestUtil.scala index eb177f8..a7e7ae6 100644 --- a/crashbox-server/src/test/scala/io/crashbox/ci/TestUtil.scala +++ b/crashbox-server/src/test/scala/io/crashbox/ci/TestUtil.scala @@ -1,13 +1,14 @@ package io.crashbox.ci -import java.io.{ File, OutputStream } +import java.io.{File, OutputStream} import java.nio.file.Files object TestUtil { def withTempDir[A](f: File => A): A = { val dir = Files.createTempDirectory("crashbox-test").toFile - try f(dir) finally dir.delete() + try f(dir) + finally dir.delete() } } |