Azurite doesn't check if the retention time is too long when set service properties
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 393
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 36
Description
**Error Description:**
Azurite doesn't check if the retention time is too long when set service properties. If the retention days is greater than 365 days, Azurite doesn't return an error and Azure will return an error as following:

**To Reproduce:**
Please run the demo code as following:
```Typescript
import { delay } from "@azure/core-http";
import { BlobServiceClient, StorageSharedKeyCredential } from "@azure/storage-blob";
import { assert } from "chai";
async function main() {
const blobServiceClient = new BlobServiceClient("", new StorageSharedKeyCredential("", ""));
const serviceProperties = await blobServiceClient.getProperties();
serviceProperties.minuteMetrics = {
enabled: true,
includeAPIs: true,
retentionPolicy: {
days: 366,
enabled: true
}
}
await blobServiceClient.setProperties(serviceProperties);
await delay(5*1000);
const result = await blobServiceClient.getProperties();
}
main().catch((err) => {
assert.ok(err);
});
```
**Expected Behavior:**
Azurite will return an error the same as Azure when set service properties with the invalid retention time.
@jongio for notification.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.