Commit 30bc1f4e authored by Spiros Koulouzis's avatar Spiros Koulouzis

planner passed tic

parent acd049d1
...@@ -20,46 +20,49 @@ logger.setLevel(logging.DEBUG) ...@@ -20,46 +20,49 @@ logger.setLevel(logging.DEBUG)
class MyTestCase(unittest.TestCase): 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' 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) tic_tosca = requests.get(url)
input_tosca_file_path = os.path.join(tempfile.gettempdir(),'TIC.yaml') input_tosca_file_path = os.path.join(tempfile.gettempdir(),'TIC.yaml')
open( input_tosca_file_path, 'wb').write(tic_tosca.content) open( input_tosca_file_path, 'wb').write(tic_tosca.content)
self.run_test(input_tosca_file_path) 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): def get_input_tosca_file_path(self, file_name):
tosca_path = "../../TOSCA/" tosca_path = "../../TOSCA/"
input_tosca_file_path = tosca_path + file_name input_tosca_file_path = tosca_path + file_name
...@@ -92,3 +95,9 @@ class MyTestCase(unittest.TestCase): ...@@ -92,3 +95,9 @@ class MyTestCase(unittest.TestCase):
response["parameters"] = [] response["parameters"] = []
# print("Output message:" + json.dumps(response)) # print("Output message:" + json.dumps(response))
self.assertEqual(True, True) 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
Markdown is supported
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