Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CONF
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UvA
CONF
Commits
30bc1f4e
Commit
30bc1f4e
authored
May 15, 2020
by
Spiros Koulouzis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
planner passed tic
parent
acd049d1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
34 deletions
+43
-34
test_planner.py
planner/test/test_planner.py
+43
-34
No files found.
planner/test/test_planner.py
View file @
30bc1f4e
...
...
@@ -20,46 +20,49 @@ logger.setLevel(logging.DEBUG)
class
MyTestCase
(
unittest
.
TestCase
):
def
test_tic_gluster_fs
(
self
):
# def test_tic_gluster_fs(self):
# url = 'https://raw.githubusercontent.com/QCDIS/sdia-tosca/master/examples/glusterFS.yaml'
# input_tosca_file_path = self.get_remote_tosca_file(url)
# self.run_test(input_tosca_file_path)
def
test_tic
(
self
):
url
=
'https://raw.githubusercontent.com/QCDIS/sdia-tosca/master/examples/TIC.yaml'
input_tosca_file_path
=
self
.
get_remote_tosca_file
(
url
)
self
.
run_test
(
input_tosca_file_path
)
def
test_docker
(
self
):
url
=
'https://raw.githubusercontent.com/QCDIS/sdia-tosca/master/examples/application_example_updated.yaml'
input_tosca_file_path
=
self
.
get_remote_tosca_file
(
url
)
self
.
run_test
(
input_tosca_file_path
)
url
=
'https://raw.githubusercontent.com/QCDIS/sdia-tosca/master/examples/lifeWatch_vre1.yaml'
input_tosca_file_path
=
self
.
get_remote_tosca_file
(
url
)
self
.
run_test
(
input_tosca_file_path
)
def
test_kubernetes
(
self
):
url
=
'https://raw.githubusercontent.com/QCDIS/sdia-tosca/master/examples/kubernetes.yaml'
input_tosca_file_path
=
self
.
get_remote_tosca_file
(
url
)
self
.
run_test
(
input_tosca_file_path
)
def
test_topology
(
self
):
url
=
'https://raw.githubusercontent.com/QCDIS/sdia-tosca/master/examples/topology.yaml'
input_tosca_file_path
=
self
.
get_remote_tosca_file
(
url
)
self
.
run_test
(
input_tosca_file_path
)
def
test_compute
(
self
):
url
=
'https://raw.githubusercontent.com/QCDIS/sdia-tosca/master/examples/compute.yaml'
input_tosca_file_path
=
self
.
get_remote_tosca_file
(
url
)
self
.
run_test
(
input_tosca_file_path
)
def
test_lifeWatch
(
self
):
url
=
'https://raw.githubusercontent.com/QCDIS/sdia-tosca/master/examples/lifeWatch_vre1.yaml'
tic_tosca
=
requests
.
get
(
url
)
input_tosca_file_path
=
os
.
path
.
join
(
tempfile
.
gettempdir
(),
'TIC.yaml'
)
open
(
input_tosca_file_path
,
'wb'
)
.
write
(
tic_tosca
.
content
)
self
.
run_test
(
input_tosca_file_path
)
# def test_docker(self):
# file_name = 'application_example_updated.yaml'
# input_tosca_file_path = self.get_input_tosca_file_path(file_name)
# self.run_test(input_tosca_file_path)
#
# file_name = 'lifeWatch_vre1.yaml'
# input_tosca_file_path = self.get_input_tosca_file_path(file_name)
# self.run_test(input_tosca_file_path)
#
#
# def test_kubernetes(self):
# file_name = 'kubernetes.yaml'
# input_tosca_file_path = self.get_input_tosca_file_path(file_name)
# self.run_test(input_tosca_file_path)
#
# def test_topology(self):
# file_name = 'topology.yaml'
# input_tosca_file_path = self.get_input_tosca_file_path(file_name)
# self.run_test(input_tosca_file_path)
#
# def test_compute(self):
# file_name = 'compute.yaml'
# input_tosca_file_path = self.get_input_tosca_file_path(file_name)
# self.run_test(input_tosca_file_path)
#
# def test_lifeWatch(self):
# url = 'https://raw.githubusercontent.com/QCDIS/sdia-tosca/master/examples/lifeWatch_vre1.yaml'
# tic_tosca = requests.get(url)
# input_tosca_file_path = os.path.join(tempfile.gettempdir(),'TIC.yaml')
# open( input_tosca_file_path, 'wb').write(tic_tosca.content)
# self.run_test(input_tosca_file_path)
def
get_input_tosca_file_path
(
self
,
file_name
):
tosca_path
=
"../../TOSCA/"
input_tosca_file_path
=
tosca_path
+
file_name
...
...
@@ -92,3 +95,9 @@ class MyTestCase(unittest.TestCase):
response
[
"parameters"
]
=
[]
# print("Output message:" + json.dumps(response))
self
.
assertEqual
(
True
,
True
)
def
get_remote_tosca_file
(
self
,
url
):
tosca
=
requests
.
get
(
url
)
input_tosca_file_path
=
os
.
path
.
join
(
tempfile
.
gettempdir
(),
'test_tosca_file.yaml'
)
open
(
input_tosca_file_path
,
'wb'
)
.
write
(
tosca
.
content
)
return
input_tosca_file_path
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