*** harlowja has quit IRC | 00:24 | |
*** aspiers has quit IRC | 00:41 | |
*** glance_ has quit IRC | 03:58 | |
*** aspiers has joined #openstack-watcher | 05:22 | |
*** rajat has quit IRC | 11:11 | |
*** nicolasbock has joined #openstack-watcher | 12:47 | |
*** alexchadin has joined #openstack-watcher | 16:16 | |
*** erakli has joined #openstack-watcher | 16:19 | |
*** alexchadin has quit IRC | 16:28 | |
erakli | hi all. I currently work on tests for https://review.openstack.org/#/c/559481/ and found that test watcher.tests.db.test_audit_template.DbAuditTemplateTestCase.test_get_audit_template_list_with_filters() works not as supposed. When it calls get_audit_template_list() with filters on 'goal', it's done incorrectly. Filter named 'goal' is accepted by API and it converts 'goal' to 'goal_name' or 'goal_uuid" filter, that is actu | 16:36 |
---|---|---|
erakli | So, DB wait only fields that explicitly passed to Connection._add_filters() method. The most interesting part is that Connection._add_audit_templates_filters() doesn't define 'goal' field in plain_fields variable. | 16:36 |
erakli | And the key point is here: Connection._add_filters() method iterates over plain_fields and join_fieldmap but do nothing with filter, that is not a part of these arguments. I wonder why not to add something like exception or log entry on bad filter? | 16:36 |
erakli | This is the reason, why bug https://bugs.launchpad.net/watcher/+bug/1761956 wasn't cathed by tests. Test, that should caught it checks nothing. I fix it, but would it be a good idea to add checks on bad filters? | 16:36 |
openstack | Launchpad bug 1761956 in watcher "'watcher audittemplate list' returns deleted Audit Templates" [Undecided,In progress] - Assigned to Egor Panfilov (erakli) | 16:36 |
*** erakli has quit IRC | 17:58 | |
openstackgerrit | Egor Panfilov proposed openstack/watcher master: Replace of private _create methods in tests https://review.openstack.org/563433 | 19:35 |
*** nicolasbock has quit IRC | 19:44 | |
openstackgerrit | Egor Panfilov proposed openstack/watcher master: Grouped _add_*_filters methods together https://review.openstack.org/563436 | 23:33 |
openstackgerrit | Egor Panfilov proposed openstack/watcher master: Updated tests on bug, when get list returns deleted items https://review.openstack.org/563437 | 23:33 |
Generated by irclog2html.py 2.15.3 by Marius Gedminas - find it at mg.pov.lt!