subunit2sql/subunit2sql/tests
mccasland, trevor (tm2086) 464a9e0adc Add attachments flag to get_test_runs_by_status
By adding an 'include_attachments' flag to the get_test_runs_by_status
method we can join the Attachments table with the same structure as
the RunMetadata table allowing us to optionally include attachments or
metadata with test_runs filtered by a given status.

Notes on testing:
  * As far as I could tell, logstash.o.o doesn't store attachments[1]
  so to test this patch you will have to setup/use another subunit2sql
  db with attachments stored in it
  * you can find the openstack-health patch to render the attachments
  in the Needed-By change of the footer of this commit message.

Notes on performance:
  * on average loading attachments is about 13% slower when calling this
    api with python[2]. The query times in the paste were produced by calling
    the api method get_test_runs_by_status_for_run_ids 100x in a for loop with
    49 test_runs being returned from the call, which is the number of failures
    in the last 10 runs.

[1] http://paste.openstack.org/show/719192/
[2] http://paste.openstack.org/show/738662/
Needed-By: I3ce2fc50ada9462de3df29b5a8b76b12a548fd12
Change-Id: I31468c825cf259b8df62134e578f31d96af6ac75
2018-12-26 16:15:27 -06:00
..
db Add attachments flag to get_test_runs_by_status 2018-12-26 16:15:27 -06:00
migrations Fix the subunit2sql migration and tests error with mysql 5.7 2016-08-09 18:55:42 +08:00
__init__.py Initial commit 2014-06-12 23:59:00 -04:00
base.py Add logging capture fixture to the unit tests 2015-08-25 20:45:07 -04:00
db_test_utils.py Enable db api tests on all backends 2015-12-04 13:35:59 -05:00
subunit2sql_fixtures.py Remove DB existence check from open session termination 2016-04-08 17:03:11 -04:00
test_read_subunit.py Add subunit2sql CLI option to use non_subunit_name 2017-12-26 19:29:13 +00:00
test_shell.py Fix handling of xfail and uxsuccess results in subunit2sql cli 2018-12-17 19:13:44 -05:00
test_targets_localdir.py Example of how to use targets plugins 2015-11-10 23:07:18 -08:00
test_write_subunit.py Handle test_runs without metadata in write_subunit 2015-12-09 15:39:16 -05:00