def test_raises_lookup_error_for_unrecognised_host_alias(self): """fab.tests.config.values.deployment_host_paths_test Raises LookupError for unrecognised host alias""" with self.assertRaises(LookupError) as raised: DeploymentHostPaths.for_host('nonexistent_host') self.assertEqual('No host path configuration for: nonexistent_host', raised.exception.message)
def test_has_host_paths_for_ci_server(self): """fab.tests.config.values.deployment_host_paths_test Has host paths for ci server""" self.assertEqual(DeploymentHostPaths(HostPathValues.DEFAULT), DeploymentHostPaths.for_host(HostAlias.CI))
def test_has_host_paths_for_test2_server(self): """fab.tests.config.values.deployment_host_paths_test Has host paths for test2 server""" self.assertEqual(DeploymentHostPaths(HostPathValues.TEST2), DeploymentHostPaths.for_host(HostAlias.TEST2))
def test_has_host_paths_for_live_server(self): """fab.tests.config.values.deployment_host_paths_test Has host paths for live server""" self.assertEqual(DeploymentHostPaths(HostPathValues.LIVE), DeploymentHostPaths.for_host(HostAlias.LIVE))
def create_with(host_alias, repository_branch, rsr_database_name): return DeploymentHostConfig(repository_branch, rsr_database_name, SSHConnection.for_host(host_alias), DeploymentHostPaths.for_host(host_alias))
def create_with(host_alias, repository_branch, rsr_database_name): return DeploymentHostConfig(repository_branch, rsr_database_name, SSHConnection.for_host(host_alias), DeploymentHostPaths.for_host(host_alias))