validate crashes if test plan has no id field

Bug #1443899 reported by Zygmunt Krynicki on 2015-04-14
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
PlainBox (Toolkit)
Medium
Zygmunt Krynicki

Bug Description

As of git revision 60960bb97f53333ef043afa8319bd8451d120d32

The following (temporary) test plan:

(venv.fx)zyga@fx:~/checkbox/providers/plainbox-provider-checkbox$ cat units/debug.pxu
unit: test plan
_name: Thunderbolt Tests
include: monitor/thunderbolt

Crashes the validation code like this:

(venv.fx)zyga@fx:~/checkbox/providers/plainbox-provider-checkbox$ ./manage.py validate
jobs/disk.txt.in:90-108: warning: job 'disk/storage_devices', field 'summary', please stay under 80 characters
jobs/wireless.txt.in:443-459: warning: job 'wireless/stress_performance', field 'summary', please stay under 80 characters
units/debug.pxu:1-3: error: field 'id', required field missing
CRITICAL plainbox.crashes: Plik wykonywalny 'manage.py' uruchomiony z Namespace(command=<plainbox.provider_manager.ValidateCommand object at 0x7f7140307f28>, debug_console=False, debug_interrupt=False, deprecated=False, log_level=None, new_validation_core=True, pdb=False, strict=False, trace=[]) uległ awarii
Traceback (most recent call last):
  File "/home/zyga/checkbox/plainbox/plainbox/impl/clitools.py", line 560, in dispatch_and_catch_exceptions
    return self.dispatch_command(ns)
  File "/home/zyga/checkbox/plainbox/plainbox/impl/clitools.py", line 556, in dispatch_command
    return ns.command.invoked(ns)
  File "/home/zyga/checkbox/plainbox/plainbox/provider_manager.py", line 959, in invoked
    return self.invoked_new(ns)
  File "/home/zyga/checkbox/plainbox/plainbox/provider_manager.py", line 1062, in invoked_new
    for issue in itertools.chain(early_issue_gen, issue_gen):
  File "/home/zyga/checkbox/plainbox/plainbox/provider_manager.py", line 1111, in validate_units_in_context
    for issue in unit.check(context=context, live=True):
  File "/home/zyga/checkbox/plainbox/plainbox/impl/unit/unit.py", line 814, in _check_gen
    for issue in validator.check_in_context(self, context):
  File "/home/zyga/checkbox/plainbox/plainbox/impl/unit/unit.py", line 98, in check_in_context
    self, unit, field, context):
  File "/home/zyga/checkbox/plainbox/plainbox/impl/unit/testplan.py", line 70, in check_in_context
    parent, unit, field, context):
  File "/home/zyga/checkbox/plainbox/plainbox/impl/unit/testplan.py", line 89, in _check_test_plan_in_context
    if qual.matcher.match(an_id):
  File "/home/zyga/checkbox/plainbox/plainbox/impl/secure/qualifiers.py", line 303, in match
    return self._pattern.match(value) is not None
TypeError: expected string or buffer

Related branches

Zygmunt Krynicki (zyga) on 2015-04-14
Changed in plainbox:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Zygmunt Krynicki (zyga)
milestone: none → 0.21
Zygmunt Krynicki (zyga) on 2015-04-14
Changed in plainbox:
status: In Progress → Fix Committed
Changed in plainbox:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers