move boto tests to thirdparty directory - part 1
this is part one of the boto refactor, there are still some
shared base classes (and the ec2 & s3 clients are added to every
test case still), however this gets the front end of the boto
runs moved to the thirdparty directory.
3rdparty in the proposal had to become thirdparty in implementation
as python doesn't like modules that start with numbers. Oh well.
We continue to run these tests as part of normal runs by adding
them to the tox.ini file.
Part of bp:tempest-repo-restructure
Change-Id: I30df582a3183453f6c7b36b1ea6857195e953950
diff --git a/tempest/README.rst b/tempest/README.rst
index c41ef96..6718ee0 100644
--- a/tempest/README.rst
+++ b/tempest/README.rst
@@ -12,11 +12,11 @@
to make this clear.
tempest/
- 3rdparty/ - 3rd party api tests
api/ - API tests
cli/ - CLI tests
scenario/ - complex scenario tests
stress/ - stress tests
+ thirdparty/ - 3rd party api tests
whitebox/ - white box testing
Each of these directories contains different types of tests. What
@@ -24,17 +24,6 @@
documented in a README.rst file in the directory.
-3rdparty
-------------
-
-Many openstack components include 3rdparty API support. It is
-completely legitmate for Tempest to include tests of 3rdparty APIs,
-but those should be kept seperate from the normal OpenStack
-validation.
-
-TODO: tempest/tests/boto should become tempest/3rdparty/boto
-
-
api
------------
@@ -88,6 +77,17 @@
moves into here.
+thirdparty
+------------
+
+Many openstack components include 3rdparty API support. It is
+completely legitmate for Tempest to include tests of 3rdparty APIs,
+but those should be kept seperate from the normal OpenStack
+validation.
+
+TODO: tempest/tests/boto should become tempest/3rdparty/boto
+
+
whitebox
----------
diff --git a/tempest/thirdparty/README.rst b/tempest/thirdparty/README.rst
new file mode 100644
index 0000000..41d31f3
--- /dev/null
+++ b/tempest/thirdparty/README.rst
@@ -0,0 +1,33 @@
+Tempest Guide to Third Party API tests
+========
+
+
+What are these tests?
+--------
+
+Third party tests are tests for non native OpenStack APIs that are
+part of OpenStack projects. If we ship an API, we're really required
+to ensure that it's working.
+
+An example is that Nova Compute currently has EC2 API support in tree,
+which should be tested as part of normal process.
+
+
+Why are these tests in tempest?
+--------
+
+If we ship an API in an OpenStack component, there should be tests in
+tempest to exercise it in some way.
+
+
+Scope of these tests
+--------
+
+Third party API testing should be limited to the functional testing of
+third party API compliance. Complex scenarios should be avoided, and
+instead exercised with the OpenStack API, unless the third party API
+can't be tested without those scenarios.
+
+Whenever possible third party API testing should use a client as close
+to the third party API as possible. The point of these tests is API
+validation.
diff --git a/tempest/tests/boto/__init__.py b/tempest/thirdparty/__init__.py
similarity index 100%
copy from tempest/tests/boto/__init__.py
copy to tempest/thirdparty/__init__.py
diff --git a/tempest/tests/boto/__init__.py b/tempest/thirdparty/boto/__init__.py
similarity index 100%
rename from tempest/tests/boto/__init__.py
rename to tempest/thirdparty/boto/__init__.py
diff --git a/tempest/testboto.py b/tempest/thirdparty/boto/test.py
similarity index 98%
rename from tempest/testboto.py
rename to tempest/thirdparty/boto/test.py
index 9e652cb..afa5c69 100644
--- a/tempest/testboto.py
+++ b/tempest/thirdparty/boto/test.py
@@ -32,9 +32,9 @@
import tempest.config
from tempest import exceptions
import tempest.test
-from tempest.tests.boto.utils.wait import re_search_wait
-from tempest.tests.boto.utils.wait import state_wait
-from tempest.tests.boto.utils.wait import wait_exception
+from tempest.thirdparty.boto.utils.wait import re_search_wait
+from tempest.thirdparty.boto.utils.wait import state_wait
+from tempest.thirdparty.boto.utils.wait import wait_exception
LOG = logging.getLogger(__name__)
diff --git a/tempest/tests/boto/test_ec2_instance_run.py b/tempest/thirdparty/boto/test_ec2_instance_run.py
similarity index 97%
rename from tempest/tests/boto/test_ec2_instance_run.py
rename to tempest/thirdparty/boto/test_ec2_instance_run.py
index b6b93d8..bbe11d1 100644
--- a/tempest/tests/boto/test_ec2_instance_run.py
+++ b/tempest/thirdparty/boto/test_ec2_instance_run.py
@@ -25,10 +25,10 @@
from tempest.common.utils.linux.remote_client import RemoteClient
from tempest import exceptions
from tempest.test import attr
-from tempest.testboto import BotoTestCase
-from tempest.tests.boto.utils.s3 import s3_upload_dir
-from tempest.tests.boto.utils.wait import re_search_wait
-from tempest.tests.boto.utils.wait import state_wait
+from tempest.thirdparty.boto.test import BotoTestCase
+from tempest.thirdparty.boto.utils.s3 import s3_upload_dir
+from tempest.thirdparty.boto.utils.wait import re_search_wait
+from tempest.thirdparty.boto.utils.wait import state_wait
LOG = logging.getLogger(__name__)
diff --git a/tempest/tests/boto/test_ec2_keys.py b/tempest/thirdparty/boto/test_ec2_keys.py
similarity index 97%
rename from tempest/tests/boto/test_ec2_keys.py
rename to tempest/thirdparty/boto/test_ec2_keys.py
index d96ee11..5304649 100644
--- a/tempest/tests/boto/test_ec2_keys.py
+++ b/tempest/thirdparty/boto/test_ec2_keys.py
@@ -20,7 +20,7 @@
from tempest import clients
from tempest.common.utils.data_utils import rand_name
from tempest.test import attr
-from tempest.testboto import BotoTestCase
+from tempest.thirdparty.boto.test import BotoTestCase
def compare_key_pairs(a, b):
diff --git a/tempest/tests/boto/test_ec2_network.py b/tempest/thirdparty/boto/test_ec2_network.py
similarity index 96%
rename from tempest/tests/boto/test_ec2_network.py
rename to tempest/thirdparty/boto/test_ec2_network.py
index ef307a1..6878df1 100644
--- a/tempest/tests/boto/test_ec2_network.py
+++ b/tempest/thirdparty/boto/test_ec2_network.py
@@ -19,7 +19,7 @@
from tempest import clients
from tempest.test import attr
-from tempest.testboto import BotoTestCase
+from tempest.thirdparty.boto.test import BotoTestCase
@attr("EC2")
diff --git a/tempest/tests/boto/test_ec2_security_groups.py b/tempest/thirdparty/boto/test_ec2_security_groups.py
similarity index 98%
rename from tempest/tests/boto/test_ec2_security_groups.py
rename to tempest/thirdparty/boto/test_ec2_security_groups.py
index dd46a91..54a94f8 100644
--- a/tempest/tests/boto/test_ec2_security_groups.py
+++ b/tempest/thirdparty/boto/test_ec2_security_groups.py
@@ -18,7 +18,7 @@
from tempest import clients
from tempest.common.utils.data_utils import rand_name
from tempest.test import attr
-from tempest.testboto import BotoTestCase
+from tempest.thirdparty.boto.test import BotoTestCase
@attr("EC2")
diff --git a/tempest/tests/boto/test_ec2_volumes.py b/tempest/thirdparty/boto/test_ec2_volumes.py
similarity index 97%
rename from tempest/tests/boto/test_ec2_volumes.py
rename to tempest/thirdparty/boto/test_ec2_volumes.py
index 37a913e..b4d763d 100644
--- a/tempest/tests/boto/test_ec2_volumes.py
+++ b/tempest/thirdparty/boto/test_ec2_volumes.py
@@ -19,7 +19,7 @@
from tempest import clients
from tempest.test import attr
-from tempest.testboto import BotoTestCase
+from tempest.thirdparty.boto.test import BotoTestCase
LOG = logging.getLogger(__name__)
diff --git a/tempest/tests/boto/test_s3_buckets.py b/tempest/thirdparty/boto/test_s3_buckets.py
similarity index 96%
rename from tempest/tests/boto/test_s3_buckets.py
rename to tempest/thirdparty/boto/test_s3_buckets.py
index 0a05ae0..3b7c5a7 100644
--- a/tempest/tests/boto/test_s3_buckets.py
+++ b/tempest/thirdparty/boto/test_s3_buckets.py
@@ -20,7 +20,7 @@
from tempest import clients
from tempest.common.utils.data_utils import rand_name
from tempest.test import attr
-from tempest.testboto import BotoTestCase
+from tempest.thirdparty.boto.test import BotoTestCase
@attr("S3")
diff --git a/tempest/tests/boto/test_s3_ec2_images.py b/tempest/thirdparty/boto/test_s3_ec2_images.py
similarity index 96%
rename from tempest/tests/boto/test_s3_ec2_images.py
rename to tempest/thirdparty/boto/test_s3_ec2_images.py
index f77743e..594f416 100644
--- a/tempest/tests/boto/test_s3_ec2_images.py
+++ b/tempest/thirdparty/boto/test_s3_ec2_images.py
@@ -22,9 +22,9 @@
from tempest import clients
from tempest.common.utils.data_utils import rand_name
from tempest.test import attr
-from tempest.testboto import BotoTestCase
-from tempest.tests.boto.utils.s3 import s3_upload_dir
-from tempest.tests.boto.utils.wait import state_wait
+from tempest.thirdparty.boto.test import BotoTestCase
+from tempest.thirdparty.boto.utils.s3 import s3_upload_dir
+from tempest.thirdparty.boto.utils.wait import state_wait
@attr("S3", "EC2")
diff --git a/tempest/tests/boto/test_s3_objects.py b/tempest/thirdparty/boto/test_s3_objects.py
similarity index 96%
rename from tempest/tests/boto/test_s3_objects.py
rename to tempest/thirdparty/boto/test_s3_objects.py
index 9d4d79c..b256bc4 100644
--- a/tempest/tests/boto/test_s3_objects.py
+++ b/tempest/thirdparty/boto/test_s3_objects.py
@@ -22,7 +22,7 @@
from tempest import clients
from tempest.common.utils.data_utils import rand_name
from tempest.test import attr
-from tempest.testboto import BotoTestCase
+from tempest.thirdparty.boto.test import BotoTestCase
@attr("S3")
diff --git a/tempest/tests/boto/utils/__init__.py b/tempest/thirdparty/boto/utils/__init__.py
similarity index 100%
rename from tempest/tests/boto/utils/__init__.py
rename to tempest/thirdparty/boto/utils/__init__.py
diff --git a/tempest/tests/boto/utils/s3.py b/tempest/thirdparty/boto/utils/s3.py
similarity index 100%
rename from tempest/tests/boto/utils/s3.py
rename to tempest/thirdparty/boto/utils/s3.py
diff --git a/tempest/tests/boto/utils/wait.py b/tempest/thirdparty/boto/utils/wait.py
similarity index 100%
rename from tempest/tests/boto/utils/wait.py
rename to tempest/thirdparty/boto/utils/wait.py
diff --git a/tox.ini b/tox.ini
index 453f5c7..2449c86 100644
--- a/tox.ini
+++ b/tox.ini
@@ -20,7 +20,7 @@
NOSE_OPENSTACK_SHOW_ELAPSED=1
NOSE_OPENSTACK_STDOUT=1
commands =
- nosetests --logging-format '%(asctime)-15s %(message)s' --with-xunit --xunit-file=nosetests-full.xml -sv tempest/tests tempest/scenario tempest/cli
+ nosetests --logging-format '%(asctime)-15s %(message)s' --with-xunit --xunit-file=nosetests-full.xml -sv tempest/tests tempest/scenario tempest/thirdparty tempest/cli
[testenv:smoke]
sitepackages = True
@@ -46,7 +46,7 @@
NOSE_OPENSTACK_STDOUT=1
commands =
python -m tools/tempest_coverage -c start --combine
- nosetests --logging-format '%(asctime)-15s %(message)s' --with-xunit --xunit-file=nosetests-full.xml -sv tempest/tests tempest/scenario tempest/cli
+ nosetests --logging-format '%(asctime)-15s %(message)s' --with-xunit --xunit-file=nosetests-full.xml -sv tempest/tests tempest/scenario tempest/thirdparty tempest/cli
python -m tools/tempest_coverage -c report --html
[testenv:pep8]