Example #1
0
 def create_with(database_credentials, deployment_host_config,
                 host_controller):
     return DatabaseHost(
         RSRSettingsVerifier.create_with(deployment_host_config,
                                         host_controller),
         RSRDatabaseConfig(database_credentials,
                           deployment_host_config.rsr_database_name),
         DatabaseAdmin.create_with(database_credentials,
                                   deployment_host_config, host_controller))
Example #2
0
    def test_can_create_instance(self):
        """fab.tests.database.mysql.database_admin_test  Can create a DatabaseAdmin instance"""

        deployment_host_config = CIDeploymentHostConfig.for_test()
        database_credentials = TemplateLoader.load_database_credentials()
        mock_host_controller = self.mox.CreateMock(RemoteHostController)
        mock_host_controller.feedback = self.mock_feedback

        self.mox.ReplayAll()

        self.assertIsInstance(DatabaseAdmin.create_with(database_credentials, deployment_host_config, mock_host_controller), DatabaseAdmin)
    def test_can_create_instance(self):
        """fab.tests.database.mysql.database_admin_test  Can create a DatabaseAdmin instance"""

        deployment_host_config = CIDeploymentHostConfig.for_test()
        database_credentials = TemplateLoader.load_database_credentials()
        mock_host_controller = self.mox.CreateMock(RemoteHostController)
        mock_host_controller.feedback = self.mock_feedback

        self.mox.ReplayAll()

        self.assertIsInstance(
            DatabaseAdmin.create_with(database_credentials,
                                      deployment_host_config,
                                      mock_host_controller), DatabaseAdmin)
Example #4
0
 def create_with(database_credentials, deployment_host_config, host_controller):
     return DatabaseHost(RSRSettingsVerifier.create_with(deployment_host_config, host_controller),
                         RSRDatabaseConfig(database_credentials, deployment_host_config.rsr_database_name),
                         DatabaseAdmin.create_with(database_credentials, deployment_host_config, host_controller))