-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Match inherited tags #1064
Match inherited tags #1064
Conversation
Add test case verifying matching of inherited tags and modified current test case for smart parsing of tags.
Update the smart parser to match tags against a prefix's inherited tags in addition to the tags added to the prefix specifically.
self.assertEqual(expected, result) | ||
|
||
# match two levels of inherited tags | ||
expected = [ p1.prefix ] + expected |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace after '['
whitespace before ']'
self.assertEqual(expected, result) | ||
|
||
# match an inherited tag | ||
expected = [ p2.prefix ] + expected |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace after '['
whitespace before ']'
|
||
# add a few prefixes | ||
p1 = th.add_prefix('192.168.0.0/16', 'reservation', 'root', [ 'tag1' ]) | ||
p2 = th.add_prefix('192.168.0.0/20', 'reservation', 'test', [ 'tag2' ]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace after '['
whitespace before ']'
th = TestHelper() | ||
|
||
# add a few prefixes | ||
p1 = th.add_prefix('192.168.0.0/16', 'reservation', 'root', [ 'tag1' ]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace after '['
whitespace before ']'
@@ -1540,6 +1539,46 @@ def testPrefixInclusion(self): | |||
self.assertEqual(expected, result) | |||
|
|||
|
|||
def testTags(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
too many blank lines (2)
Create extension citext as super user in the SQL Makefile.
Accidentally I also found that the creation of the citext extension never had worked in the SQL Makefile. Apparently the tests never covered it before 😄 |
Update the smart parser to match tags against a prefix's inherited as well as "own" tags.
Fixes #1055.