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
be36037d
Commit
be36037d
authored
May 28, 2020
by
Spiros Koulouzis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed localhost to 127.0.0.1
parent
ca768ea0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
18 deletions
+16
-18
test.sh
bin/test.sh
+11
-11
test_planner.py
planner/test/test_planner.py
+4
-4
test_default_api.py
sure_tosca-client_python_stubs/test/test_default_api.py
+1
-3
No files found.
bin/test.sh
View file @
be36037d
#!/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
...
...
planner/test/test_planner.py
View file @
be36037d
...
@@ -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
):
...
...
sure_tosca-client_python_stubs/test/test_default_api.py
View file @
be36037d
...
@@ -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
)
...
...
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