Move hacking checks to tests dir

The test code isn't part of the service.

Corresponding cinder change: I7b18453269cfc57bfbc9bd143d72948e88e60836

Change-Id: I71cc8b3154828f4aeea0afdf3fb59a79b8a8e707
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
This commit is contained in:
Goutham Pacha Ravi 2019-09-11 10:32:24 -07:00
parent db3f3b5c99
commit fba472e3a6
5 changed files with 8 additions and 8 deletions

View File

@ -20,19 +20,20 @@ from unittest import mock
import ddt import ddt
import pycodestyle import pycodestyle
from manila.hacking import checks
from manila import test from manila import test
from manila.tests.hacking import checks
@ddt.ddt @ddt.ddt
class HackingTestCase(test.TestCase): class HackingTestCase(test.TestCase):
"""Hacking test cases """Hacking test cases
This class tests the hacking checks in manila.hacking.checks by passing This class tests the hacking checks in manila.tests.hacking.checks by
strings to the check methods like the pep8/flake8 parser would. The parser passing strings to the check methods like the pep8/flake8 parser would.
loops over each line in the file and then passes the parameters to the The parser loops over each line in the file and then passes the
check method. The parameter names in the check method dictate what type of parameters to the check method. The parameter names in the check method
object is passed to the check method. The parameter types are:: dictate what type of object is passed to the check method. The
parameter types are::
logical_line: A processed line with the following modifications: logical_line: A processed line with the following modifications:
- Multi-line statements converted to a single line. - Multi-line statements converted to a single line.

View File

@ -161,7 +161,7 @@ extension =
M339 = checks:no_third_party_mock M339 = checks:no_third_party_mock
M354 = checks:check_uuid4 M354 = checks:check_uuid4
M359 = checks:no_translate_logs M359 = checks:no_translate_logs
paths = ./manila/hacking paths = ./manila/tests/hacking
[testenv:lower-constraints] [testenv:lower-constraints]
deps = deps =

View File

@ -67,7 +67,6 @@
- ^.*\.rst$ - ^.*\.rst$
- ^api-ref/.*$ - ^api-ref/.*$
- ^doc/.*$ - ^doc/.*$
- ^manila/hacking/.*$
- ^manila/tests/.*$ - ^manila/tests/.*$
- ^releasenotes/.*$ - ^releasenotes/.*$
- ^setup.cfg$ - ^setup.cfg$