Fix some unit and integration tests

(ActionItem2587)