Пример #1
0
    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)
Пример #2
0
    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))
Пример #3
0
    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))
Пример #4
0
    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))
Пример #5
0
 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))
Пример #6
0
 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))