﻿namespace Kudu.Contracts.Functions
{
    public class FunctionTestData
    {
        // test shows test_data of size 8310000 bytes still delivers as an ARM package
        // whereas test_data of size 8388608 bytes fails
        public const long PackageMaxSizeInBytes = 8300000;

        public long BytesLeftInPackage { get; set; } = PackageMaxSizeInBytes;

        public bool DeductFromBytesLeftInPackage(long fileSize)
        {
            long spaceLeft = BytesLeftInPackage - fileSize;
            if (spaceLeft >= 0)
            {
                BytesLeftInPackage = spaceLeft;
                return true;
            }
            return false;
        }
    }
}

﻿namespace Kudu.Contracts.Functions
{
    public class FunctionTestData
    {
        // ARM has a limit of 8 MB -> 8388608 bytes
        // divid by 2 to limit the over all size of test data to half of arm requirement to be safe.
        public const long PackageMaxSizeInBytes = 8388608 / 2;

        public long BytesLeftInPackage { get; set; } = PackageMaxSizeInBytes;

        public bool DeductFromBytesLeftInPackage(long fileSize)
        {
            long spaceLeft = BytesLeftInPackage - fileSize;
            if (spaceLeft >= 0)
            {
                BytesLeftInPackage = spaceLeft;
                return true;
            }
            return false;
        }
    }
}
Reduce size of test_data for ARM requests to 8MB/2
Reduce size of test_data for ARM requests to 8MB/2
