Browse Source

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
Felipe Monteiro 5 months ago
parent
commit
89ec1e3e3a
2 changed files with 0 additions and 21 deletions
  1. 0
    1
      pegleg/engine/errorcodes.py
  2. 0
    20
      tests/unit/engine/test_selectable_linting.py

+ 0
- 1
pegleg/engine/errorcodes.py View File

@@ -13,7 +13,6 @@
13 13
 # limitations under the License.
14 14
 
15 15
 SCHEMA_STORAGE_POLICY_MISMATCH_FLAG = 'P001'
16
-DECKHAND_RENDERING_INCOMPLETE_FLAG = 'P002'
17 16
 REPOS_MISSING_DIRECTORIES_FLAG = 'P003'
18 17
 DECKHAND_DUPLICATE_SCHEMA = 'P004'
19 18
 DECKHAND_RENDER_EXCEPTION = 'P005'

+ 0
- 20
tests/unit/engine/test_selectable_linting.py View File

@@ -48,17 +48,6 @@ class TestSelectableLinting(object):
48 48
                 assert msg_1 in expected_exc
49 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 51
     @pytest.mark.skip(reason=_SKIP_P003_REASON)
63 52
     @mock.patch.object(lint, '_verify_deckhand_render', return_value=[])
64 53
     def test_lint_excludes_P003(*args):
@@ -90,15 +79,6 @@ class TestSelectableLinting(object):
90 79
                 assert msg_1 not in expected_exc
91 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 82
     @pytest.mark.skip(reason=_SKIP_P003_REASON)
103 83
     @mock.patch.object(lint, '_verify_deckhand_render', return_value=[])
104 84
     def test_lint_warns_P003(*args):

Loading…
Cancel
Save