#355: Run Trac test suite against product environments - after #115 #288
---------------------------+------------------------------------
Reporter: olemis | Owner: olemis
Type: task | Status: accepted
Priority: major | Milestone:
Component: multiproduct | Version:
Resolution: | Keywords: environment testing QA
---------------------------+------------------------------------
Comment (by olemis):
I've attached [attachment:t355_r1436300_trac_test_ticket_api.diff a patch]
aimed at running ticket API test cases against product environments . Test
run indicates some errors so far related to [ticket:288 database proxies]
.
{{{
#!sh
$ python setup.py test -m tests.ticket.api
running test
running egg_info
writing BloodhoundMultiProduct.egg-info/PKG-INFO
writing top-level names to BloodhoundMultiProduct.egg-info/top_level.txt
writing dependency_links to BloodhoundMultiProduct.egg-
info/dependency_links.txt
writing entry points to BloodhoundMultiProduct.egg-info/entry_points.txt
writing BloodhoundMultiProduct.egg-info/PKG-INFO
writing top-level names to BloodhoundMultiProduct.egg-info/top_level.txt
writing dependency_links to BloodhoundMultiProduct.egg-
info/dependency_links.txt
writing entry points to BloodhoundMultiProduct.egg-info/entry_points.txt
reading manifest file 'BloodhoundMultiProduct.egg-info/SOURCES.txt'
writing manifest file 'BloodhoundMultiProduct.egg-info/SOURCES.txt'
running build_ext
test_available_actions_chgprop_only
(tests.ticket.api.ProductTicketSystemTestCase) ... ERROR
test_available_actions_create_only
(tests.ticket.api.ProductTicketSystemTestCase) ... ERROR
test_available_actions_full_perms
(tests.ticket.api.ProductTicketSystemTestCase) ... ERROR
test_available_actions_no_perms
(tests.ticket.api.ProductTicketSystemTestCase) ... ERROR
test_custom_field_optional_select
(tests.ticket.api.ProductTicketSystemTestCase) ... ok
test_custom_field_order (tests.ticket.api.ProductTicketSystemTestCase) ...
ok
test_custom_field_select (tests.ticket.api.ProductTicketSystemTestCase)
... ok
test_custom_field_text (tests.ticket.api.ProductTicketSystemTestCase) ...
ok
test_custom_field_textarea (tests.ticket.api.ProductTicketSystemTestCase)
... ok
======================================================================
ERROR: test_available_actions_chgprop_only
(tests.ticket.api.ProductTicketSystemTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/path/to/bloodhound/trac/trac/ticket/tests/api.py", line 118, in
test_available_actions_chgprop_only
self.assertEqual(['leave'], self._get_actions({'status': 'new'}))
File "/path/to/bloodhound/trac/trac/ticket/tests/api.py", line 22, in
_get_actions
ticket = Ticket(self.env)
File "/path/to/bloodhound/trac/trac/ticket/model.py", line 69, in
__init__
self.fields = TicketSystem(self.env).get_ticket_fields()
File "/path/to/bloodhound/trac/trac/ticket/api.py", line 299, in
get_ticket_fields
fields = copy.deepcopy(self.fields)
File "/path/to/bloodhound/trac/trac/cache.py", line 71, in __get__
return CacheManager(instance.env).get(id, self.retriever, instance)
File "/path/to/bloodhound/trac/trac/cache.py", line 242, in get
data = retriever(instance, db)
File "/path/to/bloodhound/trac/trac/ticket/api.py", line 350, in fields
for val in cls.select(self.env, db=db)]
File "/path/to/bloodhound/trac/trac/ticket/model.py", line 779, in
select
(cls.type,)):
File "/path/to/bloodhound/trac/trac/db/util.py", line 121, in execute
cursor.execute(query, params)
File
"/path/to/bloodhound/bloodhound_multiproduct/multiproduct/dbcursor.py",
line 62, in execute
return super(BloodhoundIterableCursor,
self).execute(self._translate_sql(sql), args=args)
File "/path/to/bloodhound/trac/trac/db/util.py", line 54, in execute
r = self.cursor.execute(sql_escape_percent(sql), args)
File "/path/to/bloodhound/trac/trac/db/sqlite_backend.py", line 78, in
execute
result = PyFormatCursor.execute(self, *args)
File "/path/to/bloodhound/trac/trac/db/sqlite_backend.py", line 56, in
execute
args or [])
File "/path/to/bloodhound/trac/trac/db/sqlite_backend.py", line 48, in
_rollback_on_error
return function(self, *args, **kwargs)
OperationalError: no such column: product
======================================================================
ERROR: test_available_actions_create_only
(tests.ticket.api.ProductTicketSystemTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/path/to/bloodhound/trac/trac/ticket/tests/api.py", line 107, in
test_available_actions_create_only
self.assertEqual(['leave'], self._get_actions({'status': 'new'}))
File "/path/to/bloodhound/trac/trac/ticket/tests/api.py", line 22, in
_get_actions
ticket = Ticket(self.env)
File "/path/to/bloodhound/trac/trac/ticket/model.py", line 69, in
__init__
self.fields = TicketSystem(self.env).get_ticket_fields()
File "/path/to/bloodhound/trac/trac/ticket/api.py", line 299, in
get_ticket_fields
fields = copy.deepcopy(self.fields)
File "/path/to/bloodhound/trac/trac/cache.py", line 71, in __get__
return CacheManager(instance.env).get(id, self.retriever, instance)
File "/path/to/bloodhound/trac/trac/cache.py", line 242, in get
data = retriever(instance, db)
File "/path/to/bloodhound/trac/trac/ticket/api.py", line 350, in fields
for val in cls.select(self.env, db=db)]
File "/path/to/bloodhound/trac/trac/ticket/model.py", line 779, in
select
(cls.type,)):
File "/path/to/bloodhound/trac/trac/db/util.py", line 121, in execute
cursor.execute(query, params)
File
"/path/to/bloodhound/bloodhound_multiproduct/multiproduct/dbcursor.py",
line 62, in execute
return super(BloodhoundIterableCursor,
self).execute(self._translate_sql(sql), args=args)
File "/path/to/bloodhound/trac/trac/db/util.py", line 54, in execute
r = self.cursor.execute(sql_escape_percent(sql), args)
File "/path/to/bloodhound/trac/trac/db/sqlite_backend.py", line 78, in
execute
result = PyFormatCursor.execute(self, *args)
File "/path/to/bloodhound/trac/trac/db/sqlite_backend.py", line 56, in
execute
args or [])
File "/path/to/bloodhound/trac/trac/db/sqlite_backend.py", line 48, in
_rollback_on_error
return function(self, *args, **kwargs)
OperationalError: no such column: product
======================================================================
ERROR: test_available_actions_full_perms
(tests.ticket.api.ProductTicketSystemTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/path/to/bloodhound/trac/trac/ticket/tests/api.py", line 86, in
test_available_actions_full_perms
self._get_actions({'status': 'new'}))
File "/path/to/bloodhound/trac/trac/ticket/tests/api.py", line 22, in
_get_actions
ticket = Ticket(self.env)
File "/path/to/bloodhound/trac/trac/ticket/model.py", line 69, in
__init__
self.fields = TicketSystem(self.env).get_ticket_fields()
File "/path/to/bloodhound/trac/trac/ticket/api.py", line 299, in
get_ticket_fields
fields = copy.deepcopy(self.fields)
File "/path/to/bloodhound/trac/trac/cache.py", line 71, in __get__
return CacheManager(instance.env).get(id, self.retriever, instance)
File "/path/to/bloodhound/trac/trac/cache.py", line 242, in get
data = retriever(instance, db)
File "/path/to/bloodhound/trac/trac/ticket/api.py", line 350, in fields
for val in cls.select(self.env, db=db)]
File "/path/to/bloodhound/trac/trac/ticket/model.py", line 779, in
select
(cls.type,)):
File "/path/to/bloodhound/trac/trac/db/util.py", line 121, in execute
cursor.execute(query, params)
File
"/path/to/bloodhound/bloodhound_multiproduct/multiproduct/dbcursor.py",
line 62, in execute
return super(BloodhoundIterableCursor,
self).execute(self._translate_sql(sql), args=args)
File "/path/to/bloodhound/trac/trac/db/util.py", line 54, in execute
r = self.cursor.execute(sql_escape_percent(sql), args)
File "/path/to/bloodhound/trac/trac/db/sqlite_backend.py", line 78, in
execute
result = PyFormatCursor.execute(self, *args)
File "/path/to/bloodhound/trac/trac/db/sqlite_backend.py", line 56, in
execute
args or [])
File "/path/to/bloodhound/trac/trac/db/sqlite_backend.py", line 48, in
_rollback_on_error
return function(self, *args, **kwargs)
OperationalError: no such column: product
======================================================================
ERROR: test_available_actions_no_perms
(tests.ticket.api.ProductTicketSystemTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/path/to/bloodhound/trac/trac/ticket/tests/api.py", line 98, in
test_available_actions_no_perms
self.assertEqual(['leave'], self._get_actions({'status': 'new'}))
File "/path/to/bloodhound/trac/trac/ticket/tests/api.py", line 22, in
_get_actions
ticket = Ticket(self.env)
File "/path/to/bloodhound/trac/trac/ticket/model.py", line 69, in
__init__
self.fields = TicketSystem(self.env).get_ticket_fields()
File "/path/to/bloodhound/trac/trac/ticket/api.py", line 299, in
get_ticket_fields
fields = copy.deepcopy(self.fields)
File "/path/to/bloodhound/trac/trac/cache.py", line 71, in __get__
return CacheManager(instance.env).get(id, self.retriever, instance)
File "/path/to/bloodhound/trac/trac/cache.py", line 242, in get
data = retriever(instance, db)
File "/path/to/bloodhound/trac/trac/ticket/api.py", line 350, in fields
for val in cls.select(self.env, db=db)]
File "/path/to/bloodhound/trac/trac/ticket/model.py", line 779, in
select
(cls.type,)):
File "/path/to/bloodhound/trac/trac/db/util.py", line 121, in execute
cursor.execute(query, params)
File
"/path/to/bloodhound/bloodhound_multiproduct/multiproduct/dbcursor.py",
line 62, in execute
return super(BloodhoundIterableCursor,
self).execute(self._translate_sql(sql), args=args)
File "/path/to/bloodhound/trac/trac/db/util.py", line 54, in execute
r = self.cursor.execute(sql_escape_percent(sql), args)
File "/path/to/bloodhound/trac/trac/db/sqlite_backend.py", line 78, in
execute
result = PyFormatCursor.execute(self, *args)
File "/path/to/bloodhound/trac/trac/db/sqlite_backend.py", line 56, in
execute
args or [])
File "/path/to/bloodhound/trac/trac/db/sqlite_backend.py", line 48, in
_rollback_on_error
return function(self, *args, **kwargs)
OperationalError: no such column: product
----------------------------------------------------------------------
Ran 9 tests in 0.604s
FAILED (errors=4)
}}}
As you can see it seems that `product` column has not been added in
''ticket'' table after multi-product upgrade . What's going wrong ?
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/355#comment:5>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker