Skip to content

Commit

Permalink
Include file-patterns in end-to-end test
Browse files Browse the repository at this point in the history
  • Loading branch information
mauriciojost committed Dec 25, 2017
1 parent 70eabd2 commit a20a9d2
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class StarterSpec extends Specification with TempDir {
"works correctly under normal conditions" in {
withTmpDir { tmp =>
val expectedDownloadedFile = new File(tmp, new File("100OLYMP", "OR.ORF").getPath)
val notExpectedDownloadedFile = new File(tmp, new File("100OLYMP", "VI.AVI").getPath)

val server = HttpServer.create(new InetSocketAddress(8085), 0)
server.createContext("/", new RootHandler())
Expand All @@ -29,13 +30,15 @@ class StarterSpec extends Specification with TempDir {
Array(
"--server-name", "localhost",
"--server-port", "8085",
"--file-patterns", "*.ORF",
"--output-directory", tmp.getAbsolutePath
)
)

server.stop(0)

expectedDownloadedFile.exists() must beTrue
notExpectedDownloadedFile.exists() must beFalse
}
}

Expand All @@ -59,6 +62,7 @@ wlansd[0]="/DCIM/,100OLYMP,0,0,0,0";
<script type="text/javascript">
wlansd = new Array();
wlansd[0]="/DCIM/100OLYMP/,OR.ORF,15441739,0,18229,43541";
wlansd[0]="/DCIM/100OLYMP/,VI.AVI,95441739,0,18229,43541";
...
"""
val fileContentResponse = "=== PHOTO SAMPLE ==="
Expand Down

0 comments on commit a20a9d2

Please sign in to comment.