Exemplo n.º 1
0
    def test_validate_deployment_group_error_compute_platform(self):
        invalid_dgp = {'deploymentGroupInfo': {'computePlatform': 'Lambda'}}
        bad_validator = CodeDeployValidator(None, self.TEST_RESOURCES)
        bad_validator.deployment_group_details = invalid_dgp

        with self.assertRaises(InvalidPlatformError):
            bad_validator.validate_deployment_group()
    def test_validate_deployment_group_error_compute_platform(self):
        invalid_dgp = {
            'deploymentGroupInfo': {
                'computePlatform': 'Lambda'
            }
        }
        bad_validator = CodeDeployValidator(None, self.TEST_RESOURCES)
        bad_validator.deployment_group_details = invalid_dgp

        with self.assertRaises(InvalidPlatformError):
            bad_validator.validate_deployment_group()
    def test_validate_deployment_group_error_service(self):
        invalid_dgp = {
            'deploymentGroupInfo': {
                'computePlatform': 'ECS',
                'ecsServices': [{
                    'serviceName': 'the-wrong-test-service',
                    'clusterName': 'test-cluster'
                }]
            }
        }
        bad_validator = CodeDeployValidator(None, self.TEST_RESOURCES)
        bad_validator.deployment_group_details = invalid_dgp

        with self.assertRaises(InvalidProperyError):
            bad_validator.validate_deployment_group()
Exemplo n.º 4
0
    def test_validate_deployment_group_error_cluster(self):
        invalid_dgp = {
            'deploymentGroupInfo': {
                'computePlatform':
                'ECS',
                'ecsServices': [{
                    'serviceName': 'test-service',
                    'clusterName': 'the-wrong-test-cluster'
                }]
            }
        }
        bad_validator = CodeDeployValidator(None, self.TEST_RESOURCES)
        bad_validator.deployment_group_details = invalid_dgp

        with self.assertRaises(InvalidProperyError):
            bad_validator.validate_deployment_group()