Arrange unit test codes according to tested code directory

Change-Id: Iefd2e6c016f15d5760ea9cba872a09dada75ed11
Closes-bug: 1673694
changes/90/446890/2
yong sheng gong 6 years ago committed by gong yong sheng
parent d5623bef8b
commit ac580099c1
  1. 2
      tacker/tests/unit/db/utils.py
  2. 0
      tacker/tests/unit/nfvo/__init__.py
  3. 0
      tacker/tests/unit/nfvo/drivers/__init__.py
  4. 0
      tacker/tests/unit/nfvo/drivers/vim/__init__.py
  5. 0
      tacker/tests/unit/nfvo/drivers/vim/test_openstack_driver.py
  6. 0
      tacker/tests/unit/nfvo/drivers/vnffg/__init__.py
  7. 0
      tacker/tests/unit/nfvo/drivers/vnffg/sfc_drivers/__init__.py
  8. 0
      tacker/tests/unit/nfvo/drivers/vnffg/sfc_drivers/networking-sfc/__init__.py
  9. 0
      tacker/tests/unit/nfvo/drivers/vnffg/sfc_drivers/networking-sfc/test_n_sfc.py
  10. 0
      tacker/tests/unit/nfvo/drivers/workflow/__init__.py
  11. 0
      tacker/tests/unit/nfvo/drivers/workflow/test_mistral.py
  12. 2
      tacker/tests/unit/nfvo/test_nfvo_plugin.py
  13. 0
      tacker/tests/unit/test_alarm_receiver.py
  14. 2
      tacker/tests/unit/test_tosca_templates_under_samples.py
  15. 0
      tacker/tests/unit/vm/nfvo/drivers/workflow/__init__.py
  16. 0
      tacker/tests/unit/vnfm/infra_drivers/__init__.py
  17. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/__init__.py
  18. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/config_data.yaml
  19. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/hot_alarm_scale_custom.yaml
  20. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/hot_flavor.yaml
  21. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/hot_flavor_and_capabilities.yaml
  22. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/hot_flavor_defaults.yaml
  23. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/hot_flavor_no_units.yaml
  24. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/hot_image_after_processed_image.yaml
  25. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/hot_image_before_processed_image.yaml
  26. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/hot_openwrt.yaml
  27. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/hot_openwrt_ipparams.yaml
  28. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/hot_openwrt_params.yaml
  29. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/hot_scale_custom.yaml
  30. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/hot_scale_main.yaml
  31. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/hot_tosca_alarm_metadata.yaml
  32. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/hot_tosca_alarm_respawn.yaml
  33. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/hot_tosca_alarm_scale.yaml
  34. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/hot_tosca_flavor_all_numa_count.yaml
  35. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/hot_tosca_flavor_all_numa_nodes.yaml
  36. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/hot_tosca_flavor_cpu_allocations.yaml
  37. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/hot_tosca_flavor_huge_pages.yaml
  38. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/hot_tosca_flavor_numa_nodes.yaml
  39. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/hot_tosca_flavor_numa_nodes_count.yaml
  40. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/hot_tosca_generic_vnfd_params.yaml
  41. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/hot_tosca_image.yaml
  42. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/hot_tosca_mac_ip.yaml
  43. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/hot_tosca_mgmt_sriov.yaml
  44. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/hot_tosca_openwrt.yaml
  45. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/hot_tosca_openwrt_kilo.yaml
  46. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/hot_tosca_openwrt_userdata.yaml
  47. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/hot_tosca_security_groups.yaml
  48. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/hot_tosca_sriov.yaml
  49. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/hot_tosca_vnfc.yaml
  50. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/hot_tosca_vnic_normal.yaml
  51. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/test_tosca_flavor.yaml
  52. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/test_tosca_flavor_and_capabilities.yaml
  53. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/test_tosca_flavor_defaults.yaml
  54. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/test_tosca_flavor_no_units.yaml
  55. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/test_tosca_image.yaml
  56. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/test_tosca_mac_ip.yaml
  57. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/test_tosca_openwrt.yaml
  58. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/test_tosca_openwrt_userdata.yaml
  59. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/test_tosca_security_groups.yaml
  60. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/test_tosca_vnfc.yaml
  61. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/test_tosca_vnfd_alarm_respawn.yaml
  62. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/test_tosca_vnfd_alarm_scale.yaml
  63. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/tosca_alarm_metadata.yaml
  64. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/tosca_alarm_respawn.yaml
  65. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/tosca_alarm_scale.yaml
  66. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/tosca_flavor_all_numa_count.yaml
  67. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/tosca_flavor_all_numa_nodes.yaml
  68. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/tosca_flavor_cpu_allocations.yaml
  69. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/tosca_flavor_huge_pages.yaml
  70. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/tosca_flavor_numa_nodes.yaml
  71. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/tosca_flavor_numa_nodes_count.yaml
  72. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/tosca_generic_vnfd_params.yaml
  73. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/tosca_invalid_vnffgd_template.yaml
  74. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/tosca_mgmt_sriov.yaml
  75. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/tosca_nsd_template.yaml
  76. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/tosca_scale.yaml
  77. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/tosca_sriov.yaml
  78. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/tosca_vnffgd_param_template.yaml
  79. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/tosca_vnffgd_template.yaml
  80. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/tosca_vnic_port.yaml
  81. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/update_config_data.yaml
  82. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/vnffg_params.yaml
  83. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/data/vnffgd_template.yaml
  84. 0
      tacker/tests/unit/vnfm/infra_drivers/openstack/test_openstack.py
  85. 0
      tacker/tests/unit/vnfm/monitor_drivers/__init__.py
  86. 0
      tacker/tests/unit/vnfm/monitor_drivers/http_ping/__init__.py
  87. 0
      tacker/tests/unit/vnfm/monitor_drivers/http_ping/test_http_ping.py
  88. 0
      tacker/tests/unit/vnfm/monitor_drivers/ping/__init__.py
  89. 0
      tacker/tests/unit/vnfm/monitor_drivers/ping/test_ping.py
  90. 0
      tacker/tests/unit/vnfm/test_monitor.py
  91. 0
      tacker/tests/unit/vnfm/test_plugin.py
  92. 0
      tacker/tests/unit/vnfm/test_vim_client.py
  93. 0
      tacker/tests/unit/vnfm/tosca/test_utils.py

@ -21,7 +21,7 @@ import yaml
def _get_template(name):
filename = os.path.join(
os.path.dirname(os.path.abspath(__file__)),
"../vm/infra_drivers/openstack/data/", name)
"../vnfm/infra_drivers/openstack/data/", name)
f = codecs.open(filename, encoding='utf-8', errors='strict')
return f.read()

@ -48,7 +48,7 @@ def dummy_get_vim(*args, **kwargs):
def _get_template(name):
filename = os.path.abspath(os.path.join(os.path.dirname(__file__),
'../../../etc/samples/' + str(name)))
'../../etc/samples/' + str(name)))
f = codecs.open(filename, encoding='utf-8', errors='strict')
return f.read()

@ -33,7 +33,7 @@ class TestSamples(testtools.TestCase):
def _get_list_of_sample(self, tosca_files):
if tosca_files:
base_path = (os.path.dirname(os.path.abspath(__file__)) +
'/../../../../samples/tosca-templates/vnfd/')
'/../../../samples/tosca-templates/vnfd/')
if isinstance(tosca_files, list):
list_of_samples = []
for tosca_file in tosca_files:
Loading…
Cancel
Save