def setUp(self):
        super(RebuildRSREnvTest, self).setUp()

        self.virtualenv_installer_config = RSRVirtualEnvInstallerConfig.create_with(CIDeploymentHostConfig.for_test(), User.CURRENT)
        self.mock_virtualenv_deployment_host = self.mox.CreateMock(VirtualEnvDeploymentHost)

        self.rebuild_virtualenv_task = StubbedRebuildRSREnv(self.mock_virtualenv_deployment_host)
Exemple #2
0
    def test_can_create_instance(self):
        """fab.tests.config.rsr.virtualenv_installer_config_test  Can create RSRVirtualEnvInstallerConfig instance"""

        self.assertIsInstance(
            RSRVirtualEnvInstallerConfig.create_with(
                self.deployment_host_config, self.deployment_user),
            RSRVirtualEnvInstallerConfig)
Exemple #3
0
    def setUp(self):
        super(RebuildRSREnvTest, self).setUp()

        self.virtualenv_installer_config = RSRVirtualEnvInstallerConfig.create_with(
            CIDeploymentHostConfig.for_test(), User.CURRENT)
        self.mock_virtualenv_deployment_host = self.mox.CreateMock(
            VirtualEnvDeploymentHost)

        self.rebuild_virtualenv_task = StubbedRebuildRSREnv(
            self.mock_virtualenv_deployment_host)
Exemple #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(VirtualEnvInstallerTest, self).setUp()
        self.mock_host_controller = self.mox.CreateMock(RemoteHostController)
        self.mock_file_system = self.mox.CreateMock(FileSystem)
        self.mock_permissions = self.mox.CreateMock(AkvoPermissions)
        self.mock_internet = self.mox.CreateMock(Internet)
        self.mock_virtualenv = self.mox.CreateMock(VirtualEnv)
        self.mock_feedback = self.mox.CreateMock(ExecutionFeedback)
        self.mock_time_stamp_formatter = self.mox.CreateMock(TimeStampFormatter)

        self.virtualenv_installer_config = RSRVirtualEnvInstallerConfig.create_with(CIDeploymentHostConfig.for_test(), "deployment_user")

        self.pip_requirements_url = "http://some/path/to/pip_requirements.txt"

        self.mock_host_controller.feedback = self.mock_feedback

        self.virtualenv_installer = VirtualEnvInstaller(self.virtualenv_installer_config, self.mock_host_controller,
                                                        self.mock_file_system, self.mock_permissions, self.mock_internet,
                                                        self.mock_virtualenv, self.mock_time_stamp_formatter)
    def setUp(self):
        super(VirtualEnvDeploymentHostTest, self).setUp()
        self.mock_file_system = self.mox.CreateMock(FileSystem)
        self.mock_user_verifier = self.mox.CreateMock(DeploymentUserVerifier)
        self.mock_permissions = self.mox.CreateMock(AkvoPermissions)
        self.mock_virtualenv_installer = self.mox.CreateMock(VirtualEnvInstaller)
        self.mock_feedback = self.mox.CreateMock(ExecutionFeedback)

        self.deployment_user = "******"
        deployment_host_config = CIDeploymentHostConfig.for_test()
        self.virtualenv_installer_config = RSRVirtualEnvInstallerConfig.create_with(deployment_host_config, self.deployment_user)

        # we don't have any additional expections on the Internet dependency (since this is already
        # tested in the DeploymentHost base class) so we set this to None for now
        self.virtualenv_deployment_host = VirtualEnvDeploymentHost(self.virtualenv_installer_config,
                                                                   self.mock_file_system,
                                                                   self.mock_user_verifier,
                                                                   self.mock_permissions,
                                                                   None,
                                                                   self.mock_virtualenv_installer,
                                                                   self.mock_feedback)
Exemple #7
0
    def setUp(self):
        super(VirtualEnvInstallerTest, self).setUp()
        self.mock_host_controller = self.mox.CreateMock(RemoteHostController)
        self.mock_file_system = self.mox.CreateMock(FileSystem)
        self.mock_permissions = self.mox.CreateMock(AkvoPermissions)
        self.mock_internet = self.mox.CreateMock(Internet)
        self.mock_virtualenv = self.mox.CreateMock(VirtualEnv)
        self.mock_feedback = self.mox.CreateMock(ExecutionFeedback)
        self.mock_time_stamp_formatter = self.mox.CreateMock(
            TimeStampFormatter)

        self.virtualenv_installer_config = RSRVirtualEnvInstallerConfig.create_with(
            CIDeploymentHostConfig.for_test(), "deployment_user")

        self.pip_requirements_url = "http://some/path/to/pip_requirements.txt"

        self.mock_host_controller.feedback = self.mock_feedback

        self.virtualenv_installer = VirtualEnvInstaller(
            self.virtualenv_installer_config, self.mock_host_controller,
            self.mock_file_system, self.mock_permissions, self.mock_internet,
            self.mock_virtualenv, self.mock_time_stamp_formatter)
    def test_can_create_instance(self):
        """fab.tests.config.rsr.virtualenv_installer_config_test  Can create RSRVirtualEnvInstallerConfig instance"""

        self.assertIsInstance(RSRVirtualEnvInstallerConfig.create_with(self.deployment_host_config, self.deployment_user),
                              RSRVirtualEnvInstallerConfig)