diff options
author | Jakob Odersky <jakob@odersky.com> | 2017-04-01 13:21:15 -0700 |
---|---|---|
committer | Jakob Odersky <jakob@odersky.com> | 2017-04-01 13:21:15 -0700 |
commit | 26aa8adc30a84d983d020e34b488ac22a31cb544 (patch) | |
tree | 5e2cee54da5f64011f56a85c4b09bd1add4eacc7 /crashboxd/src/test/scala/io/crashbox/ci/ParserSpec.scala | |
parent | 8a4ebe76200a2e570bd959d8780c3c0a0bf71d5c (diff) | |
download | crashbox-ci-26aa8adc30a84d983d020e34b488ac22a31cb544.tar.gz crashbox-ci-26aa8adc30a84d983d020e34b488ac22a31cb544.tar.bz2 crashbox-ci-26aa8adc30a84d983d020e34b488ac22a31cb544.zip |
Add yaml parser and docker executor
Diffstat (limited to 'crashboxd/src/test/scala/io/crashbox/ci/ParserSpec.scala')
-rw-r--r-- | crashboxd/src/test/scala/io/crashbox/ci/ParserSpec.scala | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/crashboxd/src/test/scala/io/crashbox/ci/ParserSpec.scala b/crashboxd/src/test/scala/io/crashbox/ci/ParserSpec.scala new file mode 100644 index 0000000..8834af9 --- /dev/null +++ b/crashboxd/src/test/scala/io/crashbox/ci/ParserSpec.scala @@ -0,0 +1,19 @@ +package io.crashbox.ci + +import org.scalatest._ + +class ParserSpec extends FlatSpec with Matchers { + + val build = """|tasks: + | main: + | image: foo/bar + | script: echo "hello world" + |""".stripMargin + + val parsed = BuildDef( + Seq(TaskDef(DockerEnvironment("foo/bar"), "echo \"hello world\""))) + + "Parser" should "parse build definitions" in { + assert(Parser.parse(build) == Parser.Success(parsed)) + } +} |