From 980caf9de32c2a8a04415d584b968f7582abcd75 Mon Sep 17 00:00:00 2001 From: Cristina Pauna Date: Wed, 29 May 2019 15:13:52 +0300 Subject: [PATCH] Organize file structure for tests Reorganized the tests following these rules - all tests have been put under *tests* folder - all tests are organised under folders named by their correspondent layer bluval.py was modified to reflect the changes TODO: each layer under *tests* folder should have a correspondent layer in the *docker* folder Signed-off-by: Cristina Pauna Change-Id: Ifdd46ee22b6d009eb17475c5e2efd8bd9f37c3ad --- .coafile | 2 +- bluval/bluval.py | 6 ++++-- .../hardware/bios_version}/bios_version_dell.robot | 0 {conformance => tests/k8s/conformance}/conformance.robot | 0 {conformance => tests/k8s/conformance}/sonobuoy.yaml | 0 {ha => tests/k8s/ha}/ha_calico_dns_proxy.robot | 0 {ha => tests/k8s/ha}/ha_etcd_api_ctl_sch.robot | 0 {ha => tests/k8s/ha}/ha_services.robot | 0 {ha => tests/k8s/ha}/ha_worker.robot | 0 {helloworld => tests/networking/helloworld}/helloworld.robot | 0 {ceph => tests/openstack/ceph_service}/ceph_service.resource | 0 {ceph => tests/openstack/ceph_service}/ceph_service.robot | 0 {ceph => tests/openstack/ceph_service}/variables.resource | 0 13 files changed, 5 insertions(+), 3 deletions(-) rename {bios_version => tests/hardware/bios_version}/bios_version_dell.robot (100%) rename {conformance => tests/k8s/conformance}/conformance.robot (100%) rename {conformance => tests/k8s/conformance}/sonobuoy.yaml (100%) rename {ha => tests/k8s/ha}/ha_calico_dns_proxy.robot (100%) rename {ha => tests/k8s/ha}/ha_etcd_api_ctl_sch.robot (100%) rename {ha => tests/k8s/ha}/ha_services.robot (100%) rename {ha => tests/k8s/ha}/ha_worker.robot (100%) rename {helloworld => tests/networking/helloworld}/helloworld.robot (100%) rename {ceph => tests/openstack/ceph_service}/ceph_service.resource (100%) rename {ceph => tests/openstack/ceph_service}/ceph_service.robot (100%) rename {ceph => tests/openstack/ceph_service}/variables.resource (100%) diff --git a/.coafile b/.coafile index 37ab105..6896103 100644 --- a/.coafile +++ b/.coafile @@ -33,7 +33,7 @@ bears = YAMLLintBear files = **.yaml, **.yml use_spaces = true max_line_length = 120 -ignore = conformance/sonobuoy.yaml +ignore = tests/k8s/conformance/sonobuoy.yaml [all.Python] bears = PyLintBear diff --git a/bluval/bluval.py b/bluval/bluval.py index 4a01a92..01b402a 100644 --- a/bluval/bluval.py +++ b/bluval/bluval.py @@ -28,8 +28,9 @@ def run_testcase(testcase): """ show_stopper = testcase.get('show_stopper', False) what = testcase.get('what') - results = "results/"+what - command = '{} {} {} {}'.format("robot", "-d", results, what) + results = "results/"+testcase.get('layer')+"/"+what + test_path = "tests/"+testcase.get('layer')+"/"+what + command = '{} {} {} {}'.format("robot", "-d", results, test_path) print('Executing testcase {}'.format(testcase['name'])) print(' show_stopper {}'.format(show_stopper)) @@ -50,6 +51,7 @@ def validate_layer(blueprint, layer): """ print('## Layer {}'.format(layer)) for testcase in blueprint[layer]: + testcase['layer'] = layer run_testcase(testcase) diff --git a/bios_version/bios_version_dell.robot b/tests/hardware/bios_version/bios_version_dell.robot similarity index 100% rename from bios_version/bios_version_dell.robot rename to tests/hardware/bios_version/bios_version_dell.robot diff --git a/conformance/conformance.robot b/tests/k8s/conformance/conformance.robot similarity index 100% rename from conformance/conformance.robot rename to tests/k8s/conformance/conformance.robot diff --git a/conformance/sonobuoy.yaml b/tests/k8s/conformance/sonobuoy.yaml similarity index 100% rename from conformance/sonobuoy.yaml rename to tests/k8s/conformance/sonobuoy.yaml diff --git a/ha/ha_calico_dns_proxy.robot b/tests/k8s/ha/ha_calico_dns_proxy.robot similarity index 100% rename from ha/ha_calico_dns_proxy.robot rename to tests/k8s/ha/ha_calico_dns_proxy.robot diff --git a/ha/ha_etcd_api_ctl_sch.robot b/tests/k8s/ha/ha_etcd_api_ctl_sch.robot similarity index 100% rename from ha/ha_etcd_api_ctl_sch.robot rename to tests/k8s/ha/ha_etcd_api_ctl_sch.robot diff --git a/ha/ha_services.robot b/tests/k8s/ha/ha_services.robot similarity index 100% rename from ha/ha_services.robot rename to tests/k8s/ha/ha_services.robot diff --git a/ha/ha_worker.robot b/tests/k8s/ha/ha_worker.robot similarity index 100% rename from ha/ha_worker.robot rename to tests/k8s/ha/ha_worker.robot diff --git a/helloworld/helloworld.robot b/tests/networking/helloworld/helloworld.robot similarity index 100% rename from helloworld/helloworld.robot rename to tests/networking/helloworld/helloworld.robot diff --git a/ceph/ceph_service.resource b/tests/openstack/ceph_service/ceph_service.resource similarity index 100% rename from ceph/ceph_service.resource rename to tests/openstack/ceph_service/ceph_service.resource diff --git a/ceph/ceph_service.robot b/tests/openstack/ceph_service/ceph_service.robot similarity index 100% rename from ceph/ceph_service.robot rename to tests/openstack/ceph_service/ceph_service.robot diff --git a/ceph/variables.resource b/tests/openstack/ceph_service/variables.resource similarity index 100% rename from ceph/variables.resource rename to tests/openstack/ceph_service/variables.resource -- 2.16.6