Report warning when config sections are not used
It's possible a variant is excluded via tree_variants option and the section does not match anything. It can be confusing to users why nothing is happening. This patch lets Pungi log all unmatched patterns. Fixes: https://pagure.io/pungi/issue/692 Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
parent
c3b49f7ffb
commit
a63e4746c9
9 changed files with 71 additions and 12 deletions
|
|
@ -138,6 +138,18 @@ class TestGetVariantData(unittest.TestCase):
|
|||
result = util.get_variant_data({}, 'foo', mock.Mock(uid='Client'))
|
||||
self.assertItemsEqual(result, [])
|
||||
|
||||
def test_get_save_pattern(self):
|
||||
conf = {
|
||||
'foo': {
|
||||
'^Client$': 1,
|
||||
'^NotClient$': 2,
|
||||
}
|
||||
}
|
||||
patterns = set()
|
||||
result = util.get_variant_data(conf, 'foo', mock.Mock(uid='Client'), keys=patterns)
|
||||
self.assertEqual(result, [1])
|
||||
self.assertEqual(patterns, set(['^Client$']))
|
||||
|
||||
|
||||
class TestVolumeIdGenerator(unittest.TestCase):
|
||||
def setUp(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue