Пример #1
0
 def test_start(self):
     """
     start - test to ensure that ``start`` method functions
     without exception
     """
     git_deploy_obj = GitDeploy()
     try:
         git_deploy_obj.start(None)
     except GitDeployError:
         self.assertTrue(False)
Пример #2
0
 def test_start(self):
     """
     start - test to ensure that ``start`` method functions
     without exception
     """
     git_deploy_obj = GitDeploy()
     try:
         git_deploy_obj.start(None)
     except GitDeployError:
         self.assertTrue(False)
Пример #3
0
    def test_sync(self):
        """
        sync - test to ensure that ``sync`` method functions
        without exception
        """
        git_deploy_obj = GitDeploy()
        try:
            git_deploy_obj.start(None)
            git_deploy_obj.sync(None)

            # TODO - check tag and deploy file
        except GitDeployError:
            self.assertTrue(False)
Пример #4
0
    def test_sync(self):
        """
        sync - test to ensure that ``sync`` method functions
        without exception
        """
        git_deploy_obj = GitDeploy()
        try:
            git_deploy_obj.start(None)
            git_deploy_obj.sync(None)

            # TODO - check tag and deploy file
        except GitDeployError:
            self.assertTrue(False)
Пример #5
0
    def test_abort(self):
        """
        abort - test to ensure that ``abort`` method functions
        without exception
        """
        git_deploy_obj = GitDeploy()

        try:
            git_deploy_obj.start(None)
            git_deploy_obj.abort(None)

            # TODO - check lock file & commit

        except GitDeployError:
            self.assertTrue(False)
Пример #6
0
    def test_abort(self):
        """
        abort - test to ensure that ``abort`` method functions
        without exception
        """
        git_deploy_obj = GitDeploy()

        try:
            git_deploy_obj.start(None)
            git_deploy_obj.abort(None)

            # TODO - check lock file & commit

        except GitDeployError:
            self.assertTrue(False)
Пример #7
0
    def test_deploy_in_progress(self):
        """
        deploy_in_progress - test to ensure that when the ``start`` method
        is called when a deployment is in progress GitDeploy exits with error
        """
        git_deploy_obj = GitDeploy()

        # TODO - ensure that the repo is "fresh"

        # Call ``start`` twice
        try:
            git_deploy_obj.start(None)
            git_deploy_obj.start(None)
        except GitDeployError as e:
            if not e.message == exit_codes[2]:
                self.assertTrue(False)
            return
        self.assertTrue(False)
Пример #8
0
    def test_deploy_in_progress(self):
        """
        deploy_in_progress - test to ensure that when the ``start`` method
        is called when a deployment is in progress GitDeploy exits with error
        """
        git_deploy_obj = GitDeploy()

        # TODO - ensure that the repo is "fresh"

        # Call ``start`` twice
        try:
            git_deploy_obj.start(None)
            git_deploy_obj.start(None)
        except GitDeployError as e:
            if not e.message == exit_codes[2]:
                self.assertTrue(False)
            return
        self.assertTrue(False)