From 80f5fbf2c92231f45ebace17a388679cf595b55a Mon Sep 17 00:00:00 2001 From: Raissa Sarmento Date: Mon, 16 Oct 2017 14:38:36 +0100 Subject: [PATCH] Initial fixes to plugin repo Fixing requirements and setup for manila tempest plugin. Depends-On: I21f2e27ba18f18ebdf07105452c0ffb6fc04bb83 Change-Id: Id773014b915817ff41b9bffd41e84e4d53fb78be --- .stestr.conf | 2 +- .../tests/api/admin/test_migration_negative.py | 2 +- .../tests/api/admin/test_replication_actions.py | 2 +- .../api/admin/test_share_group_types_negative.py | 2 +- .../tests/api/test_snapshot_rules_negative.py | 2 +- manila_tempest_tests/utils.py | 2 +- requirements.txt | 4 ++++ setup.cfg | 2 +- tox.ini | 12 +----------- 9 files changed, 12 insertions(+), 18 deletions(-) diff --git a/.stestr.conf b/.stestr.conf index 0d36314a..fb538df2 100644 --- a/.stestr.conf +++ b/.stestr.conf @@ -1,3 +1,3 @@ [DEFAULT] -test_path=./manila_tempest_tests/tests +test_path=./manila_tempest_tests top_dir=./ diff --git a/manila_tempest_tests/tests/api/admin/test_migration_negative.py b/manila_tempest_tests/tests/api/admin/test_migration_negative.py index 87ded638..a78b33cf 100644 --- a/manila_tempest_tests/tests/api/admin/test_migration_negative.py +++ b/manila_tempest_tests/tests/api/admin/test_migration_negative.py @@ -55,7 +55,7 @@ class MigrationNegativeTest(base.BaseSharesAdminTest): "are needed to run share migration tests.") cls.share = cls.create_share(cls.protocol, - size=CONF.share.share_size+1) + size=CONF.share.share_size + 1) cls.share = cls.shares_client.get_share(cls.share['id']) cls.default_type = cls.shares_v2_client.list_share_types( diff --git a/manila_tempest_tests/tests/api/admin/test_replication_actions.py b/manila_tempest_tests/tests/api/admin/test_replication_actions.py index 5b565334..57d90d07 100644 --- a/manila_tempest_tests/tests/api/admin/test_replication_actions.py +++ b/manila_tempest_tests/tests/api/admin/test_replication_actions.py @@ -58,7 +58,7 @@ class ReplicationAdminTest(base.BaseSharesMixedTest): client=cls.admin_client) cls.share_type = share_type["share_type"] # Create share with above share_type - cls.share = cls.create_share(size=CONF.share.share_size+1, + cls.share = cls.create_share(size=CONF.share.share_size + 1, share_type_id=cls.share_type["id"], availability_zone=cls.share_zone, client=cls.admin_client) diff --git a/manila_tempest_tests/tests/api/admin/test_share_group_types_negative.py b/manila_tempest_tests/tests/api/admin/test_share_group_types_negative.py index 6dfe2045..a7cd8a52 100644 --- a/manila_tempest_tests/tests/api/admin/test_share_group_types_negative.py +++ b/manila_tempest_tests/tests/api/admin/test_share_group_types_negative.py @@ -109,7 +109,7 @@ class ShareGroupTypesAdminNegativeTest(base.BaseSharesMixedTest): share_types=[self.share_type['share_type']['id']], client=self.admin_shares_v2_client) list_of_ids.add(sg_type['id']) - self.assertEqual(unique_name, sg_type['name']) + self.assertEqual(unique_name, sg_type['name']) self.admin_shares_v2_client.delete_share_group_type(sg_type['id']) self.assertEqual(2, len(list_of_ids)) diff --git a/manila_tempest_tests/tests/api/test_snapshot_rules_negative.py b/manila_tempest_tests/tests/api/test_snapshot_rules_negative.py index b1818e52..2991acd7 100644 --- a/manila_tempest_tests/tests/api/test_snapshot_rules_negative.py +++ b/manila_tempest_tests/tests/api/test_snapshot_rules_negative.py @@ -48,7 +48,7 @@ class SnapshotIpRulesForNFSNegativeTest( @tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND) @ddt.data("1.2.3.256", "1.1.1.-", "1.2.3.4/33", "1.2.3.*", "1.2.3.*/23", - "1.2.3.1|23", "1.2.3.1/", "1.2.3.1/-1", + "1.2.3.1|23", "1.2.3.1/", "1.2.3.1/-1", "fe80:217:f2ff:fe07:ed62", "2001:db8::1/148", "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", "2001:0db8:0000:85a3:0000:0000:ac1f:8001/64") diff --git a/manila_tempest_tests/utils.py b/manila_tempest_tests/utils.py index 80eebea8..3598ec79 100644 --- a/manila_tempest_tests/utils.py +++ b/manila_tempest_tests/utils.py @@ -110,7 +110,7 @@ def rand_ip(network=False): def rand_ipv6_ip(network=False): """This uses the IPv6 documentation range of 2001:DB8::/32""" - ran_add = ["%x" % random.randrange(0, 16**4) for i in range(6)] + ran_add = ["%x" % random.randrange(0, 16 ** 4) for i in range(6)] address = "2001:0DB8:" + ":".join(ran_add) if network: mask_length = six.text_type(random.randint(32, 128)) diff --git a/requirements.txt b/requirements.txt index 1d18dd3d..33ac7c68 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,3 +3,7 @@ # process, which may cause wedges in the gate later. pbr>=2.0 # Apache-2.0 + +ddt>=1.0.1 # MIT +oslo.log>=3.30.0 # Apache-2.0 +tempest>=17.1.0 # Apache-2.0 \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index d75da0b9..ef006270 100644 --- a/setup.cfg +++ b/setup.cfg @@ -17,7 +17,7 @@ classifier = Programming Language :: Python :: 2.7 Programming Language :: Python :: 3 Programming Language :: Python :: 3.3 - Programming Language :: Python :: 3.4 + Programming Language :: Python :: 3.5 [files] packages = diff --git a/tox.ini b/tox.ini index c3fa7f30..d92b3a6d 100644 --- a/tox.ini +++ b/tox.ini @@ -14,7 +14,7 @@ setenv = OS_TEST_TIMEOUT=60 deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt -commands = stestr run {posargs} +# commands = python setup.py test --slowest --testr-args='{posargs}' [testenv:pep8] commands = flake8 {posargs} @@ -22,16 +22,6 @@ commands = flake8 {posargs} [testenv:venv] commands = {posargs} -[testenv:cover] -setenv = - VIRTUAL_ENV={envdir} - PYTHON=coverage run --source manila-tempest-plugin --parallel-mode -commands = - stestr run {posargs} - coverage combine - coverage html -d cover - coverage xml -o cover/coverage.xml - [testenv:docs] commands = python setup.py build_sphinx