Пример #1
0
def test_aws_lambda_apply_over_max_bundle_size_limit_fail():
    yatai_service_mock = create_yatai_service_mock()
    test_deployment_pb = generate_lambda_deployment_pb()
    deployment_operator = AwsLambdaDeploymentOperator(yatai_service_mock)
    result_pb = deployment_operator.add(test_deployment_pb)
    assert result_pb.status.status_code == status_pb2.Status.INTERNAL
    assert result_pb.deployment.state.state == DeploymentState.ERROR
def test_aws_lambda_apply_over_bundle_size_limit_success():
    yatai_service_mock = create_yatai_service_mock()
    test_deployment_pb = generate_lambda_deployment_pb()
    deployment_operator = AwsLambdaDeploymentOperator(yatai_service_mock)

    result_pb = deployment_operator.add(test_deployment_pb)

    assert result_pb.status.status_code == status_pb2.Status.OK
    assert result_pb.deployment.state.state == DeploymentState.PENDING