Fix inserting to destinations table in tasks_lib

- only in tests
- type can't be null in table destinations
- set default 'host' in tests