Beispiel #1
0
    def test_has_repository_branch_without_branch_type(self):
        """fab.tests.config.rsr.codebase_config_test  Has repository branch without branch type"""

        self.assertEqual(
            'sms',
            RSRCodebaseConfig('feature/sms').repo_branch_without_type)
        self.assertEqual('develop',
                         RSRCodebaseConfig('develop').repo_branch_without_type)
 def create_with(deployment_host_config, host_controller):
     return SystemPythonPackageInstaller(deployment_host_config.host_paths,
                                         RSRCodebaseConfig(deployment_host_config.repository_branch),
                                         SystemPackageInstallationPaths(deployment_host_config.host_paths),
                                         PipInstaller.create_with(deployment_host_config, host_controller),
                                         FileSystem(host_controller),
                                         AkvoPermissions(host_controller),
                                         Internet(host_controller),
                                         host_controller)
    def setUp(self):
        super(RSRDataPopulatorConfigTest, self).setUp()
        self.deployment_host_config = CIDeploymentHostConfig.for_test()
        self.deployment_config = RSRDeploymentConfig.create_with(
            self.deployment_host_config)
        self.codebase_config = RSRCodebaseConfig("some_repo_branch")

        self.expected_rsr_deployment_home = self.deployment_config.rsr_deployment_home

        self.data_populator_config = RSRDataPopulatorConfig(
            self.deployment_config, self.deployment_host_config.host_paths,
            self.codebase_config)
Beispiel #4
0
    def setUp(self):
        super(RSRVirtualEnvInstallerConfigTest, self).setUp()

        self.deployment_user = "******"
        self.deployment_host_config = CIDeploymentHostConfig.for_test()
        self.codebase_config = RSRCodebaseConfig(
            self.deployment_host_config.repository_branch)

        self.expected_virtualenvs_home = self.deployment_host_config.host_paths.virtualenvs_home
        self.expected_rsr_env_name = "rsr_%s" % self.codebase_config.repo_branch_without_type

        self.virtualenv_installer_config = RSRVirtualEnvInstallerConfig(
            self.deployment_host_config.host_paths, self.codebase_config,
            self.deployment_user)
    def setUp(self):
        super(RSRDeploymentConfigTest, self).setUp()

        self.deployment_user = '******'
        self.deployment_host_config = CIDeploymentHostConfig.for_test()
        self.deployment_host_paths = self.deployment_host_config.host_paths
        self.codebase_config = RSRCodebaseConfig(
            self.deployment_host_config.repository_branch)

        self.expected_rsr_dir_name = 'rsr_%s' % self.codebase_config.repo_branch_without_type
        self.expected_rsr_deployment_home = os.path.join(
            self.deployment_host_paths.repo_checkout_home,
            self.expected_rsr_dir_name)
        self.expected_current_virtualenv_path = os.path.join(
            self.deployment_host_paths.virtualenvs_home, 'current')

        self.deployment_config = RSRDeploymentConfig(
            self.deployment_host_paths, self.deployment_user,
            self.codebase_config)
    def setUp(self):
        super(SystemPythonPackageInstallerTest, self).setUp()
        self.deployment_host_config = CIDeploymentHostConfig.for_test()
        self.codebase_config = RSRCodebaseConfig(
            self.deployment_host_config.repository_branch)
        self.installation_paths = SystemPackageInstallationPaths(
            self.deployment_host_config.host_paths)

        self.mock_pip_installer = self.mox.CreateMock(PipInstaller)
        self.mock_file_system = self.mox.CreateMock(FileSystem)
        self.mock_permissions = self.mox.CreateMock(AkvoPermissions)
        self.mock_internet = self.mox.CreateMock(Internet)
        self.mock_host_controller = self.mox.CreateMock(RemoteHostController)
        self.mock_feedback = self.mox.CreateMock(ExecutionFeedback)

        self.mock_host_controller.feedback = self.mock_feedback

        self.package_installer = SystemPythonPackageInstaller(
            self.deployment_host_config.host_paths, self.codebase_config,
            self.installation_paths, self.mock_pip_installer,
            self.mock_file_system, self.mock_permissions, self.mock_internet,
            self.mock_host_controller)
Beispiel #7
0
    def test_has_repository_branch(self):
        """fab.tests.config.rsr.codebase_config_test  Has repository branch"""

        self.assertEqual('feature/sms',
                         RSRCodebaseConfig('feature/sms').repo_branch)
        self.assertEqual('develop', RSRCodebaseConfig('develop').repo_branch)
Beispiel #8
0
    def setUp(self):
        super(RSRCodebaseConfigTest, self).setUp()

        self.feature_branch = 'feature/sms'

        self.codebase_config = RSRCodebaseConfig(self.feature_branch)
Beispiel #9
0
 def create_with(deployment_host_config, deployment_user):
     return RSRVirtualEnvInstallerConfig(
         deployment_host_config.host_paths,
         RSRCodebaseConfig(deployment_host_config.repository_branch),
         deployment_user)
Beispiel #10
0
 def create_with(deployment_host_config, deployment_user=None):
     return RSRDeploymentConfig(
         deployment_host_config.host_paths, deployment_user,
         RSRCodebaseConfig(deployment_host_config.repository_branch))
Beispiel #11
0
 def create_with(deployment_host_config):
     return RSRDataPopulatorConfig(
         RSRDeploymentConfig.create_with(deployment_host_config),
         deployment_host_config.host_paths,
         RSRCodebaseConfig(deployment_host_config.repository_branch))