Public trigger functional test is not clearing plan and image tables.
Way to reproduce:
1) Do functionaltest setup outlined here: https://wiki.openstack.org/wiki/Solum/Testing
2) Run tests:
nosetests --tests functionaltests.api.v1.public.test_trigger
3) After tests finish, login to mysql database and query plan and images tables.
% mysql
% use solum;
mysql> select * from plan;
+-----+--------------------------------------+---------------------+------------+----------------------------------+----------------------------------+-------------+-------------+---------------+------------+----------+----------+
| id | uuid | created_at | updated_at | project_id | user_id | raw_content | description | name | trigger_id | trust_id | username |
+-----+--------------------------------------+---------------------+------------+----------------------------------+----------------------------------+-------------+-------------+---------------+------------+----------+----------+
| 342 | 436891f6-f608-4c3e-a017-c7b7b7eeb415 | 2016-01-14 14:42:34 | NULL | 5be7e6fa92dd4bdfa863afbd289e7967 | d45fc73f313a44338372e401a97229fa | NULL | NULL | test_appgbdav | NULL | NULL | NULL |
+-----+--------------------------------------+---------------------+------------+----------------------------------+----------------------------------+-------------+-------------+---------------+------------+----------+----------+
mysql> select * from image;
+-----+--------------------------------------+---------------------+------------+---------------+-------------+--------------------+----------------------------------+----------------------------------+------+--------+---------------+------------------+--------------+---------------+---------------+--------------+-------------------+
| id | uuid | created_at | updated_at | name | description | source_uri | project_id | user_id | tags | status | base_image_id | created_image_id | image_format | source_format | artifact_type | external_ref | docker_image_name |
+-----+--------------------------------------+---------------------+------------+---------------+-------------+--------------------+----------------------------------+----------------------------------+------+--------+---------------+------------------+--------------+---------------+---------------+--------------+-------------------+
| 182 | 35a2dc45-e51e-4e58-85a3-5c52f524cdae | 2016-01-14 14:42:34 | NULL | test_appgbdav | NULL | https://github.com | 5be7e6fa92dd4bdfa863afbd289e7967 | d45fc73f313a44338372e401a97229fa | NULL | QUEUED | python | NULL | docker | NULL | NULL | NULL | NULL |
+-----+--------------------------------------+---------------------+------------+---------------+-------------+--------------------+----------------------------------+----------------------------------+------+--------+---------------+------------------+--------------+---------------+---------------+--------------+-------------------+
1 row in set (0.00 sec)
mysql> select * from workflow;
+--------------------------------------+---------------------+---------------------+------------+---------+----------------------------------+----------------------------------+--------------------------------------+-------+-------------------------------------------------------+------------------------------------------------------+----------------------------+----------+----------+
| id | created_at | updated_at | deleted_at | deleted | project_id | user_id | app_id | wf_id | source | config | actions | status | assembly |
+--------------------------------------+---------------------+---------------------+------------+---------+----------------------------------+----------------------------------+--------------------------------------+-------+-------------------------------------------------------+------------------------------------------------------+----------------------------+----------+----------+
| c6eb9723-676d-479a-a843-4cc17195cf91 | 2016-01-15 01:37:39 | 2016-01-15 01:37:45 | NULL | 0 | 1b8aa91ec5054edb8ffa26fd96f2bc53 | e2f4c38e7da749e494a7c20154f38ff5 | 2af000f7-c0bc-439d-a63c-46d7bcc74838 | 1 | {repository: 'https://github.com', revision: master}
| {run_cmd: python app.py, test_cmd: ./unit_tests.sh}
| [unittest, build, deploy]
| DELETING | 18 |
+--------------------------------------+---------------------+---------------------+------------+---------+----------------------------------+----------------------------------+--------------------------------------+-------+-------------------------------------------------------+------------------------------------------------------+----------------------------+----------+----------+
1 row in set (0.00 sec)
mysql> select * from userlogs;
+----+---------------------+---------------------+--------------------------------------+-------------------------------------------------------------------------+----------+---------------+----------------------------------+---------------+
| id | created_at | updated_at | resource_uuid | location | strategy | strategy_info | project_id | resource_type |
+----+---------------------+---------------------+--------------------------------------+-------------------------------------------------------------------------+----------+---------------+----------------------------------+---------------+
| 17 | 2016-01-15 01:37:45 | 2016-01-15 01:37:45 | c6eb9723-676d-479a-a843-4cc17195cf91 | /var/log/solum/deployer/delete-c6eb9723-676d-479a-a843-4cc17195cf91.log | local | {} | 1b8aa91ec5054edb8ffa26fd96f2bc53 | app |
+----+---------------------+---------------------+--------------------------------------+-------------------------------------------------------------------------+----------+---------------+----------------------------------+---------------+
1 row in set (0.00 sec)
The fix will be in trigger handling code path:
https://github.com/openstack/solum/blob/master/solum/api/controllers/v1/trigger.py