Commit 2d24ec35 authored by Spiros Koulouzis's avatar Spiros Koulouzis

uninstall test packages

parent b8385753
......@@ -3,7 +3,7 @@
README.md
tox.ini
git_push.sh
test-requirements.txt
#test-requirements.txt
setup.py
# Byte-compiled / optimized / DLL files
......
......@@ -4,12 +4,17 @@ RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY requirements.txt /usr/src/app/
COPY test-requirements.txt /usr/src/app/
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install --no-cache-dir -r test-requirements.txt
COPY . /usr/src/app
RUN python -m unittest discover
RUN pip uninstall -y --no-cache-dir -r test-requirements.txt
EXPOSE 8081
......
......@@ -5,13 +5,4 @@ typing==3.7.4.1
swagger-ui-bundle==0.0.6
tinydb==3.15.2
tosca-parser==2.0.0
flask-restx==0.2.0
wheel==0.34.2
flask-testing==0.8.0
coverage==5.0.4
nose>=1.3.7
pluggy>=0.13.1
randomize>=0.14
Werkzeug==1.0.0
\ No newline at end of file
flask-restx==0.2.0
\ No newline at end of file
import json
import copy
import logging
import os
import tempfile
import time
import uuid
from builtins import print
from functools import reduce
import copy
import yaml
from tinydb import TinyDB, Query
from tinydb.middlewares import CachingMiddleware
from tinydb.storages import MemoryStorage
from toscaparser.functions import GetAttribute
from toscaparser.tosca_template import ToscaTemplate
from werkzeug.datastructures import FileStorage
......@@ -20,7 +16,6 @@ from sure_tosca.models.base_model_ import Model
from sure_tosca.models.node_template import NodeTemplateModel as NodeTemplateModel
from sure_tosca.models.node_template_map import NodeTemplateMapModel
from sure_tosca.models.tosca_template import ToscaTemplateModel as ToscaTemplateModel
from sure_tosca.service import tosca_helper
# db = TinyDB(storage=CachingMiddleware(MemoryStorage))
......@@ -110,7 +105,7 @@ def save(file: FileStorage):
purge_all_tables()
dictionary = yaml.safe_load(file.stream)
# dictionary = yaml.load(file.stream)
logger.info("tosca template: \n" + str(yaml.dump(dictionary)))
logger.debug("tosca template: \n" + str(yaml.dump(dictionary)))
# print(yaml.dump(dictionary))
tosca_template = get_tosca_template(dictionary)
# all_custom_def = tosca_template.nodetemplates[0].custom_def
......
from sure_tosca.models.node_template import NodeTemplateModel # noqa: E501
from sure_tosca.models.node_template_map import NodeTemplateMapModel # noqa: E501
from sure_tosca.models.tosca_template import ToscaTemplateModel # noqa: E501
def add_type_definition(definition_map):
return None
......
......@@ -2,16 +2,13 @@
from __future__ import absolute_import
import os
import tempfile
import requests
from flask import json
from six import BytesIO
import os
from sure_tosca.models.node_template import NodeTemplateModel # noqa: E501
from sure_tosca.models.topology_template import TopologyTemplateModel # noqa: E501
from sure_tosca.models.tosca_template import ToscaTemplateModel # noqa: E501
from sure_tosca.test import BaseTestCase
......
......@@ -25,7 +25,7 @@ class Test(TestCase):
file_names = ['application_example_outputs.yaml','application_example_2_topologies.yaml','lifeWatch_vre1.yaml',
'application_example_updated.yaml','compute.yaml','application_example_provisioned.yaml','topology.yaml',
'kubernetes.yaml','application_example_planed.yaml','TIC.yaml']
'kubernetes.yaml','TIC.yaml']
for file_name in file_names:
logger.info("Testing : " + str(file_name))
......
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