Beispiel #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)
    def setUp(self):
        super(CredentialsFileReaderTest, self).setUp()
        self.host_paths = DeploymentHostPaths.default()
        self.mock_host_file_system = self.mox.CreateMock(FileSystem)
        self.mock_local_file_system = self.mox.CreateMock(LocalFileSystem)

        self.credentials_file_reader = CredentialsFileReader(DeploymentHostPaths.default(),
                                                             self.mock_host_file_system,
                                                             self.mock_local_file_system)
    def setUp(self):
        super(CredentialsFileReaderTest, self).setUp()
        self.host_paths = DeploymentHostPaths.default()
        self.mock_host_file_system = self.mox.CreateMock(FileSystem)
        self.mock_host_controller = self.mox.CreateMock(RemoteHostController)

        self.credentials_file_reader = CredentialsFileReader(DeploymentHostPaths.default(),
                                                             self.mock_host_file_system,
                                                             self.mock_host_controller)
    def setUp(self):
        super(CredentialsFileReaderTest, self).setUp()
        self.host_paths = DeploymentHostPaths.default()
        self.mock_host_file_system = self.mox.CreateMock(FileSystem)
        self.mock_host_controller = self.mox.CreateMock(RemoteHostController)

        self.credentials_file_reader = CredentialsFileReader(
            DeploymentHostPaths.default(), self.mock_host_file_system,
            self.mock_host_controller)
Beispiel #5
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))
Beispiel #6
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))
Beispiel #7
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))
Beispiel #8
0
    def test_can_use_default_host_paths(self):
        """fab.tests.config.values.deployment_host_paths_test  Can use default host paths"""

        self.assertEqual(DeploymentHostPaths(HostPathValues.DEFAULT), DeploymentHostPaths.default())
Beispiel #9
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))
    def test_can_create_instance_for_remote_deployment_host(self):
        """fab.tests.config.rsr.credentials.credentials_file_reader_test  Can create CredentialsFileReader instance for a remote deployment host"""

        self._verify_instance_creation_for(DeploymentHostPaths.default(), RemoteHostController)
Beispiel #11
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))
    def test_can_create_instance_for_remote_deployment_host(self):
        """fab.tests.config.rsr.credentials.credentials_file_reader_test  Can create CredentialsFileReader instance for a remote deployment host"""

        self._verify_instance_creation_for(DeploymentHostPaths.default(),
                                           RemoteHostController)