← Back to team overview

openerp-india team mailing list archive

[Bug 931104] Re: [6.1 trunk] [product] yml test breaks on update

 

Hello Bogdan,

This is not a very well-known fact, but in general our tests (not just YAML but all of them) are not meant to pass during an update.
This is related to the fact that tests are only enabled on demo databases:
- our test suite is mainly meant to be run in development environments, and of course on our continuous integration system: runbot.openerp.com
- we like the tests to be minimalist, and for this reason they heavily rely on demo data, to avoid defining a lot of test specific data
- because demo data may have been changed after installation, the specific test flows may be broken because of records have disappeared or changed state
- finally, running business code during an update is inherently complex and broken: modules are loaded in the order of dependencies, but module data (inherited views, workflows) is already in the database and taking effect. So a workflow triggered during an update might call a business method that is not available yet, or inherited views be loaded (to compute automatic on_change calls) that reference fields not loaded yet.

As a summary, it is expected that many tests will fail during an update,
and that is fine: it will only be the case for demo database, and will
not block the update anyway. Just don't mind the logs...

I hope you understand our point of view... this makes writing and
maintaining tests much easier, and re-running tests during updates does
not matter much.. the updated code was already tested upstream in our CI
system.

Thanks for taking the time to report this!

** Changed in: openobject-addons
       Status: New => Invalid

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/931104

Title:
  [6.1 trunk] [product] yml test breaks on update

Status in OpenERP Addons (modules):
  Invalid

Bug description:
  hello,

  latest revs,
  demo db
  while running an update, a yml test breaks:

  2012-02-12 19:21:05,588 9826 INFO bs_test_120206 openerp.modules.loading: module product: loading product_pricelist_demo.yml
  2012-02-12 19:21:05,817 9826 ERROR bs_test_120206 openerp.osv.orm: Can't find field 'property_account_income' in the following view parts composing the view of object model 'product.product':
   * product.normal.form.inherit

  Either you wrongly customized this view, or some modules bringing those views are not compatible with your current data model
  2012-02-12 19:21:05,817 9826 ERROR bs_test_120206 openerp.tools.yaml_import: ('View error', u"Can't find field 'property_account_income' in the following view parts composing the view of object model 'product.product':\n * product.normal.form.inherit\n\nEither you wrongly customized this view, or some modules bringing those views are not compatible with your current data model")
  Traceback (most recent call last):
    File "/usr/local/lib/python2.7/dist-packages/openerp-6.1rc1-py2.7.egg/openerp/tools/yaml_import.py", line 843, in process
      self._process_node(node)
    File "/usr/local/lib/python2.7/dist-packages/openerp-6.1rc1-py2.7.egg/openerp/tools/yaml_import.py", line 856, in _process_node
      self.process_record(node)
    File "/usr/local/lib/python2.7/dist-packages/openerp-6.1rc1-py2.7.egg/openerp/tools/yaml_import.py", line 346, in process_record
      view = model.fields_view_get(self.cr, 1, varg, 'form', context)
    File "/usr/local/lib/python2.7/dist-packages/openerp-6.1rc1-py2.7.egg/openerp/osv/orm.py", line 2144, in fields_view_get
      xarch, xfields = self.__view_look_dom_arch(cr, user, result['arch'], view_id, context=ctx)
    File "/usr/local/lib/python2.7/dist-packages/openerp-6.1rc1-py2.7.egg/openerp/osv/orm.py", line 1804, in __view_look_dom_arch
      raise except_orm('View error', msg)
  except_orm: ('View error', u"Can't find field 'property_account_income' in the following view parts composing the view of object model 'product.product':\n * product.normal.form.inherit\n\nEither you wrongly customized this view, or some modules bringing those views are not compatible with your current data model")
  2012-02-12 19:21:05,818 9826 ERROR bs_test_120206 openerp.modules.loading: Tests failed to execute in module product
  Traceback (most recent call last):
    File "/usr/local/lib/python2.7/dist-packages/openerp-6.1rc1-py2.7.egg/openerp/modules/loading.py", line 100, in load_test
      _load_data(cr, module_name, idref, mode, 'test')
    File "/usr/local/lib/python2.7/dist-packages/openerp-6.1rc1-py2.7.egg/openerp/modules/loading.py", line 136, in _load_data
      tools.convert_yaml_import(cr, module_name, fp, idref, mode, noupdate)
    File "/usr/local/lib/python2.7/dist-packages/openerp-6.1rc1-py2.7.egg/openerp/tools/yaml_import.py", line 908, in yaml_import
      yaml_interpreter.process(yaml_string)
    File "/usr/local/lib/python2.7/dist-packages/openerp-6.1rc1-py2.7.egg/openerp/tools/yaml_import.py", line 843, in process
      self._process_node(node)
    File "/usr/local/lib/python2.7/dist-packages/openerp-6.1rc1-py2.7.egg/openerp/tools/yaml_import.py", line 856, in _process_node
      self.process_record(node)
    File "/usr/local/lib/python2.7/dist-packages/openerp-6.1rc1-py2.7.egg/openerp/tools/yaml_import.py", line 346, in process_record
      view = model.fields_view_get(self.cr, 1, varg, 'form', context)
    File "/usr/local/lib/python2.7/dist-packages/openerp-6.1rc1-py2.7.egg/openerp/osv/orm.py", line 2144, in fields_view_get
      xarch, xfields = self.__view_look_dom_arch(cr, user, result['arch'], view_id, context=ctx)
    File "/usr/local/lib/python2.7/dist-packages/openerp-6.1rc1-py2.7.egg/openerp/osv/orm.py", line 1804, in __view_look_dom_arch
      raise except_orm('View error', msg)
  except_orm: ('View error', u"Can't find field 'property_account_income' in the following view parts composing the view of object model 'product.product':\n * product.normal.form.inherit\n\nEither you wrongly customized this view, or some modules bringing those views are not compatible with your current data model")

  regards,
  b

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/931104/+subscriptions


References