diff --git a/translator/common/utils.py b/translator/common/utils.py index 8f0ef2ef..031c3046 100644 --- a/translator/common/utils.py +++ b/translator/common/utils.py @@ -225,7 +225,6 @@ class TranslationUtils(object): os.path.dirname(os.path.abspath(__file__)), tosca_file) expected_hot_tpl = os.path.join( os.path.dirname(os.path.abspath(__file__)), hot_file) - tosca = ToscaTemplate(tosca_tpl, params) translate = translator.hot.tosca_translator.TOSCATranslator(tosca, params) diff --git a/translator/hot/tests/test_translate_outputs.py b/translator/hot/tests/test_translate_outputs.py index 1ebf7ead..955150e5 100644 --- a/translator/hot/tests/test_translate_outputs.py +++ b/translator/hot/tests/test_translate_outputs.py @@ -22,7 +22,7 @@ class ToscaTemplateOutputTest(TestCase): def test_translate_output(self): tosca_tpl = os.path.join( os.path.dirname(os.path.abspath(__file__)), - "../../toscalib/tests/data/" + "../../tests/data/" "tosca_nodejs_mongodb_two_instances.yaml") tosca = ToscaTemplate(tosca_tpl) translate = TOSCATranslator(tosca, []) diff --git a/translator/toscalib/tests/artifacts/collectd/config.py b/translator/tests/data/artifacts/collectd/config.py similarity index 100% rename from translator/toscalib/tests/artifacts/collectd/config.py rename to translator/tests/data/artifacts/collectd/config.py diff --git a/translator/toscalib/tests/artifacts/collectd/create.sh b/translator/tests/data/artifacts/collectd/create.sh similarity index 100% rename from translator/toscalib/tests/artifacts/collectd/create.sh rename to translator/tests/data/artifacts/collectd/create.sh diff --git a/translator/toscalib/tests/artifacts/collectd/start.sh b/translator/tests/data/artifacts/collectd/start.sh similarity index 100% rename from translator/toscalib/tests/artifacts/collectd/start.sh rename to translator/tests/data/artifacts/collectd/start.sh diff --git a/translator/toscalib/tests/artifacts/elasticsearch/create.sh b/translator/tests/data/artifacts/elasticsearch/create.sh similarity index 100% rename from translator/toscalib/tests/artifacts/elasticsearch/create.sh rename to translator/tests/data/artifacts/elasticsearch/create.sh diff --git a/translator/toscalib/tests/artifacts/elasticsearch/start.sh b/translator/tests/data/artifacts/elasticsearch/start.sh similarity index 100% rename from translator/toscalib/tests/artifacts/elasticsearch/start.sh rename to translator/tests/data/artifacts/elasticsearch/start.sh diff --git a/translator/toscalib/tests/artifacts/kibana/config.sh b/translator/tests/data/artifacts/kibana/config.sh similarity index 100% rename from translator/toscalib/tests/artifacts/kibana/config.sh rename to translator/tests/data/artifacts/kibana/config.sh diff --git a/translator/toscalib/tests/artifacts/kibana/create.sh b/translator/tests/data/artifacts/kibana/create.sh similarity index 100% rename from translator/toscalib/tests/artifacts/kibana/create.sh rename to translator/tests/data/artifacts/kibana/create.sh diff --git a/translator/toscalib/tests/artifacts/kibana/start.sh b/translator/tests/data/artifacts/kibana/start.sh similarity index 100% rename from translator/toscalib/tests/artifacts/kibana/start.sh rename to translator/tests/data/artifacts/kibana/start.sh diff --git a/translator/toscalib/tests/artifacts/logstash/configure_collectd.py b/translator/tests/data/artifacts/logstash/configure_collectd.py similarity index 100% rename from translator/toscalib/tests/artifacts/logstash/configure_collectd.py rename to translator/tests/data/artifacts/logstash/configure_collectd.py diff --git a/translator/toscalib/tests/artifacts/logstash/configure_elasticsearch.py b/translator/tests/data/artifacts/logstash/configure_elasticsearch.py similarity index 100% rename from translator/toscalib/tests/artifacts/logstash/configure_elasticsearch.py rename to translator/tests/data/artifacts/logstash/configure_elasticsearch.py diff --git a/translator/toscalib/tests/artifacts/logstash/configure_rsyslog.py b/translator/tests/data/artifacts/logstash/configure_rsyslog.py similarity index 100% rename from translator/toscalib/tests/artifacts/logstash/configure_rsyslog.py rename to translator/tests/data/artifacts/logstash/configure_rsyslog.py diff --git a/translator/toscalib/tests/artifacts/logstash/create.sh b/translator/tests/data/artifacts/logstash/create.sh similarity index 100% rename from translator/toscalib/tests/artifacts/logstash/create.sh rename to translator/tests/data/artifacts/logstash/create.sh diff --git a/translator/toscalib/tests/artifacts/logstash/start.sh b/translator/tests/data/artifacts/logstash/start.sh similarity index 100% rename from translator/toscalib/tests/artifacts/logstash/start.sh rename to translator/tests/data/artifacts/logstash/start.sh diff --git a/translator/toscalib/tests/artifacts/mongodb/config.sh b/translator/tests/data/artifacts/mongodb/config.sh similarity index 100% rename from translator/toscalib/tests/artifacts/mongodb/config.sh rename to translator/tests/data/artifacts/mongodb/config.sh diff --git a/translator/toscalib/tests/artifacts/mongodb/create.sh b/translator/tests/data/artifacts/mongodb/create.sh similarity index 100% rename from translator/toscalib/tests/artifacts/mongodb/create.sh rename to translator/tests/data/artifacts/mongodb/create.sh diff --git a/translator/toscalib/tests/artifacts/mongodb/create_database.sh b/translator/tests/data/artifacts/mongodb/create_database.sh similarity index 100% rename from translator/toscalib/tests/artifacts/mongodb/create_database.sh rename to translator/tests/data/artifacts/mongodb/create_database.sh diff --git a/translator/toscalib/tests/artifacts/mongodb/start.sh b/translator/tests/data/artifacts/mongodb/start.sh similarity index 100% rename from translator/toscalib/tests/artifacts/mongodb/start.sh rename to translator/tests/data/artifacts/mongodb/start.sh diff --git a/translator/toscalib/tests/artifacts/mysql/mysql_database_configure.sh b/translator/tests/data/artifacts/mysql/mysql_database_configure.sh similarity index 100% rename from translator/toscalib/tests/artifacts/mysql/mysql_database_configure.sh rename to translator/tests/data/artifacts/mysql/mysql_database_configure.sh diff --git a/translator/toscalib/tests/artifacts/mysql/mysql_dbms_configure.sh b/translator/tests/data/artifacts/mysql/mysql_dbms_configure.sh similarity index 100% rename from translator/toscalib/tests/artifacts/mysql/mysql_dbms_configure.sh rename to translator/tests/data/artifacts/mysql/mysql_dbms_configure.sh diff --git a/translator/toscalib/tests/artifacts/mysql/mysql_dbms_install.sh b/translator/tests/data/artifacts/mysql/mysql_dbms_install.sh similarity index 100% rename from translator/toscalib/tests/artifacts/mysql/mysql_dbms_install.sh rename to translator/tests/data/artifacts/mysql/mysql_dbms_install.sh diff --git a/translator/toscalib/tests/artifacts/mysql/mysql_dbms_start.sh b/translator/tests/data/artifacts/mysql/mysql_dbms_start.sh similarity index 100% rename from translator/toscalib/tests/artifacts/mysql/mysql_dbms_start.sh rename to translator/tests/data/artifacts/mysql/mysql_dbms_start.sh diff --git a/translator/toscalib/tests/artifacts/nodejs/config.sh b/translator/tests/data/artifacts/nodejs/config.sh similarity index 100% rename from translator/toscalib/tests/artifacts/nodejs/config.sh rename to translator/tests/data/artifacts/nodejs/config.sh diff --git a/translator/toscalib/tests/artifacts/nodejs/create.sh b/translator/tests/data/artifacts/nodejs/create.sh similarity index 100% rename from translator/toscalib/tests/artifacts/nodejs/create.sh rename to translator/tests/data/artifacts/nodejs/create.sh diff --git a/translator/toscalib/tests/artifacts/nodejs/start.sh b/translator/tests/data/artifacts/nodejs/start.sh similarity index 100% rename from translator/toscalib/tests/artifacts/nodejs/start.sh rename to translator/tests/data/artifacts/nodejs/start.sh diff --git a/translator/toscalib/tests/artifacts/rsyslog/config.sh b/translator/tests/data/artifacts/rsyslog/config.sh similarity index 100% rename from translator/toscalib/tests/artifacts/rsyslog/config.sh rename to translator/tests/data/artifacts/rsyslog/config.sh diff --git a/translator/toscalib/tests/artifacts/rsyslog/create.sh b/translator/tests/data/artifacts/rsyslog/create.sh similarity index 100% rename from translator/toscalib/tests/artifacts/rsyslog/create.sh rename to translator/tests/data/artifacts/rsyslog/create.sh diff --git a/translator/toscalib/tests/artifacts/rsyslog/start.sh b/translator/tests/data/artifacts/rsyslog/start.sh similarity index 100% rename from translator/toscalib/tests/artifacts/rsyslog/start.sh rename to translator/tests/data/artifacts/rsyslog/start.sh diff --git a/translator/toscalib/tests/artifacts/webserver/webserver_install.sh b/translator/tests/data/artifacts/webserver/webserver_install.sh similarity index 100% rename from translator/toscalib/tests/artifacts/webserver/webserver_install.sh rename to translator/tests/data/artifacts/webserver/webserver_install.sh diff --git a/translator/toscalib/tests/artifacts/webserver/webserver_start.sh b/translator/tests/data/artifacts/webserver/webserver_start.sh similarity index 100% rename from translator/toscalib/tests/artifacts/webserver/webserver_start.sh rename to translator/tests/data/artifacts/webserver/webserver_start.sh diff --git a/translator/toscalib/tests/artifacts/wordpress/wordpress_configure.sh b/translator/tests/data/artifacts/wordpress/wordpress_configure.sh similarity index 100% rename from translator/toscalib/tests/artifacts/wordpress/wordpress_configure.sh rename to translator/tests/data/artifacts/wordpress/wordpress_configure.sh diff --git a/translator/toscalib/tests/artifacts/wordpress/wordpress_install.sh b/translator/tests/data/artifacts/wordpress/wordpress_install.sh similarity index 100% rename from translator/toscalib/tests/artifacts/wordpress/wordpress_install.sh rename to translator/tests/data/artifacts/wordpress/wordpress_install.sh diff --git a/translator/toscalib/tests/data/custom_types/collectd.yaml b/translator/tests/data/custom_types/collectd.yaml similarity index 100% rename from translator/toscalib/tests/data/custom_types/collectd.yaml rename to translator/tests/data/custom_types/collectd.yaml diff --git a/translator/toscalib/tests/data/custom_types/elasticsearch.yaml b/translator/tests/data/custom_types/elasticsearch.yaml similarity index 100% rename from translator/toscalib/tests/data/custom_types/elasticsearch.yaml rename to translator/tests/data/custom_types/elasticsearch.yaml diff --git a/translator/toscalib/tests/data/custom_types/kibana.yaml b/translator/tests/data/custom_types/kibana.yaml similarity index 100% rename from translator/toscalib/tests/data/custom_types/kibana.yaml rename to translator/tests/data/custom_types/kibana.yaml diff --git a/translator/toscalib/tests/data/custom_types/logstash.yaml b/translator/tests/data/custom_types/logstash.yaml similarity index 100% rename from translator/toscalib/tests/data/custom_types/logstash.yaml rename to translator/tests/data/custom_types/logstash.yaml diff --git a/translator/toscalib/tests/data/custom_types/paypalpizzastore_nodejs_app.yaml b/translator/tests/data/custom_types/paypalpizzastore_nodejs_app.yaml similarity index 100% rename from translator/toscalib/tests/data/custom_types/paypalpizzastore_nodejs_app.yaml rename to translator/tests/data/custom_types/paypalpizzastore_nodejs_app.yaml diff --git a/translator/toscalib/tests/data/custom_types/rsyslog.yaml b/translator/tests/data/custom_types/rsyslog.yaml similarity index 100% rename from translator/toscalib/tests/data/custom_types/rsyslog.yaml rename to translator/tests/data/custom_types/rsyslog.yaml diff --git a/translator/toscalib/tests/data/custom_types/wordpress.yaml b/translator/tests/data/custom_types/wordpress.yaml similarity index 100% rename from translator/toscalib/tests/data/custom_types/wordpress.yaml rename to translator/tests/data/custom_types/wordpress.yaml diff --git a/translator/toscalib/tests/data/hot_output/hot_elk.yaml b/translator/tests/data/hot_output/hot_elk.yaml similarity index 100% rename from translator/toscalib/tests/data/hot_output/hot_elk.yaml rename to translator/tests/data/hot_output/hot_elk.yaml diff --git a/translator/toscalib/tests/data/hot_output/hot_host_assignment.yaml b/translator/tests/data/hot_output/hot_host_assignment.yaml similarity index 100% rename from translator/toscalib/tests/data/hot_output/hot_host_assignment.yaml rename to translator/tests/data/hot_output/hot_host_assignment.yaml diff --git a/translator/toscalib/tests/data/hot_output/hot_nodejs_mongodb_two_instances.yaml b/translator/tests/data/hot_output/hot_nodejs_mongodb_two_instances.yaml similarity index 100% rename from translator/toscalib/tests/data/hot_output/hot_nodejs_mongodb_two_instances.yaml rename to translator/tests/data/hot_output/hot_nodejs_mongodb_two_instances.yaml diff --git a/translator/toscalib/tests/data/hot_output/hot_single_instance_wordpress.yaml b/translator/tests/data/hot_output/hot_single_instance_wordpress.yaml similarity index 100% rename from translator/toscalib/tests/data/hot_output/hot_single_instance_wordpress.yaml rename to translator/tests/data/hot_output/hot_single_instance_wordpress.yaml diff --git a/translator/toscalib/tests/data/hot_output/hot_single_object_store.yaml b/translator/tests/data/hot_output/hot_single_object_store.yaml similarity index 100% rename from translator/toscalib/tests/data/hot_output/hot_single_object_store.yaml rename to translator/tests/data/hot_output/hot_single_object_store.yaml diff --git a/translator/toscalib/tests/data/hot_output/hot_single_server.yaml b/translator/tests/data/hot_output/hot_single_server.yaml similarity index 100% rename from translator/toscalib/tests/data/hot_output/hot_single_server.yaml rename to translator/tests/data/hot_output/hot_single_server.yaml diff --git a/translator/toscalib/tests/data/hot_output/hot_software_component.yaml b/translator/tests/data/hot_output/hot_software_component.yaml similarity index 100% rename from translator/toscalib/tests/data/hot_output/hot_software_component.yaml rename to translator/tests/data/hot_output/hot_software_component.yaml diff --git a/translator/toscalib/tests/data/hot_output/hot_tosca_helloworld.yaml b/translator/tests/data/hot_output/hot_tosca_helloworld.yaml similarity index 100% rename from translator/toscalib/tests/data/hot_output/hot_tosca_helloworld.yaml rename to translator/tests/data/hot_output/hot_tosca_helloworld.yaml diff --git a/translator/toscalib/tests/data/hot_output/hot_web_application.yaml b/translator/tests/data/hot_output/hot_web_application.yaml similarity index 100% rename from translator/toscalib/tests/data/hot_output/hot_web_application.yaml rename to translator/tests/data/hot_output/hot_web_application.yaml diff --git a/translator/toscalib/tests/data/hot_output/network/hot_one_server_one_network.yaml b/translator/tests/data/hot_output/network/hot_one_server_one_network.yaml similarity index 100% rename from translator/toscalib/tests/data/hot_output/network/hot_one_server_one_network.yaml rename to translator/tests/data/hot_output/network/hot_one_server_one_network.yaml diff --git a/translator/toscalib/tests/data/hot_output/network/hot_one_server_three_networks.yaml b/translator/tests/data/hot_output/network/hot_one_server_three_networks.yaml similarity index 100% rename from translator/toscalib/tests/data/hot_output/network/hot_one_server_three_networks.yaml rename to translator/tests/data/hot_output/network/hot_one_server_three_networks.yaml diff --git a/translator/toscalib/tests/data/hot_output/network/hot_server_on_existing_network.yaml b/translator/tests/data/hot_output/network/hot_server_on_existing_network.yaml similarity index 100% rename from translator/toscalib/tests/data/hot_output/network/hot_server_on_existing_network.yaml rename to translator/tests/data/hot_output/network/hot_server_on_existing_network.yaml diff --git a/translator/toscalib/tests/data/hot_output/network/hot_two_servers_one_network.yaml b/translator/tests/data/hot_output/network/hot_two_servers_one_network.yaml similarity index 100% rename from translator/toscalib/tests/data/hot_output/network/hot_two_servers_one_network.yaml rename to translator/tests/data/hot_output/network/hot_two_servers_one_network.yaml diff --git a/translator/toscalib/tests/data/hot_output/storage/hot_blockstorage_with_attachment.yaml b/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment.yaml similarity index 100% rename from translator/toscalib/tests/data/hot_output/storage/hot_blockstorage_with_attachment.yaml rename to translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment.yaml diff --git a/translator/toscalib/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation1_alt1.yaml b/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation1_alt1.yaml similarity index 100% rename from translator/toscalib/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation1_alt1.yaml rename to translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation1_alt1.yaml diff --git a/translator/toscalib/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation1_alt2.yaml b/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation1_alt2.yaml similarity index 100% rename from translator/toscalib/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation1_alt2.yaml rename to translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation1_alt2.yaml diff --git a/translator/toscalib/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation2_alt1.yaml b/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation2_alt1.yaml similarity index 100% rename from translator/toscalib/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation2_alt1.yaml rename to translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation2_alt1.yaml diff --git a/translator/toscalib/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation2_alt2.yaml b/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation2_alt2.yaml similarity index 100% rename from translator/toscalib/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation2_alt2.yaml rename to translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation2_alt2.yaml diff --git a/translator/toscalib/tests/data/hot_output/storage/hot_blockstorage_with_custom_relationship_type.yaml b/translator/tests/data/hot_output/storage/hot_blockstorage_with_custom_relationship_type.yaml similarity index 100% rename from translator/toscalib/tests/data/hot_output/storage/hot_blockstorage_with_custom_relationship_type.yaml rename to translator/tests/data/hot_output/storage/hot_blockstorage_with_custom_relationship_type.yaml diff --git a/translator/toscalib/tests/data/hot_output/storage/hot_blockstorage_with_relationship_template.yaml b/translator/tests/data/hot_output/storage/hot_blockstorage_with_relationship_template.yaml similarity index 100% rename from translator/toscalib/tests/data/hot_output/storage/hot_blockstorage_with_relationship_template.yaml rename to translator/tests/data/hot_output/storage/hot_blockstorage_with_relationship_template.yaml diff --git a/translator/toscalib/tests/data/hot_output/storage/hot_multiple_blockstorage_with_attachment_alt1.yaml b/translator/tests/data/hot_output/storage/hot_multiple_blockstorage_with_attachment_alt1.yaml similarity index 100% rename from translator/toscalib/tests/data/hot_output/storage/hot_multiple_blockstorage_with_attachment_alt1.yaml rename to translator/tests/data/hot_output/storage/hot_multiple_blockstorage_with_attachment_alt1.yaml diff --git a/translator/toscalib/tests/data/hot_output/storage/hot_multiple_blockstorage_with_attachment_alt2.yaml b/translator/tests/data/hot_output/storage/hot_multiple_blockstorage_with_attachment_alt2.yaml similarity index 100% rename from translator/toscalib/tests/data/hot_output/storage/hot_multiple_blockstorage_with_attachment_alt2.yaml rename to translator/tests/data/hot_output/storage/hot_multiple_blockstorage_with_attachment_alt2.yaml diff --git a/translator/toscalib/tests/data/network/tosca_one_server_one_network.yaml b/translator/tests/data/network/tosca_one_server_one_network.yaml similarity index 100% rename from translator/toscalib/tests/data/network/tosca_one_server_one_network.yaml rename to translator/tests/data/network/tosca_one_server_one_network.yaml diff --git a/translator/toscalib/tests/data/network/tosca_one_server_three_networks.yaml b/translator/tests/data/network/tosca_one_server_three_networks.yaml similarity index 100% rename from translator/toscalib/tests/data/network/tosca_one_server_three_networks.yaml rename to translator/tests/data/network/tosca_one_server_three_networks.yaml diff --git a/translator/toscalib/tests/data/network/tosca_server_on_existing_network.yaml b/translator/tests/data/network/tosca_server_on_existing_network.yaml similarity index 100% rename from translator/toscalib/tests/data/network/tosca_server_on_existing_network.yaml rename to translator/tests/data/network/tosca_server_on_existing_network.yaml diff --git a/translator/toscalib/tests/data/network/tosca_two_servers_one_network.yaml b/translator/tests/data/network/tosca_two_servers_one_network.yaml similarity index 100% rename from translator/toscalib/tests/data/network/tosca_two_servers_one_network.yaml rename to translator/tests/data/network/tosca_two_servers_one_network.yaml diff --git a/translator/toscalib/tests/data/storage/tosca_blockstorage_with_attachment.yaml b/translator/tests/data/storage/tosca_blockstorage_with_attachment.yaml similarity index 100% rename from translator/toscalib/tests/data/storage/tosca_blockstorage_with_attachment.yaml rename to translator/tests/data/storage/tosca_blockstorage_with_attachment.yaml diff --git a/translator/toscalib/tests/data/storage/tosca_blockstorage_with_attachment_notation1.yaml b/translator/tests/data/storage/tosca_blockstorage_with_attachment_notation1.yaml similarity index 100% rename from translator/toscalib/tests/data/storage/tosca_blockstorage_with_attachment_notation1.yaml rename to translator/tests/data/storage/tosca_blockstorage_with_attachment_notation1.yaml diff --git a/translator/toscalib/tests/data/storage/tosca_blockstorage_with_attachment_notation2.yaml b/translator/tests/data/storage/tosca_blockstorage_with_attachment_notation2.yaml similarity index 100% rename from translator/toscalib/tests/data/storage/tosca_blockstorage_with_attachment_notation2.yaml rename to translator/tests/data/storage/tosca_blockstorage_with_attachment_notation2.yaml diff --git a/translator/toscalib/tests/data/storage/tosca_blockstorage_with_custom_relationship_type.yaml b/translator/tests/data/storage/tosca_blockstorage_with_custom_relationship_type.yaml similarity index 100% rename from translator/toscalib/tests/data/storage/tosca_blockstorage_with_custom_relationship_type.yaml rename to translator/tests/data/storage/tosca_blockstorage_with_custom_relationship_type.yaml diff --git a/translator/toscalib/tests/data/storage/tosca_blockstorage_with_relationship_template.yaml b/translator/tests/data/storage/tosca_blockstorage_with_relationship_template.yaml similarity index 100% rename from translator/toscalib/tests/data/storage/tosca_blockstorage_with_relationship_template.yaml rename to translator/tests/data/storage/tosca_blockstorage_with_relationship_template.yaml diff --git a/translator/toscalib/tests/data/storage/tosca_multiple_blockstorage_with_attachment.yaml b/translator/tests/data/storage/tosca_multiple_blockstorage_with_attachment.yaml similarity index 100% rename from translator/toscalib/tests/data/storage/tosca_multiple_blockstorage_with_attachment.yaml rename to translator/tests/data/storage/tosca_multiple_blockstorage_with_attachment.yaml diff --git a/translator/toscalib/tests/data/storage/tosca_single_object_store.yaml b/translator/tests/data/storage/tosca_single_object_store.yaml similarity index 100% rename from translator/toscalib/tests/data/storage/tosca_single_object_store.yaml rename to translator/tests/data/storage/tosca_single_object_store.yaml diff --git a/translator/toscalib/tests/data/test_host_assignment.yaml b/translator/tests/data/test_host_assignment.yaml similarity index 100% rename from translator/toscalib/tests/data/test_host_assignment.yaml rename to translator/tests/data/test_host_assignment.yaml diff --git a/translator/toscalib/tests/data/tosca_elk.yaml b/translator/tests/data/tosca_elk.yaml similarity index 100% rename from translator/toscalib/tests/data/tosca_elk.yaml rename to translator/tests/data/tosca_elk.yaml diff --git a/translator/toscalib/tests/data/tosca_helloworld.yaml b/translator/tests/data/tosca_helloworld.yaml similarity index 100% rename from translator/toscalib/tests/data/tosca_helloworld.yaml rename to translator/tests/data/tosca_helloworld.yaml diff --git a/translator/toscalib/tests/data/tosca_nodejs_mongodb_two_instances.yaml b/translator/tests/data/tosca_nodejs_mongodb_two_instances.yaml similarity index 100% rename from translator/toscalib/tests/data/tosca_nodejs_mongodb_two_instances.yaml rename to translator/tests/data/tosca_nodejs_mongodb_two_instances.yaml diff --git a/translator/toscalib/tests/data/tosca_single_instance_wordpress.yaml b/translator/tests/data/tosca_single_instance_wordpress.yaml similarity index 100% rename from translator/toscalib/tests/data/tosca_single_instance_wordpress.yaml rename to translator/tests/data/tosca_single_instance_wordpress.yaml diff --git a/translator/toscalib/tests/data/tosca_single_server.yaml b/translator/tests/data/tosca_single_server.yaml similarity index 100% rename from translator/toscalib/tests/data/tosca_single_server.yaml rename to translator/tests/data/tosca_single_server.yaml diff --git a/translator/toscalib/tests/data/tosca_software_component.yaml b/translator/tests/data/tosca_software_component.yaml similarity index 100% rename from translator/toscalib/tests/data/tosca_software_component.yaml rename to translator/tests/data/tosca_software_component.yaml diff --git a/translator/toscalib/tests/data/tosca_web_application.yaml b/translator/tests/data/tosca_web_application.yaml similarity index 100% rename from translator/toscalib/tests/data/tosca_web_application.yaml rename to translator/tests/data/tosca_web_application.yaml diff --git a/translator/tests/test_template.py b/translator/tests/test_template.py index 7fa0c90e..7d4f4414 100755 --- a/translator/tests/test_template.py +++ b/translator/tests/test_template.py @@ -23,7 +23,7 @@ class ToscaMongoNodejsTest(TestCase): '''TOSCA template with nodejs, app and mongodb on 2 servers.''' tosca_tpl = os.path.join( os.path.dirname(os.path.abspath(__file__)), - "../toscalib/tests/data/tosca_nodejs_mongodb_two_instances.yaml") + "../tests/data/tosca_nodejs_mongodb_two_instances.yaml") tosca = ToscaTemplate(tosca_tpl, parsed_params) def test_relationship_def(self): diff --git a/translator/tests/test_tosca_hot_translation.py b/translator/tests/test_tosca_hot_translation.py index 2a47d49a..f3c995ff 100644 --- a/translator/tests/test_tosca_hot_translation.py +++ b/translator/tests/test_tosca_hot_translation.py @@ -19,8 +19,8 @@ class ToscaHotTranslationTest(TestCase): def test_hot_translate_single_server(self): tosca_file = \ - '../toscalib/tests/data/tosca_single_server.yaml' - hot_file = '../toscalib/tests/data/hot_output/hot_single_server.yaml' + '../tests/data/tosca_single_server.yaml' + hot_file = '../tests/data/hot_output/hot_single_server.yaml' params = {'cpus': 1} diff = TranslationUtils.compare_tosca_translation_with_hot(tosca_file, hot_file, @@ -30,8 +30,8 @@ class ToscaHotTranslationTest(TestCase): def test_hot_translate_wordpress_single_instance(self): tosca_file = \ - '../toscalib/tests/data/tosca_single_instance_wordpress.yaml' - hot_file = '../toscalib/tests/data/hot_output/' \ + '../tests/data/tosca_single_instance_wordpress.yaml' + hot_file = '../tests/data/hot_output/' \ 'hot_single_instance_wordpress.yaml' params = {'db_name': 'wordpress', 'db_user': 'wp_user', @@ -47,8 +47,8 @@ class ToscaHotTranslationTest(TestCase): def test_hot_translate_helloworld(self): tosca_file = \ - '../toscalib/tests/data/tosca_helloworld.yaml' - hot_file = '../toscalib/tests/data/hot_output/' \ + '../tests/data/tosca_helloworld.yaml' + hot_file = '../tests/data/hot_output/' \ 'hot_tosca_helloworld.yaml' diff = TranslationUtils.compare_tosca_translation_with_hot(tosca_file, hot_file, @@ -58,8 +58,8 @@ class ToscaHotTranslationTest(TestCase): def test_hot_translate_host_assignment(self): tosca_file = \ - '../toscalib/tests/data/test_host_assignment.yaml' - hot_file = '../toscalib/tests/data/hot_output/' \ + '../tests/data/test_host_assignment.yaml' + hot_file = '../tests/data/hot_output/' \ 'hot_host_assignment.yaml' diff = TranslationUtils.compare_tosca_translation_with_hot(tosca_file, hot_file, @@ -69,8 +69,8 @@ class ToscaHotTranslationTest(TestCase): def test_hot_translate_elk(self): tosca_file = \ - '../toscalib/tests/data/tosca_elk.yaml' - hot_file = '../toscalib/tests/data/hot_output/hot_elk.yaml' + '../tests/data/tosca_elk.yaml' + hot_file = '../tests/data/hot_output/hot_elk.yaml' params = {'github_url': 'http://github.com/paypal/rest-api-sample-app-nodejs.git', 'my_cpus': 4} @@ -82,8 +82,8 @@ class ToscaHotTranslationTest(TestCase): def test_hot_translate_nodejs_mongodb_two_instances(self): tosca_file = \ - '../toscalib/tests/data/tosca_nodejs_mongodb_two_instances.yaml' - hot_file = '../toscalib/tests/data/hot_output/' \ + '../tests/data/tosca_nodejs_mongodb_two_instances.yaml' + hot_file = '../tests/data/hot_output/' \ 'hot_nodejs_mongodb_two_instances.yaml' params = {'github_url': 'http://github.com/paypal/rest-api-sample-app-nodejs.git', @@ -96,9 +96,9 @@ class ToscaHotTranslationTest(TestCase): def test_hot_translate_blockstorage_with_attachment(self): tosca_file = \ - '../toscalib/tests/data/storage/' \ + '../tests/data/storage/' \ 'tosca_blockstorage_with_attachment.yaml' - hot_file = '../toscalib/tests/data/hot_output/storage/' \ + hot_file = '../tests/data/hot_output/storage/' \ 'hot_blockstorage_with_attachment.yaml' params = {'cpus': 1, 'storage_location': '/dev/vdc', @@ -112,9 +112,9 @@ class ToscaHotTranslationTest(TestCase): def test_hot_translate_blockstorage_with_custom_relationship_type(self): tosca_file = \ - '../toscalib/tests/data/storage/' \ + '../tests/data/storage/' \ 'tosca_blockstorage_with_custom_relationship_type.yaml' - hot_file = '../toscalib/tests/data/hot_output/storage/' \ + hot_file = '../tests/data/hot_output/storage/' \ 'hot_blockstorage_with_custom_relationship_type.yaml' params = {'cpus': 1, 'storage_location': '/dev/vdc', @@ -128,9 +128,9 @@ class ToscaHotTranslationTest(TestCase): def test_hot_translate_blockstorage_with_relationship_template(self): tosca_file = \ - '../toscalib/tests/data/storage/' \ + '../tests/data/storage/' \ 'tosca_blockstorage_with_relationship_template.yaml' - hot_file = '../toscalib/tests/data/hot_output/storage/' \ + hot_file = '../tests/data/hot_output/storage/' \ 'hot_blockstorage_with_relationship_template.yaml' params = {'cpus': 1, 'storage_location': '/dev/vdc', @@ -143,11 +143,11 @@ class ToscaHotTranslationTest(TestCase): def test_hot_translate_blockstorage_with_attachment_notation1(self): tosca_file = \ - '../toscalib/tests/data/storage/' \ + '../tests/data/storage/' \ 'tosca_blockstorage_with_attachment_notation1.yaml' - hot_file1 = '../toscalib/tests/data/hot_output/storage/' \ + hot_file1 = '../tests/data/hot_output/storage/' \ 'hot_blockstorage_with_attachment_notation1_alt1.yaml' - hot_file2 = '../toscalib/tests/data/hot_output/storage/' \ + hot_file2 = '../tests/data/hot_output/storage/' \ 'hot_blockstorage_with_attachment_notation1_alt2.yaml' params = {'cpus': 1, 'storage_location': 'some_folder', @@ -169,11 +169,11 @@ class ToscaHotTranslationTest(TestCase): def test_hot_translate_blockstorage_with_attachment_notation2(self): tosca_file = \ - '../toscalib/tests/data/storage/' \ + '../tests/data/storage/' \ 'tosca_blockstorage_with_attachment_notation2.yaml' - hot_file1 = '../toscalib/tests/data/hot_output/storage/' \ + hot_file1 = '../tests/data/hot_output/storage/' \ 'hot_blockstorage_with_attachment_notation2_alt1.yaml' - hot_file2 = '../toscalib/tests/data/hot_output/storage/' \ + hot_file2 = '../tests/data/hot_output/storage/' \ 'hot_blockstorage_with_attachment_notation2_alt2.yaml' params = {'cpus': 1, 'storage_location': '/dev/vdc', @@ -195,11 +195,11 @@ class ToscaHotTranslationTest(TestCase): def test_hot_translate_multiple_blockstorage_with_attachment(self): tosca_file = \ - '../toscalib/tests/data/storage/' \ + '../tests/data/storage/' \ 'tosca_multiple_blockstorage_with_attachment.yaml' - hot_file1 = '../toscalib/tests/data/hot_output/storage/' \ + hot_file1 = '../tests/data/hot_output/storage/' \ 'hot_multiple_blockstorage_with_attachment_alt1.yaml' - hot_file2 = '../toscalib/tests/data/hot_output/storage/' \ + hot_file2 = '../tests/data/hot_output/storage/' \ 'hot_multiple_blockstorage_with_attachment_alt2.yaml' params = {'cpus': 1, 'storage_location': '/dev/vdc', @@ -221,8 +221,8 @@ class ToscaHotTranslationTest(TestCase): def test_hot_translate_single_object_store(self): tosca_file = \ - '../toscalib/tests/data/storage/tosca_single_object_store.yaml' - hot_file = '../toscalib/tests/data/hot_output/' \ + '../tests/data/storage/tosca_single_object_store.yaml' + hot_file = '../tests/data/hot_output/' \ 'hot_single_object_store.yaml' params = {'objectstore_name': 'myobjstore'} diff = TranslationUtils.compare_tosca_translation_with_hot(tosca_file, @@ -233,8 +233,8 @@ class ToscaHotTranslationTest(TestCase): def test_hot_translate_one_server_one_network(self): tosca_file = \ - '../toscalib/tests/data/network/tosca_one_server_one_network.yaml' - hot_file = '../toscalib/tests/data/hot_output/network/' \ + '../tests/data/network/tosca_one_server_one_network.yaml' + hot_file = '../tests/data/hot_output/network/' \ 'hot_one_server_one_network.yaml' params = {'network_name': 'private_net'} diff = TranslationUtils.compare_tosca_translation_with_hot(tosca_file, @@ -244,9 +244,9 @@ class ToscaHotTranslationTest(TestCase): json.dumps(diff, indent=4, separators=(', ', ': '))) def test_hot_translate_server_on_existing_network(self): - tosca_file = '../toscalib/tests/data/network/' \ + tosca_file = '../tests/data/network/' \ 'tosca_server_on_existing_network.yaml' - hot_file = '../toscalib/tests/data/hot_output/network/' \ + hot_file = '../tests/data/hot_output/network/' \ 'hot_server_on_existing_network.yaml' params = {'network_name': 'private_net'} diff = TranslationUtils.compare_tosca_translation_with_hot(tosca_file, @@ -257,8 +257,8 @@ class ToscaHotTranslationTest(TestCase): def test_hot_translate_two_servers_one_network(self): tosca_file = \ - '../toscalib/tests/data/network/tosca_two_servers_one_network.yaml' - hot_file = '../toscalib/tests/data/hot_output/network/' \ + '../tests/data/network/tosca_two_servers_one_network.yaml' + hot_file = '../tests/data/hot_output/network/' \ 'hot_two_servers_one_network.yaml' params = {'network_name': 'my_private_net', 'network_cidr': '10.0.0.0/24', @@ -271,9 +271,9 @@ class ToscaHotTranslationTest(TestCase): json.dumps(diff, indent=4, separators=(', ', ': '))) def test_hot_translate_one_server_three_networks(self): - tosca_file = '../toscalib/tests/data/network/' \ + tosca_file = '../tests/data/network/' \ 'tosca_one_server_three_networks.yaml' - hot_file = '../toscalib/tests/data/hot_output/network/' \ + hot_file = '../tests/data/hot_output/network/' \ 'hot_one_server_three_networks.yaml' params = {} diff = TranslationUtils.compare_tosca_translation_with_hot(tosca_file, @@ -283,8 +283,8 @@ class ToscaHotTranslationTest(TestCase): json.dumps(diff, indent=4, separators=(', ', ': '))) def test_hot_translate_software_component(self): - tosca_file = '../toscalib/tests/data/tosca_software_component.yaml' - hot_file = '../toscalib/tests/data/hot_output/' \ + tosca_file = '../tests/data/tosca_software_component.yaml' + hot_file = '../tests/data/hot_output/' \ 'hot_software_component.yaml' params = {'cpus': '1', 'download_url': 'http://www.software.com/download'} @@ -295,8 +295,8 @@ class ToscaHotTranslationTest(TestCase): json.dumps(diff, indent=4, separators=(', ', ': '))) def test_hot_translate_web_application(self): - tosca_file = '../toscalib/tests/data/tosca_web_application.yaml' - hot_file = '../toscalib/tests/data/hot_output/hot_web_application.yaml' + tosca_file = '../tests/data/tosca_web_application.yaml' + hot_file = '../tests/data/hot_output/hot_web_application.yaml' params = {'cpus': '2', 'context_root': 'my_web_app'} diff = TranslationUtils.compare_tosca_translation_with_hot(tosca_file, hot_file, diff --git a/translator/tests/test_utils.py b/translator/tests/test_utils.py index f5f6aa2c..84dc3ed7 100644 --- a/translator/tests/test_utils.py +++ b/translator/tests/test_utils.py @@ -172,7 +172,7 @@ class CommonUtilsTest(TestCase): def test_yamlutils_get_dict(self): yaml_file = os.path.join( os.path.dirname(os.path.abspath(__file__)), - '../toscalib/tests/data/custom_types/rsyslog.yaml') + '../tests/data/custom_types/rsyslog.yaml') dict = \ {'tosca_definitions_version': 'tosca_simple_yaml_1_0', 'description': @@ -190,10 +190,10 @@ class CommonUtilsTest(TestCase): def test_yamlutils_compare_yamls(self): yaml_file1 = os.path.join( os.path.dirname(os.path.abspath(__file__)), - '../toscalib/tests/data/custom_types/kibana.yaml') + '../tests/data/custom_types/kibana.yaml') yaml_file2 = os.path.join( os.path.dirname(os.path.abspath(__file__)), - '../toscalib/tests/data/custom_types/collectd.yaml') + '../tests/data/custom_types/collectd.yaml') self.assertEqual(True, self.yamlUtils.compare_yamls(yaml_file1, yaml_file1)) self.assertEqual(False, @@ -202,10 +202,10 @@ class CommonUtilsTest(TestCase): def test_yamlutils_compare_yaml_dict(self): yaml_file1 = os.path.join( os.path.dirname(os.path.abspath(__file__)), - '../toscalib/tests/data/custom_types/rsyslog.yaml') + '../tests/data/custom_types/rsyslog.yaml') yaml_file2 = os.path.join( os.path.dirname(os.path.abspath(__file__)), - '../toscalib/tests/data/custom_types/collectd.yaml') + '../tests/data/custom_types/collectd.yaml') dict = \ {'tosca_definitions_version': 'tosca_simple_yaml_1_0', 'description': diff --git a/translator/toscalib/__init__.py b/translator/toscalib/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/translator/toscalib/tests/__init__.py b/translator/toscalib/tests/__init__.py deleted file mode 100644 index e69de29b..00000000