Added test for lifecycle-environment paths

"Added test for lifecycle-environment paths"
Merge pull request #1420 from tkolhar/test_cli

Added test for lifecycle-environment paths
Port old API tests for repositories

Completely rewrite existing tests in module `test_repository_v2`. Make them more
terse, efficent and thorough. Drop module `test_repository`, as the "v2" module
now performs its responsibilities.