summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Monteiro <felipe.monteiro@att.com>2018-10-29 19:40:30 -0400
committerFelipe Monteiro <felipe.monteiro@att.com>2018-10-29 19:43:39 -0400
commit89ec1e3e3acedfbc10034ea4b54f2634bc36263f (patch)
tree056f1a2f5df269c93a619e1964b47e83998edc21
parent0fc18c6f192a767a624dc97b12370956b6eb47ee (diff)
trivial: Drop unused lint code P002
This patch set drops unused lint code P002 from Pegleg. The variable for P002 is called: DECKHAND_RENDERING_INCOMPLETE_FLAG It is not clear what this even means, so the assumption here is that it is a mishap so there is nothing to implement behind the scenes. The recourse is to remove it. Change-Id: I3bc99e5f48aa1fa9ea652f073fd4e147b4283e10
Notes
Notes (review): Code-Review+2: Kaspars Skels <kaspars.skels@gmail.com> Code-Review+1: Tin Lam <tin@irrational.io> Code-Review+2: Aaron Sheffield <ajs@sheffieldfamily.net> Workflow+1: Aaron Sheffield <ajs@sheffieldfamily.net> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Tue, 30 Oct 2018 20:02:55 +0000 Reviewed-on: https://review.openstack.org/614046 Project: openstack/airship-pegleg Branch: refs/heads/master
-rw-r--r--pegleg/engine/errorcodes.py1
-rw-r--r--tests/unit/engine/test_selectable_linting.py20
2 files changed, 0 insertions, 21 deletions
diff --git a/pegleg/engine/errorcodes.py b/pegleg/engine/errorcodes.py
index e66d658..e4f281e 100644
--- a/pegleg/engine/errorcodes.py
+++ b/pegleg/engine/errorcodes.py
@@ -13,7 +13,6 @@
13# limitations under the License. 13# limitations under the License.
14 14
15SCHEMA_STORAGE_POLICY_MISMATCH_FLAG = 'P001' 15SCHEMA_STORAGE_POLICY_MISMATCH_FLAG = 'P001'
16DECKHAND_RENDERING_INCOMPLETE_FLAG = 'P002'
17REPOS_MISSING_DIRECTORIES_FLAG = 'P003' 16REPOS_MISSING_DIRECTORIES_FLAG = 'P003'
18DECKHAND_DUPLICATE_SCHEMA = 'P004' 17DECKHAND_DUPLICATE_SCHEMA = 'P004'
19DECKHAND_RENDER_EXCEPTION = 'P005' 18DECKHAND_RENDER_EXCEPTION = 'P005'
diff --git a/tests/unit/engine/test_selectable_linting.py b/tests/unit/engine/test_selectable_linting.py
index a9cf243..fb8c26c 100644
--- a/tests/unit/engine/test_selectable_linting.py
+++ b/tests/unit/engine/test_selectable_linting.py
@@ -48,17 +48,6 @@ class TestSelectableLinting(object):
48 assert msg_1 in expected_exc 48 assert msg_1 in expected_exc
49 assert msg_2 in expected_exc 49 assert msg_2 in expected_exc
50 50
51 @mock.patch.object(lint, '_verify_no_unexpected_files', return_value=[])
52 def test_lint_excludes_P002(*args):
53 exclude_lint = ['P002']
54 config.set_site_repo('../pegleg/site_yamls/')
55 with mock.patch.object(
56 lint,
57 '_verify_deckhand_render',
58 return_value=[('P002', 'test message')]) as mock_method:
59 lint.full(False, exclude_lint, [])
60 mock_method.assert_called()
61
62 @pytest.mark.skip(reason=_SKIP_P003_REASON) 51 @pytest.mark.skip(reason=_SKIP_P003_REASON)
63 @mock.patch.object(lint, '_verify_deckhand_render', return_value=[]) 52 @mock.patch.object(lint, '_verify_deckhand_render', return_value=[])
64 def test_lint_excludes_P003(*args): 53 def test_lint_excludes_P003(*args):
@@ -90,15 +79,6 @@ class TestSelectableLinting(object):
90 assert msg_1 not in expected_exc 79 assert msg_1 not in expected_exc
91 assert msg_2 in expected_exc 80 assert msg_2 in expected_exc
92 81
93 @mock.patch.object(lint, '_verify_no_unexpected_files', return_value=[])
94 def test_lint_warns_P002(*args):
95 warn_lint = ['P002']
96 config.set_site_repo('../pegleg/site_yamls/')
97
98 with mock.patch.object(lint, '_verify_deckhand_render') as mock_method:
99 lint.full(False, [], warn_lint)
100 mock_method.assert_called()
101
102 @pytest.mark.skip(reason=_SKIP_P003_REASON) 82 @pytest.mark.skip(reason=_SKIP_P003_REASON)
103 @mock.patch.object(lint, '_verify_deckhand_render', return_value=[]) 83 @mock.patch.object(lint, '_verify_deckhand_render', return_value=[])
104 def test_lint_warns_P003(*args): 84 def test_lint_warns_P003(*args):