Commit be36037d authored by Spiros Koulouzis's avatar Spiros Koulouzis

changed localhost to 127.0.0.1

parent ca768ea0
#!/bin/bash #!/bin/bash
cd ../ #cd ../
cd sure_tosca-flask-server && venv/bin/pip3 install -r test-requirements.txt && venv/bin/python3 -m unittest discover #cd sure_tosca-flask-server && venv/bin/pip3 install -r test-requirements.txt && venv/bin/python3 -m unittest discover
if [ $? -eq 0 ] #if [ $? -eq 0 ]
then #then
echo "------- sure_tosca-flask-server tests successful------" # echo "------- sure_tosca-flask-server tests successful------"
docker build -t sure-tosca:3.0.0 . # docker build -t sure-tosca:3.0.0 .
docker tag sure-tosca:3.0.0 qcdis/sure-tosca:3.0.0 # docker tag sure-tosca:3.0.0 qcdis/sure-tosca:3.0.0
else #else
echo "sure_tosca-flask-server tests Failed" # echo "sure_tosca-flask-server tests Failed"
exit 1 # exit 1
fi #fi
docker stack deploy conf-test -c ../docker-compose/docker-compose-test.yml docker stack deploy conf-test -c ../docker-compose/docker-compose-test.yml
......
...@@ -20,10 +20,10 @@ logger.setLevel(logging.DEBUG) ...@@ -20,10 +20,10 @@ 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' url = 'https://raw.githubusercontent.com/QCDIS/sdia-tosca/master/examples/glusterFS.yaml'
# input_tosca_file_path = self.get_remote_tosca_file(url) input_tosca_file_path = self.get_remote_tosca_file(url)
# self.run_test(input_tosca_file_path) self.run_test(input_tosca_file_path)
def test_tic(self): def test_tic(self):
......
...@@ -14,14 +14,12 @@ from __future__ import absolute_import ...@@ -14,14 +14,12 @@ from __future__ import absolute_import
import os import os
import unittest import unittest
from io import BytesIO
import urllib3 import urllib3
import sure_tosca_client import sure_tosca_client
from sure_tosca_client import Configuration, ApiClient from sure_tosca_client import Configuration, ApiClient
from sure_tosca_client.api.default_api import DefaultApi # noqa: E501 from sure_tosca_client.api.default_api import DefaultApi # noqa: E501
from sure_tosca_client.rest import ApiException
class TestDefaultApi(unittest.TestCase): class TestDefaultApi(unittest.TestCase):
...@@ -29,7 +27,7 @@ class TestDefaultApi(unittest.TestCase): ...@@ -29,7 +27,7 @@ class TestDefaultApi(unittest.TestCase):
def setUp(self): def setUp(self):
configuration = Configuration() configuration = Configuration()
configuration.host = 'http://localhost:8081/tosca-sure/1.0.0' #Make sure we don't have '/' on the end of url configuration.host = 'http://127.0.0.1:8081/tosca-sure/1.0.0' #Make sure we don't have '/' on the end of url
if self.service_is_up(configuration.host): if self.service_is_up(configuration.host):
configuration.verify_ssl = False configuration.verify_ssl = False
api_client = ApiClient(configuration=configuration) api_client = ApiClient(configuration=configuration)
......
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