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
SOaAS
psot.repository
Commits
fce52ed3
Commit
fce52ed3
authored
Feb 07, 2018
by
Lukas Jelonek
Browse files
Modify tests psot-repository that it can actually be executed with psot
parent
78d90258
Changes
3
Hide whitespace changes
Inline
Side-by-side
tests/data/example_repo/scripts/convert_example.sh
100644 → 100755
View file @
fce52ed3
#!/bin/bash
echo
'{"test":{}}'
>
$2
.json
tests/data/example_repo/scripts/run_example.sh
100644 → 100755
View file @
fce52ed3
#!/bin/bash
touch
$2
.example.results
tests/test_repository.py
View file @
fce52ed3
...
...
@@ -23,16 +23,17 @@ class TestExampleRepositoryIsLoadedCorrectly(unittest.TestCase):
def
test_that_run_script_is_resolved_correctly
(
self
):
# all paths to scripts should be stored as absolute paths in the configuration. This tests checks if the scripts are reachable via the path specified
script_path
=
self
.
config
[
'modules'
][
'example'
][
'analysis'
][
'script'
]
self
.
assertTrue
(
os
.
path
.
isabs
(
script_path
),
"Script is not absolute "
+
script_path
)
self
.
assertTrue
(
os
.
path
.
isfile
(
script_path
),
"Script is not a file "
+
script_path
)
def
test_that_convert_script_is_resolved_correctly
(
self
):
script_path
=
self
.
config
[
'modules'
][
'example'
][
'converter'
][
'script'
]
self
.
assertTrue
(
os
.
path
.
isabs
(
script_path
),
"Script is not absolute "
+
script_path
)
self
.
assertTrue
(
os
.
path
.
isfile
(
script_path
),
"Script is not a file "
+
script_path
)
def
test_that_config_exists
(
self
):
self
.
assertTrue
(
'tools'
in
self
.
config
,
'config.yml not loaded'
)
class
TestMergingRepositoriesWorksCorrectly
(
unittest
.
TestCase
):
def
setUp
(
self
):
...
...
Write
Preview
Markdown
is supported
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