Commit 3403cfb3 authored by Sander Bollen's avatar Sander Bollen
Browse files

one single quotation mark :/. Added test case to guard against future errors in manweconfig .

parent a979530a
...@@ -63,7 +63,7 @@ abstract class Manwe extends BiopetCommandLineFunction { ...@@ -63,7 +63,7 @@ abstract class Manwe extends BiopetCommandLineFunction {
val sslSettingString = sslSettings match { val sslSettingString = sslSettings match {
case Some("true") => "VERIFY_CERTIFICATE = True" case Some("true") => "VERIFY_CERTIFICATE = True"
case Some("false") => "VERIFY_CERTIFICATE = False" case Some("false") => "VERIFY_CERTIFICATE = False"
case Some(x) => s"VERIFY_CERTIFICATE = '$x" case Some(x) => s"VERIFY_CERTIFICATE = '$x'"
case _ => "VERIFY_CERTIFICATE = True" case _ => "VERIFY_CERTIFICATE = True"
} }
...@@ -72,7 +72,7 @@ abstract class Manwe extends BiopetCommandLineFunction { ...@@ -72,7 +72,7 @@ abstract class Manwe extends BiopetCommandLineFunction {
val taskString = s"TASK_POLL_WAIT = ${taskPollWait.getOrElse(2)}" val taskString = s"TASK_POLL_WAIT = ${taskPollWait.getOrElse(2)}"
val file = directory match { val file = directory match {
case Some(dir) => File.createTempFile("manwe_config", ".py", dir) case Some(dir) => File.createTempFile("manwe_config", ".py", dir)
case None => File.createTempFile("manwe_config", ".py") case None => File.createTempFile("manwe_config", ".py")
} }
file.deleteOnExit() file.deleteOnExit()
val writer = new PrintWriter(file) val writer = new PrintWriter(file)
......
...@@ -343,6 +343,26 @@ class ManweTest extends TestNGSuite with Matchers { ...@@ -343,6 +343,26 @@ class ManweTest extends TestNGSuite with Matchers {
|DATA_BUFFER_SIZE = 200 |DATA_BUFFER_SIZE = 200
|TASK_POLL_WAIT = 5""".stripMargin) |TASK_POLL_WAIT = 5""".stripMargin)
val manwe2 = new ManweAnnotateBed(null) {
override def globalConfig = new Config(Map(
"varda_root" -> "http://127.0.0.1:5000",
"varda_token" -> "QWERTYUIOPASDFGHJKLZXCVBNM",
"varda_cache_size" -> 25,
"varda_buffer_size" -> 200,
"varda_task_poll_wait" -> 5,
"varda_verify_certificate" -> "/a/b/c/d.crt"))
}
val file2: File = manwe2.createManweConfig(None)
val contents2 = Source.fromFile(file2).getLines().mkString("\n")
contents2 should equal("""API_ROOT = 'http://127.0.0.1:5000'
|TOKEN = 'QWERTYUIOPASDFGHJKLZXCVBNM'
|VERIFY_CERTIFICATE = '/a/b/c/d.crt'
|COLLECTION_CACHE_SIZE = 25
|DATA_BUFFER_SIZE = 200
|TASK_POLL_WAIT = 5""".stripMargin)
} }
} }
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment