Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mirrors
biopet.biopet
Commits
3403cfb3
Commit
3403cfb3
authored
Nov 05, 2015
by
Sander Bollen
Browse files
one single quotation mark :/. Added test case to guard against future errors in manweconfig .
parent
a979530a
Changes
2
Hide whitespace changes
Inline
Side-by-side
public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/Manwe.scala
View file @
3403cfb3
...
@@ -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
)
...
...
public/biopet-extensions/src/test/scala/nl/lumc/sasc/biopet/extensions/ManweTest.scala
View file @
3403cfb3
...
@@ -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
)
}
}
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment